In this lesson, you will learn how to fine-tune the Surface Cache resolution to strike the perfect balance between high-fidelity indirect lighting and your project’s memory budget.
Understanding the Surface Cache
When using Lumen, Unreal Engine doesn't calculate Global Illumination (GI) on every individual pixel of your high-poly Nanite geometry in real-time. Instead, it generates a simplified, parameter-mapped representation of your scene called the Surface Cache. This cache stores lighting information for the surfaces of your objects, effectively acting as a low-resolution "light map" that updates dynamically as your scene changes.
If your Surface Cache resolution is too low, you will notice "light leaking" or blurry, blotchy GI on complex surfaces. If it is too high, you consume excessive VRAM, which can lead to stuttering or crashes on hardware-constrained platforms.
Adjusting Resolution
The primary control for this is the r.Lumen.SurfaceCache.CardResolutionScale console variable. This multiplier adjusts the density of the "cards" (the planar patches) Lumen generates for your meshes.
- Default:
1.0(Balanced for general use). - Performance Mode: Use
0.5if you are targeting mobile or hardware with limited VRAM. - High Fidelity Mode: Use
1.5or2.0only for hero assets or architectural visualization where lighting precision is critical.
To inspect how your cards are being generated, navigate to the viewport menu: Show > Visualize > Lumen > Surface Cache. This highlights the resolution and coverage of the cards in your scene. If you see huge, empty gaps or massive overlapping cards, your resolution scaling is likely misconfigured for your geometry density.
Managing Memory Footprint
Beyond global settings, you can optimize individual meshes by adjusting their Lumen Card Settings in the Static Mesh Editor. You can lower the Max Lumen Mesh Cards count to reduce the number of patches generated for complex, non-important background objects. By combining a low Max Lumen Mesh Cards value with an optimized CardResolutionScale, you ensure that the GPU only spends memory on the surfaces that contribute most significantly to your scene’s lighting.
Key Takeaway: Balancing Surface Cache resolution involves minimizing the card count for background geometry while scaling the resolution multiplier only where lighting fidelity is visually critical.