Volumetric Lightmaps

Volumetric lighting samples used for global illumination of dynamic objects and unbuild scene previews.

Choose your operating system:

Windows

macOS

Linux

Volumetric Lightmaps replace the Indirect Lighting Cache and Volume Lighting Samples going forward.

The Indirect Lighting Cache can be re-enabled by opening the World Settings > Lightmass Settings and setting the Volume Lighting Method to VLM Sparse Volume Lighting Samples .

Lightmass generates surface lightmaps for indirect lighting on static objects. However, dynamic objects (like characters) need a method of receiving indirect lighting as well. This is done by storing precomputed lighting in all points in space called a Volumetric Lightmap at build-time and then used for interpolation at runtime for indirect lighting of dynamic objects.

Sparse Volume Lighting Samples | (Old Method)

Volumetric Lightmaps | (New Method)

Sparse Volume Lighting Samples determined leaking amounts and lighting accuracy. Volumetric Lightmaps improve upon this.

How It Works

From a high-level, the Volumetric Lightmaps system works in the following manner:

  • Lightmass places lighting samples throughout the level and computes indirect lighting for them during the lighting build.

  • When it comes time to render a dynamic object, the Volumetric Lightmap is interpolated to each pixel being shaded, providing precomputed indirect lighting.

  • If no built lighting is available (meaning the object is new or has moved too much), lighting is interpolated to each pixel from the Volumetric Lightmap for Static objects until lighting is rebuilt.

When a Lightmass Importance Volume is placed, the Volumetric Lightmap builds bricks that are made up of 4x4x4 cells (lighting samples). When lightmass is run, the cells are placed over the whole Lightmass Importance Volume and then it uses more cells around static geometry in the scene to capture better indirect lighting results.

CubeVLM1.png

Each of these points (or spheres) is a Volumetric Lightmap lighting sample, which uses a Third Order Spherical Harmonic to store the incoming lighting in all directions.

VolumeLightmap.png

Near objects, any static geometry that is within one of the bricks will use more cells where indirect lighting changes the most. This data structure enables interpolation of indirect lighting to any point in space on the GPU.

VLMDensity.png

(From left to right) A Lightmass Importance Volume with a single Static Mesh placed within the volume. Cells around the static geometry are higher-density; An example representation of a single side of a brick showing the placement of 4x4x4 cells; The same example representation of cells with higher-density when static geometry is present during a lighting build.

Enabling Volumetric Lightmap Visualization

Use the view mode for Volumetric Lightmap to visualize the lighting samples in the level viewport by clicking Show > Visualize > Volumetric Lightmap .

Enable Volumetric Lightmap view mode

Visualization Volumetric Lightmap lighting samples

Click image for full size.

Click image for full size.

When visualizing the Volumetric Lightmap after a lighting build, you can see the density of the lighting samples that gathers around static geometry based on the cells within the Lightmass Importance Volume that is affected. Lighting Samples farther away from the static geometry are less dense since they do not have any geometry near them.

Sparse Volume Lighting Samples | (Old Method)

Volumetric Lightmaps | (New Method)

The Indirect Lighting Cache only placed lighting samples above the surface of static geometry. The Volumetric Lightmap places samples in high-densities around static geometry for more detail where indirect lighting changes the most.

Previewing Unbuilt Lighting

The Volumetric Lightmap allows previewing of objects with unbuilt lighting. When you move a Static Mesh that had lighting previously built for it, it will automatically switch to the Volumetric Lightmaps until the next lighting build.

Indirect Lighting Cache | (Old Method)

Volumetric Lightmap | (New Method)

The column in the center has been copied and is now lit by the Volumetric Lightmap until lighting is built again.

Precomputed Lighting on Movable Objects

Unlike the Indirect Lighting Cache where interpolation between a lighting sample happens once for the whole component, the Volumetric Lightmap allows for more detail by interpolating to each pixel instead. This leads to a reliable distribution of detail that results in fewer cases of light leaking.

Indirect Lighting Cache  | (Old Method)

Volumetric Lightmap  | (New Method)

The added detail of Volumetric Lightmaps blends the character better with the environment.

Indirect Lighting Cache | (Old Method)

Volumetric Lightmap | (New Method)

For movable objects that are embedded in any static geometry, it now provides a better match for the static object lighting compared to the Indirect Lighting Cache.

Precomputed Lighting on Volumetric Fog

Volumetric Lightmaps support static lighting application for Volumetric fog by having each fog voxel interpolate precomputed lighting to its position in space.

Spot Light with | No Indirect Light Bounce

Spot Light with | Indirect Light Bounce

Stationary Lights have their indirect lighting stored in lightmaps, which now affects fog.

Sky Light with Emissive Color

Sky Light Volumetric Lightmap

Skylights are shadowed properly, preventing indoor areas from becoming over-fogged.

Indirect Lighting Cache: | Static and Emissive for Static Lighting | (Old Method)

Volumetric Lightmap: | Static and Emissive for Static Lighting | (New Method)

