Introduction to the OpenSceneGraph

Welcome to OpenSceneGraph project!

The OpenSceneGraph is an Open Source (LGPL), Cross Platform (Widows, Linux, Mac OSX, FreeBSD, Irix, Solaris), Standard C++ and OpenGL based graphics development library, uses range from visual simulation, games, virtual reality, sceintific visualization and graphics research. This pages introduces a what scene graphs are, why graphics developers use them, and details about the OpenSceneGraph, project, how to learn how to use it and contribute to the OpenSceneGraph community.

Robert Osfield, Project Lead. April 2002.

What is a Scene Graph?

Its a tree! Quite simply one the best and most reusable data structures invented.Typically drawn schematically as root at the top, leaves at the bottom. It all starts with a topmost root node which encompasses your whole virtual world, be it 2D or 3D. The world is then broken down into hierachy of nodes representing either a spatial grouping of objects, setting the position of objects, animating objects,. or define a logical relationship between objects such as to manage the various states of a traffic light.The leaves of the graph represent the phyical objects themselves, the drawable geometry and their material properties.

A scene graph isn't a complete game or simulation engine, although may be one of the main components of such an engine, it's primary focus is representing your 3d worlds, and rendering it efficiently. Physics models, collision detection and audio are left to other development libraries that a user will integrate with.. The fact that scene graphs don't typically integrate all these features is actually a really good thing, it aids interoprability with clients own applications and tools they wish to use and allows them to serve many varied markets from games, visual simulation, virtual reality, scientific and commerical visulasation, training thruogh to modelling programs.


Why use a Scene Graph - Performance, Productivity, Portability and Scalability.

Performance - scene graphs provide an excellent framework for maximize graphics performance. A good scene graph employs two key techinques - culling of the objects that won't be seen on screen, and state sorting of properties such as textures and materials so that all similar objects are drawn together. Without culling the CPU, buses and GPU will all become swamped by many times the amount of data tham they acual require.to represent you work accurately. The hierachical structure of the scene graph makes this culling process.very efficient.with whole town being culled with just a few operations! Without state storting, the the buses and GPU will thrash between states, stalling the graphics and destroying graphisc throughout. As GPU's get faster and faster, the cost of stalling the graphics is also going up, so scene graph are become ever more important.

Productivity - scene graphs take much of the hardwork required to develop high perftomance graphics applications. The scene graphs manage all the graphics for you, reducing what would be thousands of lines of OpenGL down to a few simple calls..Furthermoe, one of most powerfukl concepts in Object Orientated programming is that of object compotsition, enshrined in Composite Design Pattern, which fits the scene graph tree strucutre perfectly which makes it highly flexible and reusable design - in real terms this means that it can be easily adapted it to solve your problems. Scene graph also often come additional utilitie libraries which range for helping users set up and manage graphics windows to import of 3d modes and images. All this together allows the user to achieve a great deal with very little coding.A dozen lines of code can be enough to load your data and create an interactive viewer!

Portability - scene graphs encapsulate much of the lower level tasks of rendering graphics and reading and writing data, reducing or even eradicating the platform specific coding that you require in your own application. If the underlying scene graph is portable then moving from platform to platform can be a simple as recompiling your source code.

Scalability - along with being able to dynamic manage the complexity of scenes automatically to account for differences in graphics performance across a range of machines, scene graphs also make it much easier to manage complex hardware configurations, such as clusters of graphics machines, or multiprocessor/multipipe systems such as SGI's Onyx. A good scene graph will allow the developer to concentrate on developing their own application while the rendering framework of the scene graph handles the differnt underlying hardware configurations.


So what about the OpenSceneGraph project?

The OpenSceneGraph is Open Source, all the source to is published under the GNU Library General Public License (LGPL) which allows both open source and closed source projects to use, modify and distribute it freely as long its usage complies with the LGPL. The project has been developed over the last four years, initliated by Don Burns, and then taken over by Robert Osfield who leads the continues to lead project, there are many other contributors to the library, for a full list check out the AUTHORS file. Both Robert and Don now work on the OpenSceneGraph in a professional capaciity provide consultancy and bespoke developments ontop the library, and are also colloborating on the book.Work on the core scene graph and support of public mailing list remains unpaid as are the contributions of the rest of the communinity, but this hasn't impacted the quality of the source or support which once you get stuck in you grow to appreciate.

The project itself is written entitely in Standard C++ and OpenGL, makes full use of STL and Design Patterns, and leverages the open source development model to provide clean, highly portable, and flexible scene graph. The project is current in alpha, which means parts of the API are still to be developerd, or subjec to change, but the vast majority of the scene graph is there, and a beta will be published within the next few months, wiht a 1.0 release in late summer. Despite the alpha development status, the project has alrady earned the reputation as one of the leading open source scene graphs, and is establishing itself a vialbe alternative to the commericial scene graphs. Numerous companies, university researchers and graphics enthusasts have already adopted their projects, and are from all over the world.


How to learn to use the OpenSceneGraph


Support and discussion - the OpenSceneGraph-news mailing list