I have recently been sent a book about OpenSceneGraph, entitled “OpenSceneGraph 3.0 : Beginner’s guide” (You can download a sample chapter on the website).
Disclaimer: The book has been sent to me for free by its editors, so judge by yourself if there is a conflict of interest!
I’ve been working with OpenSceneGraph for four years between 2001 and 2005, building a VR engine and two VR simulators on top of it for the french railways and I would have loved to have a beginner’s guide back then. I had worked with Performer, OSG’s commercial ancestor by Silicon Graphics, which gave me a good start (because it had a documentation
You could only get information from the source code or the mailing list, sometimes from sparse documents on their website, but the learning curve was steep. Now there are two other books about OpenSceneGraph, thanks to the community of users (“Because life is too short to read the source”
As the title suggests, it’s a beginner’s guide to OSG, not to OpenGL, C++ or STL (“of which OSG makes extensive use”, oh yeah, it does). So you need to have the usual 3d programming basis. It starts by explaining the concept of scene graph, the origins of OSG (hang-gliding, in 1998!) the components of the package, and other information that will give you confidence that using OSG is a good thing (it is).
Then the book covers the installation and compilation process, which is cross-platform thanks to CMake. They put an emphasis on CMake compilation, which, powerful and portable as it is, is not the simplest tool around (unless you buy the CMake book). They briefly talk about a Visual Studio wizard that configures a project for you by adding the required paths and libs, but I think it would have been better to advise users to use their favorite development environment alone and explain the basic library needed to compile their project. I love CMake but learning OSG and CMake at the same time will give you headaches
The book then explains the fundamental concepts of OSG with a small example. Smart pointers being at the center of OSG, the concept is well explained with nice graphics. Then a very low level explanation of 3d drawing is given, again nicely illustrated: draw arrays, tesselation.. The parallel between OSG and OpenGL really helps understand what is happening. The chapter is helpful but complex. If you’re only using existing geometry you can skip this chapter and avoid a big headache !
Then the book covers the basic components of OSG : the scenegraph, lights, textures, GLSL shaders, cameras, windows, viewports, basic stereoscopy, animation.
Everything is clearly explained, from the concepts to what’s happening underneath. Then simple examples help you materialize the ideas (which is why the book cover says “learn by doing”)
The rest of the book covers interaction (keyboard/mouse), integrating OSG in native windows, loading and saving files, how to extend OSG and a whole chapter about optimization (multithread, occluders, massive rendering). Definitely a useful chapter !
OSG is a very powerful tool that demands some investment to be used properly. This book will definitely help you learn OSG more quickly and make the most of it. It covers everything you need to create complex applications. From beginner you can very well end up a master of OSG (with some practice of course!).
So the book is definitely worth it, considering the time you will save. And if that’s not enough read the forums or use the source, Luke !