Latest news
Tips & GuidesUnreal Engine

A Guide to Balancing Shadow Quality and Performance in Unreal Engine 5

Unreal Engine 5’s official documentation explains how to balance shadow quality and performance with Virtual Shadow Maps and lighting features. This guide walks through the key choices for architectural and interior scenes.

The effect of soft shadows in interior architectural visualizationAI image
Representative image, generated with AI.Image: 3dsınıfı / FCA AI

In brief

  1. Virtual Shadow Maps are designed for high-resolution dynamic shadows alongside Nanite.
  2. A light’s Static, Stationary, or Movable mobility is a key factor when choosing a shadow method.
  3. Limiting the Attenuation Radius of Point, Spot, and Rect lights can reduce the area covered by shadow calculations.
  4. For Shadow Map Ray Tracing, light source size and sample count affect both soft shadow appearance and performance cost.

Unreal Engine 5’s official documentation explains how Virtual Shadow Maps (VSM), light mobility, and light properties affect shadow appearance and performance cost. This guide brings together the settings covered in that documentation to help you choose the right approach for architectural visualization, interior, and real-time presentation scenes. The goal isn’t to enable the highest quality in every scene, but to strike a balance suited to the geometry, lighting setup, and intended look.

1. Choose a shadow method and set light mobility

A light’s Mobility setting is the main factor that determines its shadow behavior in Unreal Engine. Static lights can use lightmap data generated by a lighting build, while shadows from Movable lights are calculated in real time. Stationary lights can combine precomputed and dynamic contributions. Each light’s mobility can be set independently in a scene.

If your project uses Nanite geometry, the traditional Shadow Mapping method does not support it. Unreal Engine 5 documentation recommends using Movable Lights or Virtual Shadow Maps in projects that include Nanite. VSM is designed for use with Nanite; it may not be the right choice for projects and target platforms that don’t use Nanite.

To enable VSM, go to Project Settings › Engine › Rendering and select Shadow Map Method in the Shadows section. For projects created before Unreal Engine 5.0, switch to this method in the project settings or with the r.Shadow.Virtual.Enable console variable. VSM is selected by default in new projects.

2. Adjust shadows with light size and coverage

Shadow softness depends on more than the shadow method. The Source Angle, Source Radius, Source Height, and Source Width properties determine a light source’s apparent size. According to the documentation, as these dimensions increase, the shadows cast by affected objects become softer. Testing small adjustments in a real-time scene can help you achieve the desired softness and avoid unnecessarily high values.

For Point, Spot, and Rect lights, Attenuation Radius limits the area affected by the light in the scene. It’s important to keep this area large enough to cover only the objects you need: when shadow-casting lights reach a wider area, more objects can be included in the calculation, especially with traditional Shadow Mapping. If a light doesn’t illuminate the entire scene, check its attenuation radius.

SettingRecommended valueEffect
Source Radius (local light)A moderate value suited to the scene; the documentation gives 10 as an example for a Point LightProduces soft shadows and contact hardening; excessive values can cause visual issues and affect performance.
Source Angle (Directional Light)A realistic, moderate angle; the documentation shows 5.0 as an exampleDetermines the softness of shadows from a directional light.
Attenuation RadiusLimited to the area the light actually needs to affectHelps reduce the number of objects and the area included in shadow calculations.
SMRT Samples Per Ray4–8More samples can produce softer shadows; fewer samples cost less but limit the range of softness.

The light size examples in the table aren’t fixed prescriptions. Window, fixture, and indirect lighting setups produce different visual results in architectural interiors, so evaluate settings in the context of the scene’s scale and camera framing.

3. Balance quality and cost with VSM and soft shadows

VSMs divide shadow maps into 128 × 128-pixel pages and process the pages needed for pixels visible on screen. Pages are cached across frames unless movement or a lighting change invalidates them. This approach targets high-resolution shadows while helping avoid reprocessing every page on every frame.

