Blog

Unreal Engine Performance Optimization: Insights, Nanite, Lumen, Tick

Unreal Engine performance optimization in order: measure with Insights and stat commands, tune Nanite, Lumen and TSR, move tick to C++, fix collision and PSOs.

Unreal Engine Performance Optimization: Insights, Nanite, Lumen, Tick

Unreal Engine performance optimization works best in a fixed order: measure first with Unreal Insights and the stat commands, decide whether you are bound by the game thread, the render thread or the GPU, then tune the rendering features that cost the most (Nanite, Lumen, shadows, scalability and TSR), move heavy Blueprint tick logic to C++, keep collision simple, stream the world with World Partition, and finally remove shader and PSO compilation hitches. In our experience most slow Unreal projects are not slow because of one big mistake. They are slow because nobody measured, so effort went into the wrong thread.

This guide covers each step with the console commands we actually type. Engine facts are as of November 2026, when Unreal Engine 5.8 (released June 2026, which Epic describes as the last major UE5 release on its roadmap) is the current version.

Step 1: Measure Before You Change Anything

Never optimize from a hunch. Open the console in a running game (the tilde key) and start with the cheapest overview:

BashUnreal console
stat fps
stat unit
stat unitgraph

stat unit shows four numbers that decide everything else: Frame, Game (the game thread), Draw (the render thread) and GPU. The largest of Game, Draw and GPU that sits close to Frame is your bottleneck. At 60 FPS a frame has about 16.6 ms; at 30 FPS about 33.3 ms.

  • If Game is the highest, you are game-thread bound: tick, Blueprints, animation, physics, AI.
  • If Draw is the highest, the render thread is busy preparing work: too many visible primitives, draw calls, dynamic shadow casters.
  • If GPU is the highest, the GPU is shading too many pixels or doing too much lighting: Lumen, shadows, translucency, post processing, resolution.

Then narrow it down with more specific stat groups:

BashUnreal console
stat game
stat gpu
stat scenerendering
stat rhi
stat streaming
stat memory

stat gpu breaks GPU time into passes (Lumen, shadow depths, base pass, translucency, post processing), which tells you which rendering feature to tune. stat scenerendering and stat rhi show draw call and primitive counts. For a single-frame GPU breakdown, ProfileGPU (or Ctrl+Shift+Comma in the editor) opens the GPU Visualizer.

Unreal Insights for the Real Answer

Stat commands show averages. Hitches, loading spikes and threading problems need a trace. Unreal Insights ships with the engine (Engine/Binaries/Win64/UnrealInsights.exe on Windows). If Insights is already running when the game starts, it connects to the local trace server automatically. Epic's documentation lists Cpu, Gpu, Frame, Bookmark and Log as the channels enabled by default; add more on the command line when you need them:

BashTerminal
MyGame.exe -trace=default,task,loadtime -statnamedevents

You can also control tracing from the console of a running game:

BashUnreal console
Trace.Start
Trace.Bookmark BossFightStart
Trace.Stop

Trace.File writes to a .utrace file instead of a live session, and Trace.Bookmark puts a named vertical line on the Timing Insights timeline, which makes it easy to find the moment a hitch happened. The loadtime channel feeds Asset Loading Insights, and the memory channel records allocations with callstacks (it is heavy, so turn it on only when you are hunting memory).

Profile a packaged Development or Test build on the slowest hardware you plan to support. The editor and Play In Editor add their own cost, so an editor capture is fine for finding a hot function but not for deciding whether a frame fits the budget. Write the numbers down before every change and measure again after it.

Step 2: Tune Nanite, Lumen, Shadows and Resolution

Unreal 5's headline features are also its most expensive ones.

Nanite Virtualized Geometry

Nanite makes high-polygon static meshes cheap to draw and removes most manual LOD work. In our experience it is the right default for opaque, rigid geometry on modern hardware. Watch for the cases where it is not:

  • Masked and translucent materials, and materials using World Position Offset, cost more with Nanite than plain opaque ones. Check foliage especially.
  • Overdraw from many thin, overlapping meshes still costs GPU time. Use the Nanite visualization modes in the viewport (Overdraw, Clusters, Triangles) to find it.
  • Platforms without Nanite support fall back to the fallback mesh, so set a sensible fallback triangle count if you ship there.

