Scene Graph Features
The SceneGraph provides complete support for rendering geometry, materials, lights, and textures (multiple textures per surface.) Traversal mechanisms provide for rendering and visibility culling. Users can develop new traversals. The 3D rendering API has been abstracted out to permit swapping the rendering engines out. A library of geometry importers are provided to help get data into the SceneGraph, but all of the geometry can also be created programmatically. Finally, it is light weight.

A tank with texturing and lighting read in from GEO format.

Concepts
The Scene Graph is based on the generic concept of multiple nodes linked together in the form of a hierarchical graph, which is traversed, culling out nodes out of sight, and rendering those in sight. Animation behaviors can be added to nodes in the graph and those animation behaviors can be driven by real-time communication mechanisms.

The Scene Graph project consists of the following main areas:

  • Nodes
  • Traversals
  • Renderers
  • Behaviors
  • Communications
  • Loaders
  • Makers
  • Support

A simple model read in from AC3D format. (One of the earliest model loaders.)
Nodes
Nodes are the building block in the Scene Graph. The base node class provides all the scene graph structure logic (adding children, getting the children, etc.) and other basic common node functionality such as storing and requesting computation of the bounding spheres. Examples of supported nodes a billboards, BSP, GeoSets (groups of renderable primitives), groups, LODs, Lights, ROAM terrain, SkyDomes, Switches, etc.

Geosets
Geosets are one of the most important node types. They are the base of most of the drawable nodes in the Scene Graph. Originally from Performer, then Cosmo3D, Geosets are an idea that was worth borrowing, as they permit quite a level of flexibility as a base class for many other primitive types. My implementation resembles the one put forth in Cosmo3D.

Geoset rendering is optimized by being broken down into all of the cases for permutations of colors, normals, texture coords per vertex, per primative, and per set. Optimal mechanisms for submitting the given permutation to the graphics hardware can then be implemented.

Traversals
Traversals are the heart of getting interesting things done in the Scene Graph. The Traversal mechanism is a generic mechanism which is then specialized for specific tasks. Traversals are used to cull and render the scene. Intersection traversals also are provided and are used by the "Terrain Follow" object.

Renderers
The rendering engine is encapsulated, permitting any engine to be added provided it supports the necessary basic rendering capabilities. The current engine is based on OpenGL, and a Direct3D version will most likely be added at some point.

The OpenGL renderer has been optimized to handle various permutations of attributes specified on a GeoSet, without wasting precious cycles.

Behaviors
The Scene Graph supports the concept of "Behaviors." These are animation behaviors that can be attached to each node. The animation behaviors can alter the rendering of the given node and its sub-children. Examples include the simple display behavior of rotating object, or the more advanced concept of altering an animation variable that subsequent animation behaviors will use. Many mathematical expression behaviors are available to allow computing new values.

Communications
As described in the Behaviors section, the Scene Graph supports the concept of animation variables which can be used to drive animations and compute additional animation variable values. The source of these variables can be built-in variables, such as frame number, elapsed time, etc or external communications mechanisms.

The Scene Graph has built-in support for the following communications mechanisms:

  • Shared Memory
  • TCP/IP Networking
  • UDP Networking
  • Data Files
These communication mechanisms can be easily connected to drive the animation variables and hence the animation. For more illustrations on this concept, see the GeoReal application link on the left side.

Loaders
A Scene Graph requires data. Though the Scene can be generated using the programmatic APIs, the truly interesting scenes come when it can load existing model formats. Loaders for the Scene Graph are independent entities that can be added when necessary. They use the exposed programmatic APIs of the main Scene Graph libraries to achieve their loading.

I add importers as necessary to get data for some of the features of the scene graph. Currently, it supports GEO, AC3D, PLY, DEM, and Heightmaps. GEO is the main format because it is Open, supports real-time model designs, supports animation behaviors, and GEO can import from a few other key formats (OpenFLT and 3DStudio.)

Makers
Makers are convenience classes. They know how to build specific types of geometry for the developer. They build the geometry out of the supported GeoSets. Examples are an ellipsoid maker, which will build ellipsoids using triangle strip GeoSets. Strategy objects are supplied to the makers to allow the user to control facets of the making process such as texture coordinate generation. Some future makers will include ones for making aircraft instruments (attitude indicates, compasses, HUDs, etc.) You can see my vis sim background showing through. Typically, the Makers would be replaced by modeling packages, but are a convenience at this time.

Support Objects
There are a number of supporting objects in the Scene Graph libraries. They range from Math objects, intersection objects, optimization objects, to display helper objects.

The 3D math library currently supports vectors, matrices and quaternions. Additional 3D object support is included for bounding boxes, bounding spheres, cameras, rays, viewports, materials, textures, delauney triangulations, triangle strip builders, terrain following, stats overlays, and depth complexity display.

glenn@raudins.com