For local lights, Shadow Map Ray Tracing (SMRT) can produce soft shadows and contact hardening based on the size of the light source. Source Radius affects this look for local lights, while Source Angle affects it for a Directional Light. The documentation states that the default ray count for local and directional lights is 8 when shadow scalability is set to Epic. Fewer rays can increase visible noise in the penumbra; setting the relevant ray count to 0 disables SMRT and switches back to a sharp, single-sample shadow.

For more granular control, use the r.Shadow.Virtual.SMRT.SamplesPerRayLocal and r.Shadow.Virtual.SMRT.SamplesPerRayDirectional variables. The documentation gives 4–8 samples as a suitable starting point. Fewer shadow samples reduce cost, but limit how soft the shadow can be. Increasing the light source size too much can affect performance and cause visual artifacts when the camera gets close to the shadow penumbra.

4. Checklist for architectural and interior workflows

For teams preparing real-time walkthroughs, design presentations, or animations, the first priority is deciding which geometry and lights in the scene need to move. This makes choosing VSM especially important in projects that use Nanite. By contrast, in scenes built with Static lights and without Lumen, fully baked shadows continue to be represented in lightmaps. Changing only the light properties may not produce the expected result if you haven’t verified the method selected in the project settings.

As a practical sequence, first check light Mobility values and the shadow method; then adjust each light’s coverage and source size to suit the scene. Finally, inspect shadows with moving objects and camera movement. An excessively large coverage area for Point and Spot lights can create unnecessary cost. Shadows from Static or Stationary lights shown in the editor are only previews until the lighting build is complete; build the lighting with Build › Build All Levels to evaluate the final result.

Common mistakes

  • Selecting traditional Shadow Mapping in a scene that uses Nanite and expecting Nanite shadows to work.

  • Leaving the Attenuation Radius of Point, Spot, or Rect lights larger than necessary.

  • Increasing light source size too much and overlooking penumbra artifacts and performance issues.

  • Mistaking preview shadows from Static or Stationary lights for the final result before the build is complete.

  • Reducing SMRT samples without checking for potential noise in the penumbra.

Sources

2 sources
D
dev.epicgames.comdev.epicgames.com/documentation/en-us/unreal-engine/virtual-shadow-maps-in-unreal-engine
Summary
D
dev.epicgames.comdev.epicgames.com/documentation/en-us/unreal-engine/shadowing-in-unreal-engine
Summary

Source texts are not republished; short quotes are marked, everything else is our own summary and commentary.

3dsınıfı’s take
3dEditor’s assessment

For architectural visualization teams in Turkey, the practical value of these settings lies in being able to manage shadow quality according to the needs of the scene, especially for real-time presentations and animations. Rather than applying the highest values to every light, consider Mobility, Nanite usage, and the area a light covers together to avoid unnecessary calculations.

Teams working across different hardware in their offices should test SMRT sample counts and light source sizes on a per-scene basis. The source documentation doesn’t specify particular hardware or licensing costs, so performance should be measured on the project and system in question. Avoiding the assumption that build previews represent final lighting should also be part of the pre-delivery checklist.

Frequently asked questions

How do you enable Virtual Shadow Maps in Unreal Engine 5?

Select Virtual Shadow Maps under `Shadow Map Method` in the `Shadows` section of `Project Settings › Engine › Rendering`. For projects created before Unreal Engine 5.0, you can also use the project setting or `r.Shadow.Virtual.Enable`.

Should Virtual Shadow Maps be used with Nanite?

Unreal Engine documentation describes VSM as a method designed for use with Nanite. It recommends using Movable Lights or Virtual Shadow Maps in projects that include Nanite.

How many SMRT samples should you use for soft shadows?

The documentation gives 4–8 as a suitable range for `Samples Per Ray`. Fewer samples reduce cost but limit the softness you can achieve.

Comments and the forum are in Turkish.Join the discussion
+

Related news