Lighting: Unreal 5 Features Reference

Iri Shinsoj
13 min readSep 7, 2023

In this article I briefly go through the lighting features and provide a general idea of the target platforms and scalability levels where they should be used. It covers PC, 8th Gen, and 9th Gen consoles.

It’s designed to assist developers in deciding the feature set for their games. The article contains information on how to enable each feature, and links to the official documentation are provided for further information.

The article does not analyze mobile or VR platforms.

I also created a tool as a companion for this article. It helps with testing and switching between the lighting methods available in Unreal. It’s free for personal and commercial use.

1. Features vs Scalability

The following chart displays lighting features and their approximate minimal requirements, to help you in determining which options to use on your target platform.

It is purely based on my personal observations and considerations.

Features and minimum target platforms for them

The numbers and settings are approximate and highly depend on the project. Scalability range in this article is based on range from XOne and PS4 to RTX 40 series.

Level of detail, complexity of the environment and lighting will have effect on performance. Resolution depends on other graphical decisions, you may need to lower the resolution if your game will struggle reaching target FPS. The choice also depends on whether the project has static, dynamic or procedural environment.

1.1. Example: Low-Medium Platform

Example decision for fictional story-driven game, that runs at 60FPS at 1080 upscaled to 4k on PS4.

Features selected:

  • Using Static lighting
  • Short distance Cascade Shadow Map, one cascade.
  • Capsule shadows would reduce rendering costs further, replacing Cascades on Skeletal meshes.
  • SSAO and SSR can be Quality scalability options.

Features discarded:

  • Lumen is not supported on PS4.
  • Inset and Virtual shadows are too expensive to render on this platform.

1.2. Example: Medium-High Platform

Example decision for fictional game with procedurally generated levels that runs at 60FPS on PS5.

Features selected:

  • Using SSGI, SSAO, DFAO and SSR
  • Capsule and Distance Field Shadows are an option

Features discarded:

  • Lumen can only be used in SRT mode to reach the 60FPS target and puts limitations on lighting complexity. Resolution would have to be sacrificed. These points are leading to significantly reduced visual quality, which does not satisfy visual target of the game.
  • Virtual shadows can be an option, but we went for a cheaper solution.

2. Global Illumination Methods

Features vs minimum Scalability level they require

Command for GI Methods selection:

r.DynamicGlobalIlluminationMethod=[0–4]
0 : None. Global Illumination can be baked into Lightmaps but no technique will be used for Dynamic Global Illumination.
1 : Lumen. Use Lumen Global Illumination for all lights, emissive materials casting light and SkyLight Occlusion. Requires ‘Generate Mesh Distance Fields’ enabled for Software Ray Tracing and ‘Support Hardware Ray Tracing’ enabled for Hardware Ray Tracing.
2 : SSGI. Standalone Screen Space Global Illumination. Low cost, but limited by screen space information.
3 : RTGI. Ray Traced Global Illumination technique. Deprecated, use Lumen Global Illumination instead.
4 : Plugin. Use a plugin for Global Illumination.

2.1. Precomputed (Lightmap and Lightmass)

Baked lighting is the cheapest GI option. It’s important though to keep an eye on lightmap resolution and memory used.

Direct and indirect lighting from static lights are both baked into Lightmap. However, only indirect lighting is baked from stationary lights, while direct light is dynamic and can change its intensity:

Cold light is static, its direct and indirect light is baked into Lightmap; Warm light is stationary, only indirect light from it is baked into Lightmap

For Static lighting to work, it should be enabled in the Project Settings:

Project Settings

Then, Dynamic Global Illumination should be set to None or SSGI:

Project Settings

Alternatively, it can be overridden in Post Process settings:

Post Process settings

Also, this can be done with r.DynamicGlobalIlluminationMethod 0 command to switch to Baked solution “on the fly”.

You can use Force No Precomputed Lighting checkbox in the World Settings to control static lighting usage per level:

World Settings

2.2. Screen Space Global Illumination (SSGI)

SSGI can be used in combination with baked lighting. SSGI also makes it possible to have dynamic lighting from emissive surfaces.

SSGI can be used in combination with DFAO as dynamic lighting solution and as a fallback for Lumen on Medium and Low scalability settings:

In order to use SSGI, it should be enabled in the Project Settings:

Project Settings

Alternatively, it can be overridden in Post Process settings:

Post Process settings

Also, this can be done with r.DynamicGlobalIlluminationMethod 2 command to switch to SSGI solution “on the fly”.

2.3. Lumen

Lumen is meant to replace SSGI and DFAO on High and Epic Scalability levels.

Lumen is disabled on Medium and Low settings, which means that fallback setup should be provided for those platforms.

I don’t recommend forcing the project to use Lumen only. Without fallback setup for low-end platforms, your game can be an unplayable experience due to low and unstable performance and horrible image quality for part of the players that have GPUs under RTX3060.

Current most popular video cards (August 2023)

If you decide to use Lumen for 9gen consoles, you should be careful while working on environment and lighting setup, to reach proper performance. Otherwise you may end up with reduced resolution and content quality. In extreme cases poor implementation may lead to content cut-offs.

