SkeletalMesh LOD Hysteresis is Incorrectly Evaluated When LODBias Is Non-Zero

Summary

Skeletal Mesh LOD hysteresis is incorrectly evaluated when a non-zero LODBias is applied. The hysteresis comparison uses the bias-adjusted rendered LOD (GetLOD()), while the LOD threshold table and loop index are in asset LOD space. This causes incorrect LOD transition boundaries and disables or alters the expected hysteresis dead band.

What Type of Bug are you experiencing?

Rendering (Graphics / Niagara)

Steps to Reproduce

  1. Create or use a Skeletal Mesh asset with at least 3 LODs.

  2. Configure LOD 2 with the following settings:

    • Screen Size: 0.35
    • LODHysteresis: 0.05
  3. Ensure the Skeletal Mesh Component uses automatic LOD selection (no Forced LOD or other overrides).

  4. Set a non-zero LOD bias:

    r.SkeletalMeshLODBias 1
    

    Alternatively, configure a non-zero per-component RuntimeLODBias.

  5. Place the Skeletal Mesh in a scene and move the camera toward and away from the mesh, repeatedly crossing the LOD 2 transition boundary.

  6. Observe the LOD transitions and compare the behavior with LODBias set to 0.

  7. Repeat the test with LODBias values of -1, 0, and +1.

Expected Result

LOD hysteresis should behave consistently regardless of the applied LODBias.

The hysteresis dead band should remain effective when transitioning between LODs, with the transition thresholds correctly accounting for the configured LODHysteresis value.

Changing LODBias should only shift the selected rendered LOD level, without affecting the hysteresis evaluation or transition behavior in asset LOD space.

With LOD 2 configured as:

  • Screen Size: 0.35
  • LODHysteresis: 0.05

The expected hysteresis behavior should remain identical for LODBias = -1, 0, and +1.

Observed Result

When LODBias is non-zero, LOD hysteresis is evaluated incorrectly because the current LOD state returned by GetLOD() is bias-adjusted, while the LOD threshold table and loop index are in asset LOD space.

As a result, the hysteresis dead band is altered or effectively disabled:

  • LODBias = 0: Hysteresis behaves as expected.
  • LODBias = -1: The hysteresis adjustment is skipped for certain transitions, causing LOD transitions to occur earlier than expected.
  • LODBias = +1: The hysteresis adjustment is applied on both transition directions, causing the expected dead band to collapse.

In the reproduction case (LOD 2 Screen Size = 0.35, LODHysteresis = 0.05), the transition behavior no longer respects the configured hysteresis when LODBias is non-zero.

The same issue appears to affect both:

  • FSkeletalMeshObject::UpdateMinDesiredLODLevel
  • FSkeletalCompositeMeshObject::InnerUpdateMinDesiredLODLevel

Affects Versions

5.8

Platform(s)

Windows