X157 Dev Notes

One simulant attempts to share insight with others.

Mass LOD

The Mass LOD system consists of several different elements working together.

Different Ways to Compute LOD

  1. Proximity to Viewers (regardless of Viewer perspective)
    • Add UMassDistanceLODCollectorTrait to Entity
  2. Visible by Viewers
    • Add UMassLODCollectorTrait to Entity

For any given Entity, choose which type of LOD calculation you want it to use, and add the appropriate LOD Collector Trait.

DO NOT add both traits to a single Entity.

LOD Terms

Hysteresis

A multiplier applied to distances to differentiate between a visible entity moving out of visibility range (where this ratio is applied), as compared to an invisible entity moving into visibility range.

This helps to prevent visibility oscillation at the edge of visible range.

VisibleLOD

Settings used when the entity is visible.

BaseLOD

Settings used when the entity is not visible.

UMassLODDistanceCollectorProcessor

This variant of the LODCollector sets Entity LOD purely based on distance from the Entity to the nearest viewer. It doesn’t care which direction the viewer is looking.

Server Execution logic:

Client Execution logic:

UMassLODCollectorProcessor

This variant of the LODCollector sets Entity LOD based on both distance from the Entity to the nearest viewer and based on the direction the viewer is looking (if the Entity behind the player, even if it’s nearby, it’s Off LOD).

Server Execution logic:

Client Execution logic:

UMassSimulationLODProcessor

Execution logic:

Important Data Types

UMassLODSubsystem

The Mass LOD Subsystem is responsible for determining which players or other actors exist at any given moment. It standardizes information such as their Location, Rotation, Field of View and camera aspect ratio to be used by various Mass processors who need this info.

This hooks into the UMassSimulationSubsystem phase processor to receive callbacks on every PrePhysics phase start. At the start of each PrePhysics phase, the Viewer info is updated.

Important Data Types

LOD Traits

UMassDistanceLODCollectorTrait

This trait marks an Entity to have its LOD computed based ONLY on whether it is in range of any viewer, regardless of whether it is visible.

Requires:

Adds:

UMassLODCollectorTrait

This trait marks an Entity to have its LOD computed based on whether it is visible by any viewer.

Requires:

Adds:

UMassSimulationLODTrait

Requires:

Adds:

Manages Tags: (when bSetLODTags is true)

UMassSimulationLODTrait with bEnableVariableTicking

In addition to the base fragments, when you enable bEnableVariableTicking, this trait also adds: