A SERVICE OF

logo

160
Chapter 14: Optimizing Rendering
Culling the View Frustum
View frustum culling eliminates from the rendering list all of those shapes not in the
viewing frustum.
View frustum culling works best if the objects in a csGroup node are close together, for
example, all of the nodes representing a body are linearly hierarchical. When this is the
case, the CULL process only needs to visit the top of the body subgraph. If the body
nodes were distributed horizontally, the CULL process would have to visit at least some
of the other body nodes.
View frustum culling also works best when the csShapes are small compared to the full
database size.
Objects that are roughly the same length in each of the three dimensions cull better than
long, thin objects. An object that spans the database, for example, a beam across the
ceiling of the building, cannot be culled as easily as two halves of the beam. It may be
useful to divide up objects that can be easily divided.
OpenGL Optimizer provides tools to group together in the scene graph nodes whose
shapes close together in world space.
Level of Detail Reduced for Performance
The children of a level of detail (csLOD) node each encapsulate a shape at a different
level of detail. The factor of resolution between children of a csLOD is often one quarter;
so when a lower resolution child replaces the current csLOD child displayed, only one
quarter of the current number of vertices need to be rendered. The maximum reduction
of detail is when all of the vertices of the highest-resolution image are reduced to a single
pixel.
The csLOD (level of detail) node is a subclass of csSwitch. csLOD switches between its
children nodes based on the proximity of an object to the camera.The further a shape is
from the viewer, the less resolution needed to display it. Cosmo switches between the
children automatically, based on range, to display a shape at the correct level of detail.