menu_bookDocumentation
Clutter System: GPU-Instanced Scattering for Grass, Rocks, and Debris
The s&box Clutter System scatters large amounts of small objects (grass, rocks, debris) with GPU-instanced rendering. It handles placement, streaming, and LOD automatically.
Clutter Definition (Asset)
Create via Asset Browser → Create → Clutter Definition. Configure:
Entries: List of models or prefabs to scatter, each with a Weight controlling selection probability. Use models for static props, prefabs when you need components. Scatterers:| Scatterer | Description |
|---|---|
| Simple | Random placement with density, scale range, ground alignment, height offset |
| Slope | Filters by surface angle — grass on flat, rocks on steep |
| Terrain Material | Places based on terrain layer — flowers on dirt, moss on rock |
ClutterComponent
Add to a GameObject and assign a Clutter Definition:
| Mode | Description |
|---|---|
| Infinite | Streams tiles around camera automatically. Tiles create/destroy as camera moves. Auto-regenerates when terrain changes. |
| Volume | Fixed bounding box. Click Generate to populate. Instances saved with scene. |
Clutter Tool (Editor)
Paint and erase clutter by hand in the editor:
- Paint: Left-click to scatter at brush location
- Erase: Ctrl+click to remove within brush radius
- Opacity: Controls how many candidates are placed (thinning for natural look)
Painted instances persist separately from generated ones and are saved with the scene.
Was this helpful?