Latest news
Rhino, Grasshopper and Archicad: A Guide to Parametric BIM WorkflowsUsing View Layers and Render Passes in Blender: An Archviz GuideRhino Worksession Guide: Working with Reference Files on Large ProjectsYour First Rhino Python Script: Create Lines and Automate with ScriptEditorUnreal Engine 5 Virtual Shadow Maps Guide: Shadow Settings for Architectural ScenesBlender 5.2 LTS Shape Keys guide: Using Relative and AbsoluteHoudini PDG/TOPs Guide: Building Variation and Render Workflows with WedgePlace Repeated Geometry on Points with Blender Geometry NodesLiving Archive: Former Berlin power station’s basement opens to the publicNVIDIA RTX Spark Goes on Sale, Targeting Local AI and Content Creation
Tips & GuidesUnreal EngineMari

Unreal Engine 5 Virtual Shadow Maps Guide: Shadow Settings for Architectural Scenes

Designed to work with Nanite, Virtual Shadow Maps in Unreal Engine 5 deliver high-resolution dynamic shadows. This guide covers activation, light sources, and performance settings based on the official documentation.

Soft shadows revealing surface details in a modern interior lit by daylightAI image
Representative image, generated with AI.Image: 3dsınıfı / FCA AI

In brief

  1. Virtual Shadow Maps is a shadowing method designed for Nanite geometry and dynamic lighting.
  2. The system is enabled by default in new projects, but must be enabled separately in projects created before Unreal Engine 5.0.
  3. The default ray count for local and directional lights is eight when the Shadows scalability level is Epic.
  4. Source Radius for local lights and Source Angle for Directional Lights affect shadow softness.

Virtual Shadow Maps (VSM) is a method for rendering high-resolution shadows in Unreal Engine 5, designed to work with Nanite. Epic Games’ official documentation explains how to configure VSM, particularly in scenes with detailed geometry and dynamic lighting. This guide looks at the project settings, light parameters, and quality-performance trade-offs covered in the Unreal Engine 5 documentation, with architectural visualization workflows in mind.

Which scenes are Virtual Shadow Maps suited to?

VSM aims to produce high-resolution shadows by processing virtual shadow maps according to the needs of on-screen pixels. The maps have a virtual resolution of 16K × 16K and are divided into 128 × 128-pixel pages. Required pages are allocated and rendered, while available pages are cached between frames. Pages may need to be rendered again if they are invalidated by moving objects or lights.

This method is designed for projects that are compatible with Nanite. Using traditional shadow maps with Nanite geometry and Stationary lights is not supported; projects that use Nanite should use Movable Lights or VSM instead. VSM may not be suitable for projects that do not use Nanite or for the target platform. When choosing a shadowing method, consider both the scene geometry and whether the lights are stationary or movable.

1. Check the shadowing method in your project

Open the Shadows section under Engine > Rendering in Project Settings. Choose either Virtual Shadow Maps or traditional Shadow Maps from the Shadow Map Method option. VSM is enabled by default in new projects. In projects created before Unreal Engine 5.0, however, you need to enable it in Project Settings or with the r.Shadow.Virtual.Enable console variable.

When enabled, VSM replaces some other shadowing methods, including precomputed shadows for Stationary lights, pre-shadows, per-object shadows, and Cascaded Shadow Maps. However, fully baked shadows from Static lights continue to work through lightmaps in scenarios that do not use Lumen. With Stationary lights, indirect lighting can come from baked lightmaps, while direct lighting and shadows are calculated dynamically.

2. Set the light source size to suit the scene

Shadow Map Ray Tracing (SMRT) takes samples alongside VSM to create softness and contact hardening in shadows. For local lights, Source Radius affects how rays are distributed relative to the light source; for Directional Lights, this is controlled by Source Angle. Depending on the type of light, an appropriate source size can produce softer shadows.

