Textures & lighting

Lightmap Resolution Calculator

Direct answer

Lightmap resolution follows from surface area and how coarse your shadows may be. Take the square root of the mesh's area in square metres and multiply by texels per metre: a 60 m2 mesh at one texel per 32 cm needs a 39 px lightmap, rounded up to 40 because Unreal requires a multiple of four.

m2

The area of the faces that receive baked light, not the bounding box.

cm per texel

Lower is sharper and more expensive. 32 cm is a sane default for architecture.

Result

Lightmap resolution to set
px
Exact requirement before rounding
px
Next power of two
px
Detail you actually get
cm per texel
Sanity check

Method & assumptions

How this is worked out

A lightmap is a square texture stretched over every lit face of the mesh. If the mesh has area A square metres and you want d texels per metre, you need A x d² texels in total, so the square's edge is d x sqrt(A).

Texels per metre is just 100 / cm per texel. Unreal requires the final value to be a multiple of four, so the result is rounded up; the calculator then tells you the detail that rounding actually bought you.

Surface area means the lit faces. Using the bounding box instead is the single most common reason lightmaps come out blurry on one mesh and wasteful on another.

Where to start, by what the mesh is

Meshcm per texelWhy
Hero interior, close-up architecture8 – 16Contact shadows stay readable
General walls, floors, ceilings24 – 32The usual working default
Large exterior structures48 – 64Seen from a distance, shadows are soft anyway
Terrain and background geometry100 – 200Only broad ambient occlusion survives here
Small props16 – 32Or drop baked light entirely and let them take dynamic

Above roughly 1024 px per mesh you are usually better off splitting the mesh than raising the resolution: build times climb with the square of the edge length.

Questions

What lightmap resolution should I use in Unreal Engine?

Start from detail, not from a number. Pick a target of roughly 32 cm per texel for general architecture, feed the mesh's lit surface area into the formula, and let it produce the resolution. That way a 4 m2 prop and a 400 m2 building both get shadows of the same sharpness.

Why does Unreal want a multiple of four?

Lightmaps are packed and compressed in 4x4 blocks like any block-compressed texture. A value that is not a multiple of four gets padded up anyway, so you would pay for memory you do not use.

Should I still bake lighting at all?

For anything static that has to run on a wide hardware range, yes. Baked lighting is still dramatically cheaper at runtime than a fully dynamic global illumination solution, and the two mix perfectly well in the same level.