In this lesson, you will learn how to use deferred decals to project non-destructive weathering and fine geometric detail onto complex surfaces without increasing your base mesh draw calls.
Understanding Deferred Decals
Unlike standard material layers that wrap around a mesh’s UVs, deferred decals act as a projection volume. When you place a Deferred Decal actor in your scene, Unreal calculates the intersection between the decal's "cube" volume and the underlying geometry. The engine then overwrites the G-Buffer data—specifically the Base Color, Roughness, and Normal channels—within that volume. This is highly efficient because the decal is rendered as a single quad per affected surface area during the lighting pass, rather than modifying the actual geometry or creating unique textures for every prop.
The Decal Material Setup
To create a weathering effect, such as a grime or rust patch, you must first change the Material Domain in your Material Editor to Deferred Decal. Additionally, ensure the Blend Mode is set to Translucent and the Decal Blend Mode is set to DBuffer Translucent Color, Normal, Roughness.
If you want to project a realistic rust patch that modulates the surface, your graph should look like this:
// Example of blending a rust texture with the existing surface normals
// The Decal calculates the intersection, and we sample our rust texture
float3 RustNormal = TextureSample(RustNormalMap, UVs);
float Mask = TextureSample(GrimeMask, UVs).r;
// Output to the Decal Normal pin
return lerp(float3(0, 0, 1), RustNormal, Mask);
Pro Tips for Fidelity
- Normal Blending: When projecting intricate weathering, always use the
DBuffersettings. This allows the decal to influence the surface normals, which is vital for making "painted-on" grime look like it has physical thickness under Lumen’s indirect lighting. - Culling: Because decals are projected, they can cause "flickering" or "stretching" on very sharp corners. Use the
Decal Sizesettings to keep the projection volume tight to the target geometry to avoid unnecessary rendering calculations. - Lumen Integration: Since decals modify the G-Buffer, Lumen treats them as part of the surface. This means your projected grime will correctly receive bounced light and cast shadows, maintaining the visual fidelity of your lighting setup.
Key Takeaway: Deferred decals allow you to layer weathering and intricate details globally across your level while maintaining high-performance budgets by avoiding expensive, redundant mesh-based UV overlays.