Lumen does not support previous-generation consoles, such as PlayStation 4 and Xbox One.

Lumen can be enabled in the Project Settings:

Project Settings

Alternatively, it can be overridden in Post Process settings:

Post Process settings

Also, this can be done with r.DynamicGlobalIlluminationMethod 1 command to switch to Lumen solution “on the fly”.

Note that Mesh Distance Fields should be enabled for Lumen to work (r.GenerateMeshDistanceFields=True).

Lumen has two Ray Tracing modes:

  • Software Ray Tracing (SRT)
  • Hardware Ray Tracing (HRT)
Project Settings enabling HRT

Ray Tracing mode can be selected with r.Lumen.HardwareRayTracing command:

r.Lumen.HardwareRayTracing=[0–1]
0 : Software Ray Tracing
1 : Use Hardware Ray Tracing for Lumen when available, or Software Ray Tracing otherwise. HRT is more expensive.

Software Ray Tracing has two modes:

  • Detail Tracing (Mesh Distance Field or MDF)
  • Global Tracing (Global Distance Field or GDF)

Tracing methods used in default Scalability options are as follows:

  • High quality — Global Tracing only r.Lumen.TraceMeshSDFs=0
  • Epic quality — Detail Tracing enabled r.Lumen.TraceMeshSDFs=1

Mode selection is available in Project Settings:

Project Settings — SRT mode

Or with r.Lumen.TraceMeshSDFs command:

HELP for 'r.Lumen.TraceMeshSDFs':
Whether Lumen should trace against Mesh Signed Distance fields.
When enabled, Lumen's Software Tracing will be more accurate,
but scenes with high instance density (overlapping meshes) will have high tracing costs.
When disabled, lower resolution Global Signed Distance Field will be used instead.

Lumen also has short-range AO added to GI, you can switch it on and off with r.Lumen.ScreenProbeGather.ShortRangeAO:

HELP for 'r.Lumen.ScreenProbeGather.ShortRangeAO':
Whether to compute a short range, full resolution AO to add high frequency occlusion (contact shadows) which Screen Probes lack due to downsampling.

3. Ambient Occlusion

Features vs minimum Scalability level they require

3.1. Precomputed AO

It’s being baked along with precomputed Global Illumination when “Use Ambient Occlusion” is enabled in the World Settings:

World Settings

3.2. Screen Space Ambient Occlusion (SSAO)

SSAO is enabled by default when Lumen is off. It’s used in combination with baked Global Illumination as cheap additional detail in cavities darkening. Since it’s screen space, it’s not as accurate and will have missing information on the screen edges.

You can adjust SSAO Intensity and Radius in a Post Process:

SSAO is disabled when using Lumen. But you can use SSAO with Lumen though, with these commands:

r.Lumen.DiffuseIndirect.SSAO 1
r.Lumen.ScreenProbeGather.ShortRangeAO 0

DFAO in combination with SSGI is an alternative for Lumen GI on Medium scalability settings.

Movable Sky Light should be added to the level in order to enable DFAO. It provides DFAO settings:

Parameters for DFAO, they are enabled when Skylight actor is Movable

Generate Mesh Distance Fields should be enabled in the Project Settings ( r.GenerateMeshDistanceFields=True).

Generate Mesh Distance Fields option in Project Settings

4. Shadow Methods

Features vs minimum Scalability level they require

4.1. Precomputed (Lightmap and Shadowmap)

Direct shadows from Static lights are baked into Lightmap along with GI.

Direct shadows from Stationary lights are baked into a separate Shadowmap that is used to blend with Cascade Shadow Map beyond dynamic shadow distance.

Cold light is static, its direct shadow is baked into Lightmap; Warm light is stationary, its direct shadow is baked into Shadowmap

4.2. Contact Shadow (Screen Space)

Contact Shadow is screen space, distance of the shadow has no difference in performance. It’s used in combination with other shadow methods for cheap extra detail.

I don’t recommend using big values for its distance, as it leads to a glitchy look. Contact shadows are often overused and, as a result, provide long noisy shadow instead of nice thin detail.

To enable it, set the Contact Shadow Length inside the light details:

Directional Light parameters

4.3. Capsule Shadow (Direct and Indirect)

Capsule Shadows are Skeletal Meshes shadow casting method exclusively.

For low-end PC and 8gen I recommend to use Capsule Direct Shadows instead of Cascade Shadows on the characters. Capsule shadows also look much better than Cascade due to softness by distance from the object. They will give you better visual quality and cheaper shadow pass.

Capsule Direct shadows are replacing Cascade shadows on Skeletal actors that have ‘Capsule Direct Shadow’ enabled. Capsule shadows do not replace Virtual shadows.

Capsule Indirect Shadows can be used in combination with other Direct shadow solutions (Capsule, Cascade, Virtual). They are adding AO that grounds character in areas without direct light either in baked and dynamic lighting solutions:

Capsule Indirect Shadow also works with Lumen:

Capsule Shadows are using a capsule representation of a Skeletal Mesh from a Physics Asset:

Skeletal Mesh — Asset Details