Lumen and MegaLights

Lumen is usually the largest item in stat gpu. Your options, from cheapest win to biggest change:

  • Lower the Global Illumination and Reflections scalability groups before touching individual settings.
  • Use software ray tracing unless you need the quality of hardware ray tracing and your target GPUs handle it.
  • Try the Lumen Medium Quality mode, which arrived in UE 5.8 as a beta. Epic describes it as significantly faster than the higher quality settings and aimed at handhelds, lower-spec hardware and high frame-rate targets.
  • For a game with static lighting, baked lighting is still the cheapest option. Not every project needs dynamic global illumination.
  • Many shadow-casting lights are expensive with Virtual Shadow Maps. As of November 2026 Epic lists MegaLights as production ready in UE 5.8, and it is designed for scenes with many dynamic shadowed lights, so measure it against your current setup.

Scalability and TSR

Scalability groups are the fastest way to find which feature is costly. Each group runs from 0 (Low) to 4 (Cinematic), and sg.ResolutionQuality sets the screen percentage:

BashUnreal console
sg.ShadowQuality 2
sg.GlobalIlluminationQuality 2
sg.ReflectionQuality 2
sg.PostProcessQuality 2
sg.EffectsQuality 2
sg.FoliageQuality 2
sg.ViewDistanceQuality 2

Drop one group at a time and watch stat gpu. The group that saves the most milliseconds is where your quality trade-off lives. Then set your defaults per platform in the scalability ini files instead of leaving every player on Epic.

Temporal Super Resolution (TSR) lets you render at a lower internal resolution and upscale. It is the default anti-aliasing method in new UE5 projects. Lowering the render resolution is often the single largest GPU saving, because Lumen, shadows and post processing all scale with pixel count:

BashUnreal console
r.AntiAliasingMethod 4
r.ScreenPercentage 70

The trade-off is honest: TSR costs some GPU time itself and can show ghosting or softness on fast motion and thin details. In our experience 65 to 75 percent internal resolution with TSR looks better than native resolution with lower Lumen quality, but check it in your own game.

Step 3: Move Heavy Tick Work from Blueprints to C++

When stat unit says Game is the bottleneck, the usual cause is tick. Every actor and component that ticks costs something every frame, and Blueprint graphs cost more per node than equivalent C++ because each node goes through the Blueprint virtual machine.

What we recommend:

  • Turn tick off by default. In C++ set PrimaryActorTick.bCanEverTick to false in the constructor; in Blueprints untick Start with Tick Enabled in Class Defaults. Enable tick only on the actors that need it.
  • Prefer events and timers over tick. Overlaps, input, damage and gameplay messages should drive logic, not a check every frame.
  • Use a tick interval for logic that does not need every frame. An enemy's perception check every 0.2 s is usually indistinguishable from every frame.
  • Move loops, math and per-frame work over many actors to C++, and keep Blueprints for high-level flow, tuning and content. A Blueprint ForEach over hundreds of actors on tick is the classic case.
  • Avoid Get All Actors Of Class and similar searches on tick. Cache references when actors spawn, or keep a registry in a subsystem.
  • Use one manager that ticks a list of lightweight objects instead of hundreds of ticking actors, when you have many simple entities.
  • For skeletal meshes, use Update Rate Optimization and set Visibility Based Anim Tick Option so off-screen characters do not evaluate full animation.

In Insights, look at the game thread timeline with -statnamedevents enabled: the expensive Blueprint functions and actors show up by name. Fix the top three, then measure again.

Step 4: Keep Collision Simple

Physics cost grows with collision complexity. A 50,000-triangle mesh does not need a 50,000-triangle collider.

  • Use simple collision (boxes, spheres, capsules, convex hulls) for anything that moves or that traces hit often.
  • Avoid Use Complex Collision As Simple on dynamic objects. Reserve complex collision for static level geometry where you need exact traces, and even then consider a dedicated simplified mesh.
  • Set collision presets so channels that never interact ignore each other, and set No Collision on purely visual meshes (decoration, distant props, small debris).
  • Turn off Generate Overlap Events on components that do not need them; overlap updates on moving components add up.
  • Give line and shape traces the narrowest channel and the shortest distance that works.

Check what you have with the collision view:

