Density
Per-prototype distance density settings on BRG Prototype Extra Data. Distance density is a GPU-side hash-based thinning ramp that uses the prototype's own crossfade mode for transitions.
For runtime global density scaling (e.g. "thin all grass to 50% on Low quality"), assign a BRG Prototype Group and call
group.SetDensity(). The oldBRGRenderer.SetGlobalDensity()and per-prototype "Enable Global Density Scaling" checkbox have been removed in favor of the per-group system.
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.