Static and Emissive for Static lights affect fog without costing anything since they're all merged into the Volumetric Lightmap.

Settings

The Volumetric Lightmap settings can be accessed from the World Settings located under the Lightmass Settings .

VLMSettings.png

Setting

Description

Volumetric Lighting Method

Technique used for providing precomputed lighting at all positions inside the Lightmass Importance Volume.

VLM Volumetric Lightmap

Lighting samples are computed in an advanced grid which covers the entire Lightmass Importance Volume. Higher-density grids are used near geometry. The Volumetric Lightmap is interpolated efficiently on the GPU per-pixel allowing accurate indirect lighting for dynamic objects and volumetric fog. Positions outside of the Importance Volume reuse the border texels of the Volumetric Lightmap (clamp addressing). On mobile, interpolation is done on the CPU at the center of each object's bounds.

VLM Sparse Volume Lighting Samples

Volume lighting samples are placed on top of static surfaces at medium-density and everywhere else in the Lightmass Importance Volume at low-density. Positions outside of the Importance Volume will have no indirect lighting. This method requires CPU interpolation, so the Indirect Lighting Cache is used to interpolate results for each dynamic object, adding Rendering Thread overhead. Volumetric Fog cannot be affected by precomputed lighting with this method.

Volumetric Lightmap Detail Cell Size

Size of a Volumetric Lightmap voxel at the highest density (used around geometry), in world space units. This setting has a large impact on build times and memory and should be used with caution.

Volumetric Lightmap Maximum Brick Memory Mb

The maximum amount of memory to spend on Volumetric Lightmap Brick data. High-density bricks will be discarded until this limit is met with bricks furthest from geometry discarded first. Trimming memory too heavily will result in inconsistent resolution and it would be better to increase Volumetric Lightmap Detail Cell Size instead.

Performance

The following considerations should be taken into account when considering performance and memory usage with Volumetric Lightmaps.

  • Volumetric Lightmaps on a third person character cost .02ms of GPU time on 8th generation game consoles. All Indirect Lighting Cache Rendering Thread cost is removed.

  • In Epic's Paragon map Monolith, memory usage increased from 5Mb with the Indirect Lighting Cache to 30Mb with Volumetric Lightmaps at default Detail Cell Size settings. Memory usage can be seen under the Stat MapBuildData command in the Editor with Volumetric Lightmap Memory

    Click image for full size.

Volumetric Lightmap versus Indirect Lighting Cache

Below are the details of the comparisons that can be made between the Indirect Lighting Cache and Volumetric Lightmaps:

Precomputed Light Volumes/Indirect Lighting Cache

Volumetric Lightmaps

Costly interpolation on the CPU

Efficient interpolation on the GPU

Per-object interpolation, even on instanced components

Per-pixel interpolation

Cannot affect Volumetric Fog

Works with Volumetric Fog

Placed with high-density only on top of static surfaces resulting in leaking from low-density samples

Placed with high-density all all around static surfaces

Black samples outside of the Lightmass Importance Volume

Border voxels are stretched to cover areas outside of the Lightmass Importance Volume

Supports Level Streaming

Level Streaming is supported but requires that all levels (including those streamed in) must be built at the same time. For more details, see the "Additional Notes" section below.

Level Streaming is supported but requires that all levels (including those streamed in) must be built at the same time. For more details, see the "Additional Notes" section below.

Additional Notes

  • If you reduce the Volumetric Lightmap Detail Cell Size in a large level to get more accuracy, you need to raise the Volumetric Lightmap Maximum Brick Memory Mb as well. Otherwise, the detail cells will get culled causing dynamic object indirect lighting to be less accurate.

  • Level Streaming requires that all levels (the Persistent and any sub-levels) all be built at the same time, otherwise streamed in levels will not be registered correctly. Streaming levels are primarily a memory optimization where the most detailed bricks volumes are merged into a bigger volume that is a cube (equal dimensional sides) instead of a box (different dimensional sides). The most detailed bricks are streamed with the closest sub-level and higher level bricks are always persistent. In levels that contain actual geometry, the majority of data goes into the most detailed level bricks. There should be little concern given to parts of the volume that appear to be empty (or "wasted") space if the level is filled with geometry. The current system uses a single volume texture, meaning that we can't do much about empty space since we don't support multiple volume textures that has overlap and blending.

  • Use Volumetric Lightmap Density Volumes to provide local control over the density of samples within areas of the scene. These volumes only supports convex shapes. Add one to your scene from the Place Actors panel in the Level Editor.

Troubleshooting

  • The Detail Cell Size has been lowered for more samples, but the sample density is lower than requested near static geometry.

    • Detail bricks can be culled if the Maximum Brick Memory is too low, or if all lighting in the area is nearly equal.

  • There is light leaking through a wall on characters but no on the Static Meshes nearby.

    • The only current solutions to leaking are to decrease Detail Cell Size (allowing more memory) or increase the thickness of the wall.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss