Moving Objects & Exclusions
intermediate conceptsTwo of the volume's layer masks decide which objects the effect follows and which it leaves alone. For a single object, one component does the same job and more: see Object Settings.
Keeping dirt attached to moving objects
The patterns are placed in world space, so a moving object slides under its dirt unless you anchor it. Two ways to fix it:
- Anchor Layers: pick layers in the volume override and every object on them is anchored. Best when you have many movers that already share a layer.
- Global Dirt Object with Anchor Dirt on: add it to the moving object (Component / Effects / Global Dirt Object). Best for a handful of props, and it can cover a whole hierarchy through its Include setting.
Anchored objects are drawn one extra time to record their positions, so keep the set small: anchor what moves, not the whole scene. Static geometry does not need any of this.
Keeping objects clean
Set Excluded Layers in the volume override and objects on those layers receive no effect at all. The Rendering Layer Filter refines the selection with each renderer's Rendering Layer: an object must match both the layer mask and the rendering layer mask to be excluded.
For individual objects, use Exclude From Global Dirt on a Global Dirt Object instead. It reaches whatever its Include setting covers, so one component on a root can clean a whole prop.
To keep a whole camera clean, such as a first person weapon camera, use the Cameras Layer Mask on the renderer feature instead: cameras outside the mask never run the effect, which is cheaper than masking their objects.
Layer exclusion uses each shader's depth and normals pass. Standard URP shaders all have it. If a custom shader lacks it, that object cannot be excluded that way, and the inspector lists the offenders under the setting so there is no guessing.
Unlit materials on the Deferred path
On Deferred rendering, materials that skip the GBuffer (unlit and other forward-only shaders) are not touched by the normal pass. If you want them aged too, add their layers to Forward Only Layers and they get the effect in an extra pass. That pass has no GBuffer to read, so it has no surface normals, no occlusion and no metalness: placement that depends on orientation is simplified for those pixels, and metal aging and rust use the same approximation as Forward, so they reach those objects whether they are metal or not. Leave it empty for no extra cost. Transparent materials can never receive the effect on any path.
Overlay cameras
Overlay cameras in a camera stack are never processed. This is intentional: first-person arms, tools and UI props should not inherit the grime of the scene behind them.
Suggest an improvement
Help us improve this documentation page.