< Zurück | Inhalt | Weiter >

11.9 Using LOD behaviors

LOD is a mechanism to dynamically modify the rendered geometry in a scene based on the position of the viewer. A LOD behavior performs a function similar to MIPMAPS for texture images (chapter 14) in that it allows you to specify a high−resolution model when the viewer is close up and a number of lower resolution models for when the viewer is farther away.


LOD behaviors are essentially optimizations that you can apply to your scenegraph to ensure that the time spent rendering a frame is spent rendering detail that the user is actually going to see, and should be the focus of their attention. For example, a model of an office building might be dynamically selected based on the viewer approaching the object: first a simple cube, then a texture mapped cube, then a series of stacked texture mapped cubes and finally a full−blown architectural model loaded from a VRML file. It would be very wasteful of CPU and rendering resources to always render the high−detail model of the building—yet the appearance of the lower resolution models is not sufficiently interesting when the viewer is up close, so a LOD behavior allows for a good trade−off of the two considerations.


Current computer games (such as the very visually impressive Black and White by Lionhead) use dynamic LOD algorithms extensively. The ROAM algorithm and Quad−trees are both commonly applied to large−scale interactive 3D terrain rendering. Two good references for adaptive meshes and the ROAM algorithm are
http://www.llnl.gov/graphics/ROAM and http://uo.soex.com/engine/ROAM.php
.

 

DistanceLOD Class
From SplineInterpolatorTest.java