Skip to main content
s&box provides several systems for adding visual effects to your scenes: a CPU-simulated particle system, beam effects, decals, indirect light volumes, and the clutter system for scattering large numbers of small objects.

Particle effects

The particle system simulates purely on the CPU but runs in a heavily multithreaded way. This design choice prioritises ease of use and full programmability over GPU simulation. With the particle system you can:
  • Emit particles manually one by one from code
  • Iterate over all active particles and modify their values at any time
  • Write a controller that fully controls each particle on simulate
  • React to particles colliding with the world

Parts of a particle effect

A particle effect is composed of multiple components on the same GameObject.

ParticleEffect

The base component. Holds the list of particles, ticks them, and exposes settings for maximum particle count, lifetime, forces, and collisions.

Renderer

Draws the particles. The most common renderer is ParticleSpriteRenderer, which renders each particle as a camera-facing sprite.

Emitter

Defines how many particles to spawn and at what rate (burst or over time). The emitter also controls the spawn shape and initial velocity. Omit an emitter entirely if you plan to call ParticleEffect.Emit manually.
You can call ParticleEffect.Emit from code at any time to create particles in a bespoke way without using a built-in emitter component.

Beams

Beams render a stretched, line-based visual effect between two points. Add a beam component to a GameObject and configure the start and end points, material, and width.

Decals

Decals project a material onto nearby geometry. Add a decal component to a GameObject and assign a material. The decal is projected along the GameObject’s local forward axis.

Indirect light volumes

Indirect Light Volumes are in Feedback Preview.
An Indirect Light Volume places a grid of light probes throughout a bounding box. At render time the system interpolates between nearby probes to shade each surface point, producing indirect lighting that reacts to coloured light bounces, sunlight spill, and similar phenomena.

Adding an indirect light volume

Add an Indirect Light Volume component to a GameObject in your scene, then position and scale the GameObject to cover the area you want to shade.

Properties

PropertyDescription
Probe DensityHow tightly packed the probes are. Increase for tight spaces. Decrease for large open areas.
Normal BiasPushes sample points away from surfaces. Increase if you see dark speckles or self-shadowing.
ContrastIncreases the punch of bounced light. Higher values crush darks for a more stylised look.
Inside Geometry BehaviourWhether to disable probes detected inside back-facing geometry or push them to a better position. Disabling is preferred; pure relocation can introduce interpolation artifacts.

Best practices

  • Cover key areas without overlapping volumes unnecessarily.
  • Bake after major scene changes.
  • Use low-density probes in open areas and add a second, smaller volume for finer detail in a specific region.
  • Use thick wall geometry where possible. Walls thinner than the probe spacing will leak light through them.
Indirect Light Volumes are not real-time. Baking happens in the editor. Re-bake your scene after significant geometry or lighting changes.

Clutter

The Clutter system scatters large numbers of small objects — grass, rocks, debris — across your scene. It handles placement, streaming, and GPU-instanced rendering automatically.

Clutter Definition asset

A Clutter Definition describes what to scatter and how. Create one from the Asset Browser: Create > Clutter Definition. Entries — a list of models or prefabs to scatter. Each entry has a Weight that controls how likely it is to be selected relative to other entries. Use models for simple static props and prefabs when you need components or behaviours. Scatterer — controls how entries are distributed across the surface:
ScattererDescription
SimpleRandom placement with configurable density, scale range, ground alignment, and height offset. Good for most use cases.
SlopeFilters entries by surface angle. Map different entries to different slope ranges — for example, grass on flat ground and rocks on steep slopes.
Terrain MaterialPlaces entries based on the terrain material at each point — for example, flowers on dirt and moss on rock.
You can implement your own scatterer in C# if you need custom placement rules such as splines, volumes, or texture masks to drive scattering.
Streaming — controls the tile grid used for generation and streaming:
SettingDescription
Tile SizeSize of each generation tile in units (256–4096). Larger tiles mean fewer generation jobs but coarser streaming granularity.
Tile RadiusHow many tiles around the camera to keep populated (1–10). Controls the visible range of clutter.

ClutterComponent

Add a ClutterComponent to a GameObject and assign a Clutter Definition. Choose between two modes:
ModeDescription
InfiniteStreams tiles around the camera automatically. Tiles are created and destroyed as the camera moves. Use this for open-world ground cover.
VolumeGenerates clutter within a fixed bounding box. Click Generate to populate. Instances are saved with the scene.
In Infinite mode, the system automatically regenerates tiles when the terrain underneath them is modified.

Clutter Tool

The Clutter Tool in the editor toolbar lets you paint and erase clutter instances by hand.
  • Paint — left-click to scatter instances at the brush location using the assigned scatterer.
  • Erase — Ctrl+click to remove instances within the brush radius.
Adjust Size and Opacity on the brush. Opacity controls what fraction of the generated candidates are actually placed, letting you thin out placement for a more natural look.
Hand-painted instances are stored separately from generated ones and persist with the scene.