The 3D Handbook
Key term

Mesh distance fields

A volume texture that stores, for each cell, the distance to the nearest surface of a mesh; Unreal uses them for soft shadows, ambient occlusion and Lumen's software ray tracing.

lightingrenderingunrealoptimisation

A mesh distance field is a 3D texture baked for a mesh in which every cell stores how far it is from the mesh's nearest surface. Epic's documentation calls it a signed distance field (SDF): "It works by storing the distance to the nearest surface in a volume texture", with positive values outside the mesh and negative values inside (Unreal Engine Documentation: Mesh Distance Fields). Because a ray can safely jump forward by the stored distance without hitting anything, distance fields make tracing rays through a scene far cheaper than testing triangles.

#What they are used for

In Unreal, mesh distance fields power several systems (Unreal Engine Documentation: Mesh Distance Fields; Unreal Engine Documentation: Lumen Technical Details):

The Global Distance Field is "a low-resolution Distance Field" that follows the camera, built by compositing every mesh's field into "a few volume textures centered around the camera, called clipmaps" (Unreal Engine Documentation: Mesh Distance Fields). Lumen's scene built from it covers 200 m from the camera by default, extendable to 800 m (Unreal Engine Documentation: Lumen Technical Details).

A grid of cells, each with a number. Cells outside a black rectangle have positive distances that grow away from it; cells inside have negative values shaded orange. The black outline marks distance zero.
A 2D slice of a signed distance field. Rays step through the grid by the stored distance; a wall thinner than one cell has no inside cells and can be stepped over.Diagram by the handbook author

#Resolution and memory

Quality depends on the resolution of each mesh's volume texture, set with Distance Field Resolution Scale in the Static Mesh Editor (Unreal Engine Documentation: Mesh Distance Fields). "The maximum size volume texture any single mesh can have is 8 megabytes with a resolution of 128x128x128" (Unreal Engine Documentation: Mesh Distance Fields), and the editor shows each mesh's size in the viewport corner.

#Limitations and artefacts

Epic lists the main ones (Unreal Engine Documentation: Mesh Distance Fields; Unreal Engine Documentation: Lumen Technical Details):

#In other engines

Godot 4 has a related technique, SDFGI (signed distance field global illumination), described on global illumination. The idea is shared: approximate the scene with distances, then march rays through it.

Related: global illumination, real-time lighting, ambient occlusion.

#Further reading and watching

References

  1. Epic Games · Mesh Distance Fields · Unreal Engine Documentation, 2026 · docs · accessed 2026-10-21
  2. Epic Games · Lumen Technical Details · Unreal Engine Documentation, 2026 · docs · accessed 2026-10-21
  3. Epic Games · Lumen brings real-time global illumination to Fortnite Battle Royale Chapter 4 · Unreal Engine Tech Blog, 2023 · article · accessed 2026-10-21
  4. Christopher Harper · Indiana Jones and the Great Circle requirements may put your PC in a museum · Tom's Hardware, 2024 · article · accessed 2026-10-22

Last updated 2026-10-22