For Capsule Shadows to work, they should be enabled in the Skeletal Mesh actor:

Capsule Shadow needs to be enabled in the Skeletal Mesh actor parameters

4.4. Cascade Shadow Map (CSM)

More cascades — higher the cost and quality. You should keep distance and amount of cascades at required minimum (according to your project needs).

CSM will only work if you have Directional Light in your scene.

Directional Light settings for Cascade Shadows

Hint: Note that the lighting should be baked in order to see the cascade parameters change on the scene.

To enable them, set Shadow Map Method to Shadow Maps in the Project Settings:

Project Settings

Alternatively, it can be enabled by disabling VSM with r.Shadow.Virtual.Enable 0 command.

4.5. Distance Field Shadow (Direct and Indirect)

Distance Field Shadows are an option to have shadows beyond dynamic shadows distance (Cascade or Virtual). They can be used with either precomputed and dynamic lighting setups.

Distance Field Shadows are used as an option for Medium scalability and above.

Example of Virtual Shadow Map with Distance Field Shadow beyond it

Distance Field Shadows can be enabled in Directional Light:

Distance Field Shadows settings in Directional Light

Distance Field Indirect Shadows (DFIS) work similarly to Capsule Shadows by using precomputed lighting (thus will work only with Lightmass). Lightmass samples determine the directionality and intensity of the indirect lighting. It’s used for movable Static Meshes only.

Baked lighting setup with Cascade shadows, movable Static Mesh with Distance Field Indirect Shadow

To use DFIS, you should have stationary lighting setup with baked lightmass. To enable the shadow, check this parameter in the movable Static Mesh:

Static Mesh parameter

4.6. Inset Shadow

Inset shadows are enabled by default when stationary Directional Light with Cascades is used, even if dynamic shadow distance is at 0.

Static box, Movable sphere, Skeletal Mesh; Directional Light is Stationary

The cost vary from small to huge, depending on how many dynamic objects you have on the scene. I would recommend disabling them for 8gen and low-end PCs or they may kill the performance.

Caution: with this setup, if you wanted to completely disable the dynamic shadows, the Inset shadow is still there even if greyed out. You need to increase dynamic shadow distance to disable the Inset, then set dynamic to 0 again:

Inset Shadow

4.7. Virtual Shadow Map (VSM)

Virtual Shadow Map is an option for high-end PCs and 9gen consoles. They work best with Nanite and have infinite draw distance from Nanite meshes.

VSM can be too expensive to keep them in general graphical settings. As a good practice, I would recommend moving them into a separate option for players to decide whether to have it enabled or not.

To use them, set Shadow Map Method to Virtual Shadow Maps:

Project Settings

Switching between Cascade and Virtual Shadow Map methods can be done with r.Shadow.Virtual.Enable command:

r.Shadow.Virtual.Enable=[0–1]
0 : use old Shadow Map (Cascade shadows)
1 : Virtual Shadow Map
All shadows from Skeletal Mesh

5. Reflection Methods

Features vs minimum Scalability level they require

Reflection method can be selected with r.ReflectionMethod command:

r.ReflectionMethod=[0–3]
0 : None
1 : Lumen
2 : SSR
3 : RT Reflections

5.1. Reflection Capture

Reflection Capture Actors are probes that capture a static image of the area they cover and re-project it onto reflective materials.

5.2. Screen Space Reflection

SSR is an affordable way to have detailed reflections on low-end platforms. SSR can be used with either precomputed and dynamic lighting, including Lumen.

5.3. Lumen Reflection

Lumen reflection consists of Global traces and Screen traces:

Global Traces reflect offscreen objects when Screen Traces only render what’s on the screen

Cost of Lumen reflections depends on roughness of the surfaces and how much of screen space they cover. By default, roughness above 0.4 uses final gather and doesn’t add to the cost. Setting for ray tracing threshold: r.Lumen.Reflections.MaxRoughnessToTrace.

I made a simple custom View Mode that helps with roughness validation.

Lumen reflections in SRT mode are using Distance Field representation of the scene and are more performant than HRT reflections.

It’s possible to disable Lumen reflections, to use SSR instead, in either Project settings, Post Process, or with console variable r.Lumen.Reflections.Allow 0.

Hit Lighting for Reflections provides better reflection quality but is expensive for games and I would not recommend using it for current gen. It can be an option for Epic scalability for high-end PCs, and I recommend to keep it as a separate checkbox in settings.

For reflection to work on translucent surfaces, use this setting: r.Lumen.TranslucencyReflections.FrontLayer.Allow.

Update in Unreal 5.3: Lumen Reflections can now be used without Lumen GI, for games and applications which use static lighting but wish to scale up in reflection quality beyond reflection captures. Standalone Lumen Reflections only work when HWRT is enabled, and it will enable Hit Lighting automatically, as Lumen’s surface cache optimization is not available when Lumen GI is disabled.

5.4. Planar Reflections

Planar Reflections require the scene to be rendered twice, which tends to be too expensive to use in games. The cost depends on the assets and materials complexity.

--

--

Iri Shinsoj

I'm Senior Technical Artist, eager to share my experiences with community.