Table of Contents

Density


Per-prototype density settings on BRG Prototype Extra Data. These control runtime density scaling and GPU-side distance-based density culling for individual prefab types.

Global Density Scaling

Property Type Default Description
Enable Global Density Scaling bool false Allows this prototype to participate in runtime global density scaling via BRGRenderer.SetGlobalDensity().

Distance Density

Property Type Default Description
Enable Distance Density bool false Enables GPU-side per-instance density culling for this prototype. Instances are randomly thinned based on distance or screen size.
Min Fraction float (0–1) 0 Minimum proportion of instances kept at maximum distance. 0 = cull all at max distance; 0.3 = keep 30%.
Fade Width float 0.05 Fade band width for smooth transitions. Only editable when the prototype has a stateless crossfade mode set (see below).
Distance Density Mode enum ScreenSize Screen Size — density based on screen-space size (consistent with LOD).
Raw Distance — density based on world-space distance (more predictable for ground cover).
Screen Size Mode —— —— ————————
Start Screen Size float (0.1–10%) 2% Screen size percentage above which full density is maintained. Only shown in Screen Size mode.
Distance Mode —— —— ————————
Start Distance float 50m Distance below which full density is maintained. Only shown in Raw Distance mode.
End Distance float 150m Distance at which minimum density is reached. Only shown in Raw Distance mode.

Density Fade Behavior

Distance density uses the prototype's LOD crossfade mode for fade transitions. The crossfade mode is determined by whichever LOD system is active on the prototype: LOD Group, Min Screen Size culling, or Mesh LOD.

  • Stateless Crossfade — the Fade Width field controls the fade band width. For screen-size mode this is a screen-size fraction; for distance mode this is a density fraction.
  • Animated Crossfade — fade transitions use the animated crossfade duration automatically. The Fade Width field shows the fade duration in seconds.
  • No crossfade mode — density-culled instances snap in and out with no fade. The inspector shows a help box recommending you set a crossfade mode via LOD Group, Min Screen Size culling, or Mesh LOD.

For more details, see Dynamic Density.