Skip to main content

Optimization

Optimize after a correct bake exists. This tutorial uses controlled comparisons so you can tell whether a change saved time, reduced data, or simply made the lighting worse.

Bake time, stored lighting size, and runtime frame time are different budgets. Reducing one does not automatically improve the other two.

1 Save a baseline​

Keep a recoverable copy of the level and record:

  • The camera positions and exposure used to compare quality.
  • Bake Mode, Ray Mode, sampling, and approximate bake duration.
  • Lightmap resolution choices and probe bounds/Voxel Size.
  • Memory > Current Level > Refresh results.
  • Runtime frame timing from Unreal's profiling tools on the target device.

Use the same Memory scope for every comparison. A Current Level result is not directly comparable with All Levels. The panel reports lighting estimates, not total GPU memory or a frame-time profile.

Checkpoint: you can return to the original setup and reproduce the view you are evaluating.

2 Identify the expensive part​

SymptomInvestigate first
Iteration bakes take too longVisible bake scope, lightmap resolution, probe count, and ray sampling.
Lighting textures use too much memoryMesh density, bake Resolution Scale, atlas use, and compression.
Probe payload is largeUnused volume space and unnecessarily fine Voxel Size.
Runtime GPU time is highFeature-by-feature timings, fog grid/range, GTAO, and shadow filtering.
Prefab capture is oversizedEmbedded field bounds and surface lighting resolution.

Do not reduce every setting together. Pick the category that matches the measured problem and keep the others fixed.

3 Make iteration cheaper​

For composition and broad light placement, use Fast Bake Mode to lower lightmap resolution. Use Fast Ray Mode when reduced ray work is acceptable. They are independent.

For example, if you need to inspect UV-scale detail, keep Full Bake Mode and compare Fast Ray Mode. If you are only checking whether a room is broadly too dark, a lower-resolution bake can be sufficient.

Fast Bake Mode does not reduce probe density. A huge dense volume can remain expensive even with Fast selected.

Record the mode choices and return both to Full for the final comparison. A low-resolution preview is not the final quality test.

4 Reduce unnecessary lightmap data​

  1. Turn on Lightmap Density and inspect large and small surfaces.
  2. Select a group of static scene meshes with similar quality needs.
  3. In Features > Lightmaps, inspect the Texels per Meter preview.
  4. Apply a lower density only to objects where the lighting detail can tolerate it.
  5. Bake again and inspect contact shadows, seams, and thin details from the baseline views.

Prefer targeted changes before lowering the whole bake's Resolution Scale. Regenerating UVs is not required for every resolution adjustment, but check that the existing padding remains sufficient at the lower bake resolution.

Compare compression only after density is reasonable. Inspect gradients and edges, then refresh Memory. Compression can save storage with visible tradeoffs; it is not a fix for overlapping UVs.

5 Reduce probe data where it is unused​

Fit volume bounds to occupied space. Remove large empty margins before making the whole field coarser.

Use a broad, lower-density field with smaller dense regions where lighting varies quickly. Bake after changing bounds or Voxel Size, then repeat the movable-object route from Probe lighting.

Remember that halving spacing along all three axes can roughly multiply sample count by eight. Slightly smaller bounds can save meaningful data without reducing detail throughout the room.

For prefabs, perform the equivalent edit on embedded Prefab Volumes, then bake and capture again. Refresh the Prefabs group in Memory to compare the saved lighting payload.

6 Tune sampling only for actual noise​

If the image is noisy, compare GI Samples and denoising with resolution held constant. If it is blurry or blocky, inspect spatial resolution first.

Irradiance caching can reduce work, but its size and rejection settings affect fine lighting changes. Compare a difficult corner rather than assuming one cache value is ideal for every scene.

Full Speed Workload Factor controls GPU batching, not finished lighting quality. Lower it if editor interaction becomes impractical during a bake; raising it is not a guaranteed speedup.

Judge the completed bakeNote

Wait for completion denoising before timing or comparing the result. Cancelled builds and Fast-mode previews are not equivalent to completed final bakes.

7 Measure runtime features individually​

Use a representative camera route and target resolution. Toggle or adjust one feature, measure again, then decide whether its quality is worth the difference.

FeatureFirst comparisonWatch for
GTAOResolution Divisor and QualityLost thin detail, shimmer, or unstable contact shading.
PCSSSearch/filter QualityNoisy penumbras or unstable shadow edges.
FogView distance, Grid Pixel Size, Grid Size ZVisible cells, distant loss of detail, or temporal trails.
ProbesBilinear versus Bicubic interpolationUnacceptable transitions or lighting smoothness.
Baked shadowsResolution/world texel size and near/far filter settingsLost caster detail versus filtering noise.

Runtime filtering changes do not create a new bake. Changes to stored shadow resolution or other captured inputs require rebuilding the relevant data before you compare memory or quality.

Do not increase history weight simply to hide every artifact. A still view can look cleaner while movement develops trails.

8 Restore final quality and validate​

  1. Restore the intended Full bake modes and final sampling.
  2. Run a complete lighting bake.
  3. Update reflection captures after lighting changes.
  4. Save levels, lighting data, and any updated prefab captures.
  5. Refresh Memory using the original scope.
  6. Repeat the baseline camera route in a packaged build on the target device.

Keep the change only if its measured saving is worth the visible difference. If performance is still poor after disabling the relevant Spectral effect, profile the rest of the scene rather than assuming lighting is the only cost.

Keep the final bake, target-device measurements, and a record of which changes reduced bake time, memory use, or frame time.