Skip to content
Tutorials Center
My learning

Topics

Lesson 35 of 38 ยท Packaging and Performance

Optimization: LODs, Nanite and Streaming

Make your Unreal Engine game run faster. Static mesh LODs, Nanite virtualized geometry, instancing, culling, World Partition streaming, scalability settings and texture streaming explained.

Once you know where the time goes (see Profiling and stat commands), you need techniques to reduce it. Most of them follow one principle: do less work for things the player cannot notice. Far-away objects need fewer triangles, hidden objects need no drawing, and unloaded parts of the world need no memory.

The Unreal Editor is not available on this site, so the techniques are described in words. The Python stand-ins show the arithmetic behind them.

Levels of detail (LODs)

A Level of Detail is a simpler version of a mesh used when it is far away or small on screen. Unreal's Static Mesh Editor can generate LODs automatically (LOD Settings > Number of LODs) with a Reduction Settings percentage per level, or you can import hand-made ones. The engine picks a LOD by screen size: the fraction of the screen height the object's bounds covers.

Python Stand-in: choosing a LOD by screen size

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

LODs also exist for materials (simplify shaders in the distance), skeletal meshes (fewer bones) and Blueprint ticking (tick less often far from the player). Use Screen Size thresholds that match how the asset looks, and avoid visible pops by checking transitions in the viewport (Show > Advanced > LOD Coloration helps).

Nanite

Nanite is Unreal Engine 5's virtualized geometry system. A Nanite mesh stores a hierarchy of clusters of triangles, and each frame the GPU streams and draws only the detail needed so triangles are about pixel-sized. You enable it on a static mesh with Enable Nanite (or when importing). The benefits are huge: millions of triangles per mesh, automatic LOD, no manual LOD authoring, and cost that depends on screen resolution more than scene complexity.

Know the limits:

  • Works on static meshes; skeletal mesh and foliage support has been added in recent versions but check your engine version, and the feature support lists change between releases.
  • Materials that use translucency are not supported in the Nanite pass (they fall back to the normal path); masked materials work but cost more.
  • Nanite has a fixed base cost, so for very simple scenes or low-end hardware it might not pay off.
  • Nanite uses the Nanite visualization modes (Lit > Nanite Visualization) for debugging. Triangle overdraw and clusters can be inspected there.
  • Not every platform supports it; check Project Settings and the target platform's support (it requires modern GPUs and shader model 6).

Instancing

Drawing 10,000 identical rocks as separate Actors is expensive on the CPU (Game and Draw). Instanced Static Mesh Components (ISM) and Hierarchical ISM (HISM) draw one mesh many times with a single draw call, each with its own transform. Use them for foliage, debris and repeated architecture. The Foliage Tool (Shift+3) already uses them. For huge crowds of moving agents, look at Mass Entity.

Python Stand-in: draw calls with and without instancing

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

(Real draw-call counts also depend on materials, shadows and culling, but the order of magnitude shows why instancing matters.)

Culling

The renderer skips things it does not need:

  • Frustum culling: objects outside the camera view are skipped automatically.
  • Occlusion culling: objects hidden behind others are skipped (the engine uses a hardware occlusion method and also a Hi-Z approach).
  • Distance culling: set Max Draw Distance or a Cull Distance Volume (Place Actors > Volumes) to hide small objects at distance. Use per-component settings or Desired Max Draw Distance.
  • Shadow limits: turn off Cast Shadow on small props, and limit Virtual Shadow Map use where needed.

Texture streaming and memory

Textures stream mip levels based on distance and screen size within a texture pool. If the pool is too small, textures look blurry. Use stat streaming and the Texture Streaming Accuracy view mode, and enable Virtual Textures for very large textures or landscape layers. Reduce Maximum Texture Size and set correct LOD Groups (World, Character, UI) in the texture editor.

World Partition and level streaming

For big worlds, World Partition (the default for Open World templates) divides the level into a grid of cells and loads only cells near the player. Key settings:

  • Runtime Grid: cell size and Loading Range.
  • Data Layers: toggleable content sets, for example a quest area.
  • Level Instances and One File Per Actor (OFPA), which lets several people edit the same level without conflicts.
  • HLODs (Hierarchical LODs): merged, simplified stand-ins for distant cells.

Smaller games can use classic Level Streaming with sublevels, loaded by streaming volumes or Blueprint/C++ calls.

Python Stand-in: loading cells around the player

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Scalability settings

Let players pick quality. Scalability groups (sg.ViewDistanceQuality, sg.ShadowQuality, sg.PostProcessQuality, sg.TextureQuality, sg.EffectsQuality, sg.FoliageQuality, sg.GlobalIlluminationQuality, sg.ReflectionQuality) each run from 0 (low) to 3 (epic) or 4 (cinematic). They are applied through console variables defined in DefaultScalability.ini; use Scalability in the console or the editor's Settings > Engine Scalability Settings to try them. In C++, UGameUserSettings exposes these levels to an options menu.

CPU-side wins

  • Turn off Tick for Actors that do not need it (PrimaryActorTick.bCanEverTick = false), or lower TickInterval.
  • Use timers and events instead of polling.
  • Pool frequently spawned Actors (bullets, effects) instead of constantly creating and destroying them.
  • Avoid GetAllActorsOfClass in loops; cache results.
  • Move heavy functions from Blueprint to C++.
  • Use Niagara for effects with a scalability budget and Effect Types that cull distant systems.

Common mistakes

  • Everything Nanite, everything translucent. Know the limits.
  • Hundreds of unique materials. Use instances and atlases.
  • No LODs on skeletal characters in crowds.
  • Optimizing the editor, not the game. Test in a packaged build.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a LOD?

    LODs reduce triangle count for distant or tiny objects.
  2. 2. Which feature lets you draw thousands of copies of one mesh with one draw call?

    Instancing draws many copies of a mesh in a single call.
  3. 3. What does World Partition do?

    World Partition streams grid cells based on distance to the player.
  4. 4. What is a known limitation of Nanite materials?

    Translucent materials fall back to the standard path and cannot use Nanite's pass.

Summary

  • LODs, culling and instancing reduce work for distant or repeated objects.
  • Nanite handles very dense static geometry with automatic detail, but has limits.
  • World Partition and texture streaming keep memory in check in large worlds.
  • Scalability settings and cheaper CPU habits (fewer ticks, pooling, events) round out the toolbox.
  • Always re-measure after each change.

Next: Project: A Collectible Coin Game