2.1 - Static Light

An overview of the Lighting example level, example 2.1: Static Light

Choose your operating system:

Windows

macOS

Linux

2.1 - Static Light

Static Lights are lights that cannot be changed or moved in any way at runtime. They are calculated only within Lightmaps, and once processed, have no further impact on performance. Movable objects cannot integrate with static lights, so the usefulness of static lights is limited.

Of the three light mobilities, Static lights tend to have medium quality, lowest mutability, and the lowest performance cost.

Since Static lights only use Lightmaps, their shadows are baked prior to gameplay. This means that they cannot shadow moving (dynamic) objects, as we see in the example. However, when lighting objects that are also static, they have the ability to produce area (contact) shadows. This is done by adjusting the Source Radius property. However, it should be noted that surfaces receiving soft shadows will likely have to have their Lightmap Resolution set appropriately in order for the shadows to look good.

On Static Mesh Components, lightmap resolution is set either on the Static Mesh asset, or by checking the Override Lightmap Res checkbox and setting the value. Larger values mean higher resolution, but also longer build times and more memory.

On Brush surfaces, lightmap resolution is set via the Lightmap Resolution property. This is really setting a density, so lower values produce higher resolution.

Lightmap Resolution: 4.0

Lightmap Resolution: 16.0

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.

Further, Static Lights may use IES lighting profiles, discussed later in Example 3.1 , but the profile's data will be baked into the lightmap, meaning it will be dependent on Lightmap Resolution for quality. Static Lights also do not support Light Functions, which are discussed in Example 3.2 .

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