BashUnreal console
show collision
stat collision

Step 5: Stream the World with World Partition

Large worlds are mostly a streaming and memory problem. World Partition splits the level into a grid and loads cells around the player; HLODs replace distant cells with simplified proxies.

  • Set loading ranges per grid deliberately. A huge loading range defeats the purpose and keeps too many actors in memory.
  • Build HLODs for distant content, so the horizon draws as a few cheap meshes instead of thousands of actors.
  • Use data layers for content that only exists in some states (quests, seasons, destroyed versions).
  • Spread spawning and heavy BeginPlay work over several frames. Streaming in a cell that runs expensive BeginPlay on hundreds of actors is a common hitch.
  • For memory, run memreport -full on a packaged build and look at textures and meshes first. Texture streaming pool overflow shows up in stat streaming.
BashUnreal console
wp.Runtime.ToggleDrawRuntimeHash2D
stat streaming
memreport -full

Step 6: Kill Shader and PSO Hitches

A game can average 120 FPS and still feel bad if it stutters the first time an effect appears. On DirectX 12 and Vulkan the cause is often a pipeline state object (PSO) compiled on demand during play.

  • PSO precaching is enabled by default through r.PSOPrecaching. It collects and compiles likely PSOs asynchronously when components load, and by default delays drawing a component until its PSOs are ready, which trades a brief pop-in for no hitch.
  • Use r.PSOPrecache.Validation to log PSOs that precaching missed, then fix those cases or record them.
  • For the remaining misses, a bundled PSO cache recorded by playing a build covers PSOs that precaching cannot predict.
  • Keep material permutations under control. Every static switch, usage flag and quality level multiplies shader variants, compile times and the PSO count.
  • Use the Shader Complexity view mode to find materials that are too expensive per pixel, especially on large translucent surfaces.
BashUnreal console
r.PSOPrecache.Validation 2
viewmode shadercomplexity

Test hitches on a clean machine or with the driver cache cleared; your own development machine has usually compiled everything already.

The Unreal Engine Performance Optimization Checklist

  1. Set a frame budget and profile a packaged build on the slowest target hardware.
  2. Use stat unit to decide between game thread, render thread and GPU.
  3. Capture an Unreal Insights trace and bookmark the moments that hitch.
  4. Read stat gpu and tune the most expensive pass: Lumen, shadows, translucency, post processing.
  5. Check Nanite overdraw and masked or WPO materials.
  6. Try lower scalability groups one at a time, and TSR at a lower screen percentage.
  7. Disable tick by default, use timers and events, and move hot loops to C++.
  8. Replace complex collision with simple shapes and prune collision channels and overlap events.
  9. Set World Partition loading ranges, build HLODs, and spread spawn work across frames.
  10. Validate PSO precaching, record a bundled cache for misses, and reduce material permutations.
  11. Measure again and keep the numbers with the commit.

Let an AI Agent Run the Tedious Audits

Many of these steps are mechanical: find every actor that ticks, every moving mesh with complex collision, every component that generates overlap events, every light that casts dynamic shadows. That is work an AI agent connected to the editor does well.

AI Game Developer for Unreal (ai-game.dev/engines/unreal) is a free editor plugin that connects agents such as Claude Code, Codex or the App's built-in agent to the live Unreal Editor. The agent can run console commands and CVars with the console-run-command tool, read the editor log through the RQL console source, query actors, components and their properties with RQL, take viewport screenshots, and write Python that runs immediately inside the open editor to act on the level. It can also edit and compile your C++, so moving a Blueprint tick function to C++ is a task it can do and verify with the compiler. RQL reaches World Partition actors that are not loaded, which matters for audits of large worlds. The full tool list is at ai-game.dev/docs/tools/unreal, and the query language is described at ai-game.dev/docs/rql.

RQL also keeps these audits cheap: one query replaces dozens of tool calls, which cuts the tokens an agent spends on engine data; the benchmark is at ai-game.dev/docs/rql. How we cut the token cost of our engine CLIs is in ai-game.dev/blog/cli-for-ai-agents-fewer-tokens.

Keep the decisions yours. The agent can find and fix the obvious problems quickly, but whether a scene should trade Lumen quality for frame rate is a design call. Download the app at ai-game.dev/download.

More from the blog

All posts