Short Contents

7.13 Level of Detail

Level of detail gives the ability to specify several definitions of the same model, letting the renderer select an appropriate definition considering the size of the model in the rendered image and some user guidance. LOD can be thought of as being a mipmapping algorithm that works on geometry instead of textures.
As an example, to render a forest of trees, one might specify two tree models: a complex one with detailed structures and leaves and a simpler one with only the basic structures and fewer (and most probably bigger) leaves. The renderer is able to "cross-fade" between the provided models so that the transition between two different levels of detail remains smooth. As with other features (such as motion blur and depth of field), level of detail quality depends on the oversampling used (specified using RiPixelSamples): the higher the oversampling the smoother the transtion between detail levels will be.
When used correctly, level of detail can provide signficant savings in terms of memory use and rendering time; it is important however to get things right:

  1. Only use level of detail for complex models that can be visualized at different sizes. Crowds, hair patches and trees are good candidates for level of detail rendering.
  2. Specify a correct bounding box with RiDetail. This enables the renderer to estimate correctly which model is needed for a particular screen size(59).
  3. Use procedurals (such as RiDelayedReadArchive) to specify the models. This avoids loading models that are not needed for some particular detail level:
    AttributeBegin
      Detail -1 1 -1 1 -1 1
    
      DetailRange 0 0 10 20
      Procedural "DelayedReadArchive" ["tree-simple.rib"] [-1 1 -1 1 -1 1]
    
      DetailRange 10 20 120 130
      Procedural "DelayedReadArchive" ["tree-medium.rib"] [-1 1 -1 1 -1 1]
    
      DetailRange 120 130 1e38 1e38
      Procedural "DelayedReadArchive" ["tree-complexe.rib"] [-1 1 -1 1 -1 1]
    AttributeEnd
    
  4. Transitions between levels of detail must be as fast as possible. This means that values provided by different RiDetailRange calls should have small overlapping windows. Large overlapping windows forces the renderer to keep two model definitions in memory in order to "cross-fade" between them. Of course, abrupt transitions may cause undesirable geometry "pops" in animation so a fine balance is required.
Note

Different levels of detail can have different rendering attributes. This means that costly resources (such as displacement maps) can be stripped off the lower detail models.

3Delight 10.0. Copyright 2000-2011 The 3Delight Team. All Rights Reserved.