Course contentsShow
← Unreal Engine Game Development
Lesson 552 of 8807. Visual Fidelity and RenderingFree lesson

Profiling Nanite and Lumen Costs

This lesson teaches how to isolate the performance impact of virtualized geometry and dynamic global illumination within complex scenes.

In this lesson, you will learn how to isolate and measure the performance overhead of Nanite’s virtualized geometry and Lumen’s dynamic global illumination using built-in Unreal Engine profiling tools.

When working with modern rendering features, it is easy to assume high frame times are just "the cost of quality." However, you must distinguish between the cost of complex geometry and the cost of complex lighting to optimize effectively.

Isolating Nanite Costs

Nanite offloads geometry rendering to a specialized compute pipeline. To see its specific impact, use the console command r.Nanite.View.Stats 1. This reveals the number of visible clusters and triangles being processed. If you notice a high triangle count in your statistics, check if your objects have excessive Nanite fallback meshes or if you are rendering too many small, non-instanced objects.

To toggle Nanite off entirely to compare the baseline performance without virtualized geometry, use:

r.Nanite.Disable 1

Isolating Lumen Costs

Lumen calculates lighting in real-time, often involving heavy ray tracing or screen-space probes. To determine if your scene is "Lumen-heavy," use profilegpu (or Ctrl+Shift+Comma) to open the GPU Visualizer. Look for the LumenSceneLighting or LumenTracing passes. These will show you exactly how many milliseconds the GPU spends calculating indirect bounces and reflection probes.

To perform a quick A/B test, switch your project's Global Illumination method in the Project Settings or your Post-Process Volume:

r.DynamicGlobalIlluminationMethod 0

Setting this to 0 disables Lumen (None). If your frame rate suddenly jumps, you know your bottlenecks are likely in your Lumen settings—such as using "Surface Cache" for complex geometry or high-cost reflection bounces.

When profiling, always verify your r.Lumen.Reflections.Allow 0 toggle as well; if you are rendering high-resolution glossy surfaces, reflections can often be more expensive than the direct lighting itself. By isolating these two systems, you can determine if you need to simplify your geometry clusters or dial back your light bounce quality.

Key Takeaway: By toggling Nanite and Lumen via console commands and inspecting the GPU Visualizer, you can determine whether your performance bottleneck stems from geometric complexity or high-fidelity real-time lighting calculations.