Latest news
Tips & GuidesUnreal Engine

Shadow Optimization in Unreal Engine 5: A Guide to Archviz

Unreal Engine 5’s Virtual Shadow Maps system delivers high-resolution shadows with Nanite geometry. Based on Epic’s documentation, we’ve compiled settings for balancing shadow quality and performance in architectural scenes.

A contemporary interior lit by soft sunlight with clearly defined contact shadowsAI image
Representative image, generated with AI.Image: 3dsınıfı / FCA AI

In brief

  1. Virtual Shadow Maps uses a virtual resolution of 16K × 16K and divides shadow maps into 128 × 128-pixel pages.
  2. The system is designed for use with Nanite and may not be suitable for projects that don’t use Nanite.
  3. At Epic’s Quality shadow scalability level, SMRT uses eight rays by default for local and directional lights.
  4. Limiting the Attenuation Radius of Point, Spot, and Rect lights can help performance by reducing the number of objects that need to be shadowed.

When improving shadows in Unreal Engine 5 architectural scenes, you need to consider not only light quality but also scene performance and the geometry in use. Epic’s official documentation describes Virtual Shadow Maps (VSM) as a high-resolution method designed to work with Nanite. This guide covers the essentials, from project settings and soft-shadow controls to limiting the cost of lights.

1. Choose the shadow method that fits your project

First, determine whether your project uses Nanite. VSM is designed to work with Nanite’s virtualized geometry. Epic notes that VSM may not be suitable if Nanite isn’t used in the project or on the target platform. In projects that do use Nanite, traditional shadow maps aren’t supported alongside Stationary lights; in that case, use Movable lights or VSM.

You can choose the method under the Shadows section of Project Settings › Engine › Rendering. Use the Shadow Map Method setting to select either Virtual Shadow Maps or traditional Shadow Maps. Projects created before Unreal Engine 5.0 may need VSM enabled separately, either through the project setting or with the r.Shadow.Virtual.Enable variable. VSM is enabled by default in new projects.

VSM creates a virtual map at a resolution of 16K × 16K, divided into 128 × 128-pixel pages. It processes the pages needed for visible pixels and caches them between frames unless they’re invalidated. This approach focuses on visible areas rather than rendering the entire map again every frame.

2. Control soft shadows through the light source

Shadow Map Ray Tracing (SMRT), used with VSM, creates light-source-dependent softening and contact hardening along shadow edges. Source Radius affects Point and Spot lights, while Source Angle affects Directional lights. Increasing the source size softens shadows, but excessive values can affect performance and cause visual artifacts when the camera gets close to a shadow edge.

Epic’s documentation states that local lights have no Source Radius value set by default, while Directional lights have a low default value for Source Angle. The documentation also includes an example Point Light with a Source Radius of 10; this should be treated as an example setting, not a recommendation for every scene.

You can also adjust SMRT quality by changing the number of rays and samples per ray. At Epic’s Quality shadow scalability level, local and directional lights use eight rays by default. Reducing the ray count can make noise more visible; setting it to zero disables SMRT and switches to a hard shadow with a single sample. The documentation gives 4 to 8 as a suitable range for samples per ray.

Prompt
r.Shadow.Virtual.SMRT.RayCountLocal
r.Shadow.Virtual.SMRT.RayCountDirectional
r.Shadow.Virtual.SMRT.SamplesPerRayLocal
r.Shadow.Virtual.SMRT.SamplesPerRayDirectional
SettingValue given in the documentationEffect
SMRT ray countDefault of 8 at Epic’s Quality levelReducing it can increase noise in soft shadows.
Samples per ray4–8Fewer samples are cheaper but limit the available range of softness.
SMRT ray count0SMRT is disabled and shadows become hard.

3. Limit local lights’ influence and shadows

For Point, Spot, and Rect lights, Attenuation Radius limits the area affected by the light. Epic notes that this area isn’t intended to be physically accurate; setting limits is important for performance when lights cast dynamic shadows. A smaller radius can also reduce the number of objects affected by the light that need to be shadowed.

Each light’s Cast Shadow property toggles its contribution to shadows. Turning it off can help performance when the shadow doesn’t meaningfully contribute to the scene, the light covers a large area, or it affects highly detailed geometry. After making changes, check how they affect ground contact in the frame and how clearly objects read in the space.

VSM’s high resolution can reduce the need for Contact Shadows to create sharp contact shadows. Epic notes that this feature may be less accurate than shadows produced by VSM and isn’t recommended for general use. It may be worth considering for specific needs, such as getting lower-cost shadows from objects that don’t participate in suitable shadow maps.

4. A checklist for architectural and interior workflows

In close-up interior renders, soft shadows can be key to making furniture sit on the floor and defining transitions between surfaces. In exteriors and large scenes, Directional lights’ clipmap structure provides more detail in areas closer to the camera. Epic recommends using Directional lights where possible, since local lights illuminating very large areas can hit resolution limits.

Shadows from Static or Stationary lights in the editor are previews until lighting has finished building; they don’t represent the final result. You can build lighting with Build › Build All Levels. To hide the preview indicator, go to Show › Visualize › Preview Shadows Indicator in the Level Viewport.

Common mistakes

  • Assuming VSM is automatically the best option in a project that doesn’t use Nanite.

  • Increasing Source Radius or Source Angle too much, which can negatively affect performance and the appearance of shadows.

  • Reducing the ray count without checking for noise in the shadows.

  • Not limiting the Attenuation Radius and shadow contribution of lights to suit the needs of the scene.

  • Mistaking preview shadows from Stationary or Static lights for the final, built result.

There’s no single value that works for these settings: scene geometry, light type, camera distance, and the intended image all need to be considered together. Start by choosing the right shadow method, then adjust the light source size and area of influence, checking the visual result as you go.

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 studios in Turkey, VSM’s practical value lies in its ability to manage shadows alongside detailed geometry in scenes that use Nanite. However, its effect on hardware or project performance depends on the scene. Rather than giving every light a large area of influence, a better starting point is to review which lights actually cast shadows and the areas they cover.

Reducing SMRT settings isn’t necessarily the right optimization on its own: a lower ray count can increase shadow noise. Checking changes in the frame can help prevent quality loss, especially in interiors where soft shadows matter. It’s also important to account for the fact that older projects may need VSM enabled separately, and that light previews don’t show the final result.

Frequently asked questions

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

In Project Settings, go to Engine › Rendering and select Virtual Shadow Maps under Shadow Map Method in the Shadows section. Projects created before Unreal Engine 5.0 may need to enable it separately.

Should you use Virtual Shadow Maps without Nanite?

Epic describes VSM as designed for use with Nanite and notes that it may not be suitable for projects or target platforms that don’t use Nanite.

How do you adjust soft-shadow quality in Unreal Engine?

Source Radius affects shadow softness for local lights, while Source Angle affects it for Directional lights. SMRT ray and sample counts also affect quality and performance cost.

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

Related news