LOD

Inherits: Spatial < Node < Object

Provides discrete level of detail.

Description

Automatically hides and shows Spatial children depending on the distance from the closest Camera to the LOD node. Child nodes that don't inherit from Spatial are ignored by the LOD system.

Children are shown in order with the first children shown when closest to the Camera, and the latter children shown when further away.

The threshold distances for changes are determined by Spatial.lod_range.

For example, a first child with a range of 2 will be shown from distance 0 to 2. A second child with a range of 5 will be shown from distance 2 to 7, etc.

Properties

float

hysteresis

1.0

int

lod_priority

0


Property Descriptions

float hysteresis = 1.0

  • void set_hysteresis ( float value )

  • float get_hysteresis ( )

To prevent flickering at borders, a hysteresis distance will be added to threshold distances when the object is moving away from the Camera.


int lod_priority = 0

  • void set_lod_priority ( int value )

  • int get_lod_priority ( )

Determines the rate at which level of detail will be updated.

Higher priorities will update faster, but use more CPU.