Density
Per-prototype density settings on BRG Prototype Extra Data. These control runtime density scaling and GPU-side dynamic 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(). |
Dynamic Density
| Property | Type | Default | Description |
|---|---|---|---|
| Enable Dynamic Density | bool | false | Enables GPU-side density culling for this prototype. |
| Min Fraction | float (0–1) | 0.3 | Minimum proportion of instances kept at maximum distance (30% by default). |
| Fade Width | float | 0.05 | Fade band width for smooth transitions. Only editable when the prototype has a stateless crossfade mode set (see below). |
| Dynamic Density Mode | enum | ScreenSize | Screen Size — density based on screen-space size. Distance — density based on world-space distance. |
| Screen Size Mode | —— | —— | ———————— |
| Start Screen Size | float (0.001–1) | 0.1 | 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 Distance mode. |
| End Distance | float | 150m | Distance at which minimum density is reached. Only shown in Distance mode. |
Density Fade Behavior
Dynamic 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.