4.3 - Indirect Lighting

An overview of the Lighting example level, example 4.3: Indirect Lighting

Choose your operating system:

Windows

macOS

Linux

4.3 - Indirect Lighting

This example shows how Indirect Lighting can affect objects in the scene. Here we have a red light enclosed in a small space, with bounced light from the wall striking a static object and a dynamic one. Because indirect lighting is pre-calculated and baked into the static Lightmap, the static object's lighting and shadowing will be more accurate. For the dynamic object, however, lighting is dependent on the indirect lighting cache.

Static lights can also affect dynamic objects due to the Indirect Lighting Cache Sample Grid . This is a 3D grid of lighting samples that get baked into the scene and are used by the rendering engine to determine what effects static lighting will have on dynamic objects. The grid can be visualized in the viewport by typing the following command into the Console Bar in the upper-right corner of the editor:

r.Cache.DrawLightingSamples 1

You will see the samples scattered throughout the scene like so:

IndirectLightingCache.png

In order for the Indirect Lighting Cache samples to exist, your scene must have a Lightmass Importance Volume around it, and lighting must have been built by Lightmass.

Because dynamic objects are making use of this Indirect Lighting Cache, they have no way of knowing the actual position of the light, hence the lack of shadows seen in this example on the dynamic object.

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