Hello Dusten,

From what I understand about OSG's implementation of occlusion culling however, this can't be accomplished with a single, large model used for the static world geometry--as the camera is always within the bounding box.

OSG's culling is hierarchical, so if you organize your scene correctly this will be done automatically. A very flat graph of large numbers of objects is really bad, but a really deep graph is bad too, so you need to experiment.

Say you're making a building, you could build a room, then parent all rooms to form a floor, then parent all floors to form the building, then add the outside walls.

When the viewer is in a room, for example, OSG will start at the top of the graph, see that the bounds of the building as a whole are in view, descend into the floors, cull away any floors whose bounds are not in view, descend into the others, cull away any rooms whose bounds are not in view, and render just the rooms whose bounds are in view (which should hopefully be just the room you're in). It will also cull away things that are behind the viewer or outside their field of view, so walls and furniture behind you will be culled away.

Including your small objects into that hierarchy so that they're parented to the right parent will lower draw times too. However, if you have a very large number of small objects, you will want to cluster them below a common Group parent, so that if the whole group's bounds are not visible then it will be culled in one shot instead of testing each small object's bounds individually. A symptom that indicates you should do that is if your cull times are very high but your draw times are normal. How many small objects to cluster together is a balancing act that you should experiment with, as performance will depend on your hardware and the current bottleneck in your pipeline.

There has been lots said in the past about how to properly balance a scene graph, have a look through the archives. In general, it's called "conditioning" a scene graph, and a scene graph that is badly balanced is also called "badly conditioned", so you might want to search on those terms.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to