Course contentsShow
← Unreal Engine Game Development
Lesson 799 of 88011. Performance Profiling and OptimizationFree lesson

Optimizing Global Illumination with Lumen Settings

Adjust Lumen quality settings and surface cache updates to balance high-quality lighting with the target frame rate requirements.

In this lesson, you will learn how to fine-tune Lumen’s internal settings to achieve high-fidelity lighting without sacrificing your target frame rate.

Lumen provides incredible real-time global illumination, but its default quality is often too taxing for production performance targets. The key to optimization lies in shifting the workload away from per-frame tracing and managing how the "Surface Cache" represents your scene geometry.

Adjusting Lumen Quality

You can control the computational intensity of Lumen using console commands. If you are struggling with GPU overhead, the first step is to downsample the Lumen scene or reduce the reflection quality. Use r.Lumen.DiffuseIndirect.DownsampleFactor to render indirect lighting at a lower resolution, effectively cutting the number of rays traced per pixel.

For high-performance scenarios, lowering the r.Lumen.Reflections.MaxRoughnessToTrace can prevent the engine from spending expensive ray-tracing cycles on surface reflections that provide negligible visual value.

Managing the Surface Cache

Lumen relies on a "Surface Cache"—a series of cards placed around your meshes that capture lighting data. If your scene has too many complex meshes, the Surface Cache becomes bloated, causing significant memory and performance hits.

To optimize this:

  1. Simplify Mesh Cards: Use the Lumen Scene view mode to visualize how your assets are being represented. If a mesh has thousands of tiny, unnecessary cards, manually adjust the Card Settings in the Static Mesh Editor.
  2. Limit Updates: You can throttle the cost of updating this cache by adjusting r.Lumen.Scene.SurfaceCache.MaxUpdatesPerFrame. If your scene is mostly static, decreasing this value ensures the engine doesn't attempt to re-render the entire cache every frame, smoothing out performance spikes.

Implementation Example

To implement a performance profile for a specific low-end target, you might execute the following in your Scalability.ini or via a runtime Blueprint command:

; Reduce reflection trace quality for performance
r.Lumen.Reflections.Quality=2
; Lower the number of surface cache updates to save GPU cycles
r.Lumen.Scene.SurfaceCache.MaxUpdatesPerFrame=16

By balancing these settings, you allow the engine to maintain the "Lumen look" while ensuring the GPU budget remains intact.

Key Takeaway: Optimization in Lumen is a trade-off between the resolution of the Surface Cache and the frequency of ray-tracing updates; always prioritize reducing card complexity before lowering overall light quality.