Click or drag to resize
DigitalRuneRenderContextLodHysteresis Property
Gets or sets the LOD hysteresis, which is the distance over which an object transitions from on level of detail to the next level. (Needs to be normalized - see remarks.)

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public float LodHysteresis { get; set; }

Property Value

Type: Single
The LOD hysteresis. The value needs to be normalized - see remarks. The default value is 0.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionvalue is negative, infinite or NaN.
Remarks

The LOD hysteresis introduces a lag into the LOD transitions. Instead of switching between LODs at a certain threshold distance, the distance for switching to the lower LOD is further away than the threshold distance and the distance for switching to the higher LOD is closer.

Example: The LOD distance for LOD2 is 100. With an LOD hysteresis of 10, the object transitions from LOD1 to LOD2 at distance 105, and from LOD2 to LOD1 at distance 95.

The LOD hysteresis can be set to avoid flickering when the camera is near a threshold distance.

The value stored in this property is a view-normalized distance as described here: GetViewNormalizedDistance(SceneNode, CameraNode). The method GetViewNormalizedDistance(Single, Matrix44F) can be used to convert a distance to a view-normalized distance. The resulting value is independent of the current field-of-view.

Tips: It is recommended to keep the LOD hysteresis tight: When LOD blending (see LodBlendingEnabled) is set, the renderer has to render both LODs during transitions and blend them using screen-door transparency (stipple patterns).

In most games the transition range depends on the average speed of the camera. A fast moving player (e.g. in a racing game) requires a larger LOD hysteresis than a slow moving player (e.g. a first-person shooter).

See Also