SettingSuggested valueEffect
Source Radius for local lightsA reasonable value for the scene; the documentation gives 10 as an exampleSupports soft, contact-hardened shadows with SMRT.
Source Angle for Directional LightA value appropriate to the scene; the documentation gives 5.0 as an exampleAffects the softness of shadows cast by directional light.
SamplesPerRayLocal and SamplesPerRayDirectional4–8 samplesSets shadow samples per ray; fewer samples limit the range of achievable softness.
RayCountLocal and RayCountDirectionalEight rays by default when Shadows scalability is set to EpicThe ray count affects penumbra noise.

Treat the values in the table as starting points; no single setting will produce the same result in every scene. Epic’s documentation notes that very large Source Radius or Source Angle values can increase performance costs and cause visual artifacts in the penumbra when the camera is close to the shadow. After increasing the light source size, check the result from different camera positions.

3. Balance sampling quality and performance

Set the ray count for local lights with r.Shadow.Virtual.SMRT.RayCountLocal and for directional lights with r.Shadow.Virtual.SMRT.RayCountDirectional. To set the number of samples per ray, use r.Shadow.Virtual.SMRT.SamplesPerRayLocal and r.Shadow.Virtual.SMRT.SamplesPerRayDirectional. Fewer shadow samples can reduce processing costs, but they also limit the achievable penumbra softness. Epic notes that 4–8 samples per ray produce good results.

Setting the variable that controls the ray count to zero disables SMRT and switches to sharp, single-sample shadows. When Shadows scalability is set to Epic, the default ray count is eight for local and directional lights. As you adjust the settings, keep an eye on shadow noise, softness, and scene performance together.

The VSM cache is enabled by default. If camera movement reveals areas that were not previously visible, new shadow pages may need to be rendered. For that reason, measuring performance from a fixed camera alone may not be enough; test scenes with camera movement as well. The r.Shadow.Virtual.Cache 0 variable disables the cache for debugging. For normal use, the documentation recommends leaving the cache enabled by default.

4. What to consider in an architectural visualization workflow

For architectural scenes with Nanite geometry and dynamic lights, VSM aims to provide high-resolution shadows with a simpler setup. In interiors, set the source size of local lights according to the scene’s lighting character; in exteriors, consider the Directional Light’s Source Angle. Increasing the light source size does not always produce a better result; assess softness, noise, and performance together.

First, confirm the project’s Unreal Engine version, whether it uses Nanite, and which shadowing method is selected. Then adjust the light settings in small steps and check the results in both still images and camera movement. The documentation does not specify a hardware requirement or a single performance figure that applies to every project. That makes testing the settings in the target scene especially important for work with dense geometry and dynamic lights.

Common mistakes

  • Assuming VSM is enabled automatically in projects created before Unreal Engine 5.0. Check the project setting and, if needed, the console variable.

  • Using Nanite with the traditional shadow map method for Stationary lights. The documentation says this combination is not supported; consider Movable Lights or VSM.

  • Increasing Source Radius or Source Angle more than necessary. This can affect performance and cause penumbra artifacts.

  • Overlooking that reducing the sample count also limits shadow softness.

  • Testing only with a fixed camera. Camera movement may cause previously unseen shadow pages to be rendered.

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 offices in Turkey, the practical benefit of VSM is its aim to make high-resolution shadowing easier to configure in dynamic scenes that use Nanite. But enabling the feature is not enough on its own: light source size and sampling settings need to be tested in the actual scene, including with a moving camera.

Teams with limited hardware budgets or render times should measure the visual benefit before increasing the sample count. Since the official documentation does not specify a hardware requirement, performance needs to be assessed on a project-by-project basis. Checking whether VSM is enabled in older projects and verifying compatibility between Nanite and Stationary lights can also help avoid unnecessary trial and error.

Frequently asked questions

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

In Project Settings, select `Shadow Map Method` in the `Shadows` section under `Engine > Rendering`. VSM must be enabled separately in projects created before Unreal Engine 5.0.

Can Virtual Shadow Maps be used with Nanite?

VSM is designed to be used with Nanite. Using traditional shadow maps with Nanite and Stationary lights is not supported; projects in this situation can use Movable Lights or VSM instead.

Which settings control soft shadows in VSM?

`Source Radius` for local lights and `Source Angle` for Directional Lights affect shadow softness. SMRT ray and sample counts also determine the balance between quality and processing costs.

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

Related news