Click or drag to resize
DigitalRuneLevel of Detail

The content pipeline supports models with multiple levels of detail (LODs).

This topic contains the following sections:

LOD models

A model may contain objects with multiple levels of detail (LODs). A level of detail (LOD) can be represented by a single node (typically a mesh) or a tree of nodes. LODs can even be nested, i.e. a LOD may contain other objects with multiple LODs.

LODs are identified by name. The nodes that represents the LODs need to have the suffix "_LODi" where i is the LOD index. By definition "_LOD0" is the highest LOD (max detail) and "_LOD1", "_LOD2", etc. are lower LODs (less detail). The DigitalRune model content processor reads the LODs and groups them into a LodGroupNode. The name of the LOD group node is the same as the name of the LODs (without the suffix).

The LOD distances for each LOD can be specified in the model description.

Example

The model "Barrel.fbx" contains 3 meshes "Barrel_LO0", "Barrel_LOD1" and "Barrel_LOD2". The content processor automatically creates a LodGroupNode called "Barrel" with 3 LODs. The LodGroupNode replaces "Barrel_LOD0". "Barrel_LOD0", "Barrel_LOD1" and "Barrel_LOD2" are removed from the scene. (But they are still accessible at via LodGroupNodeLevels.)

Barrel-LOD
Figure: Model "Barrel.fbx"

The LOD distances are specified in the model description file:

Barrel.drmdl
<?xml version="1.0" encoding="utf-8"?>

<Model File="Barrel.fbx" RotationX="-90" MaxDistance="20">
  <Mesh Name="Barrel_LOD0" LodDistance="0" GenerateTangentFrames="True">
    <Submesh Material="Barrel_HighDetail.drmat" />
  </Mesh>
  <Mesh Name="Barrel_LOD1" LodDistance="3" GenerateTangentFrames="True">
    <Submesh Material="Barrel_HighDetail.drmat" />
  </Mesh>
  <Mesh Name="Barrel_LOD2" LodDistance="8">
    <Submesh Material="Barrel_LowDetail.drmat" />
  </Mesh>
</Model>