Back to course overview

Part 2: DIRECT LIGHTING

⏱️ ~61 minπŸ“‘ 7 sections

What you'll learn:

  • The 4 light types and when to use each
  • How shadow softness works (the one principle that explains it all)
  • The shadow systems you can choose from: CSM, VSM, Distance Fields, and Hardware Ray Tracing

Section 3: Light Types & Properties (18 min)

You can find all light types in the Place Actors panel under Lights:

Light Types ToolbarLight Types Toolbar

Spot Light

  • Directional cone-shaped emission
  • Inner/outer cone angles control falloff
  • Good for: Stage lights, flashlights, focused fixtures, car headlights

Spot Light ExampleSpot Light Example

Point Light

  • Emits equally in all directions from a point
  • Like a bare light bulb
  • Most expensive light type β€” internally calculated as 6 spot lights (one for each direction of a cube)
  • Good for: Lamps, candles, small fixtures

Point Light ExamplePoint Light Example

Rect Light

  • Emits from a rectangular surface
  • Most accurate for panel lights, softboxes, LED panels
  • Has Source Width/Height properties
  • Expensive β€” calculates light contribution across the entire rectangular area, not a single point. More accurate area lighting = more computation.
  • Good for: Studio lighting, product visualization, industrial panels

Rect Light ExampleRect Light Example

Directional Light

  • Parallel rays from infinitely far away
  • No falloff β€” same intensity everywhere
  • Has Source Angle property (affects shadow softness)
  • Typically only one in a scene β€” represents the sun. With advanced understanding, you can have multiple (e.g., sun and moon) but this requires careful setup.
  • Intensity measured in Lux, not Lumens β€” because the sun is so large that Lumens would be an impractically small measurement

Directional Light ExampleDirectional Light Example

Note: We'll cover light units and measurements in Part 6: Exposure.

Like meshes, lights also have a Mobility setting:

Light Mobility PanelLight Mobility Panel

Light Mobility SettingLight Mobility Setting

For lights, Mobility controls how they interact with baked vs dynamic lighting:

MobilityNormal BehaviorWith Force No Precompute
StaticFully baked into lightmapsBehaves like Moveable (no bake)
StationaryBaked indirect + real-time directBehaves like Moveable, but keeps some shadow caching optimizations
MoveableFully dynamic every frameNo change β€” already fully dynamic

Performance: Static and Stationary lights normally offer significant performance savings through baked lightmaps and cached shadows. With Force No Precompute enabled, those baked benefits are eliminated β€” lighting calculations become fully dynamic for all lights. However, mobility still matters: Static lights have lower transform overhead (like Static meshes), and Stationary lights can still benefit from cached shadow maps.

Tip: For this course, we're using Moveable lights with Lumen for fully dynamic global illumination. This gives us real-time feedback as we learn.

Note: Baked lighting workflows and mobility optimization strategies are separate topics we won't cover here.

PropertyWhat It Does
IntensityHow bright the light is
Intensity UnitsUnit system: Lumens, Candelas, Lux, or Unitless
Light ColorTint of the light
TemperatureColor on Kelvin scale (2700K warm β†’ 6500K cool)
Attenuation RadiusHow far light reaches (Distance - White Lines)
Source Radius / Source AngleSize of light source (affects shadow softness + specular highlight - Yellow Lines)
Source LengthStretches the light into a tube/line shape (creates elongated specular highlights, useful for fluorescent tubes)
Cast ShadowsOn or Off β€” whether this light casts shadows at all
Indirect Lighting IntensityHow much this light contributes to GI bounce
Volumetric Scattering IntensityHow visible this light is in fog/volumetrics
Spot LightPoint Light
Spot Light SettingsSpot Light SettingsPoint Light SettingsPoint Light Settings
Rect LightDirectional Light
Rect Light SettingsRect Light SettingsDirectional Light SettingsDirectional Light Settings

Unreal uses real-world photometric units. Local lights and Directional lights use different units:

Local Lights (Point, Spot, Rect):

UnitWhat It MeasuresExample
Lumens (lm)Total light output (all directions)Interior light: 1,000 lm
Candelas (cd)Intensity in one directionCar headlight: 30,000 cd
UnitlessArbitrary brightness valueArtistic control, legacy projects

Intensity Units DropdownIntensity Units Dropdown

Directional Light (Sun/Moon):

UnitWhat It MeasuresExample
Lux (lx)Light arriving at a surfaceSun at noon: 100,000 lx

Lux Setting for Directional LightLux Setting for Directional Light

Why Lux for Directional? The sun's total lumen output would be an impractically large number. Lux measures light landing on a surface β€” much more useful for sunlight.

Mental model:

  • Lumens = how much total light leaves the bulb
  • Candelas = how bright it is looking directly at the beam
  • Lux = how much light lands on your desk

Why Use Lumens?

  • Real-world reference β€” Look up any bulb's specs and use that value directly
  • Consistent across light types β€” 1000 lm Point Light = 1000 lm Spot Light (same total output)
  • Predictable exposure β€” Camera settings work correctly when lights use physical values

Note: We'll cover physical light values and exposure in detail in Part 6: Exposure.

Attenuation controls how far a light's influence extends. All distances in Unreal are in centimeters (1 Unreal Unit = 1 cm).

Attenuation Radius SettingAttenuation Radius Setting

Light TypeAttenuation Behavior
SpotAttenuation Radius β€” Distance in cm, plus Inner/Outer Cone Angle for cone shape and falloff
PointAttenuation Radius β€” Diameter in cm
RectAttenuation Radius β€” Diameter in cm
DirectionalNo attenuation β€” parallel rays from infinitely far away, affects entire scene
Spot LightPoint LightRect Light
Spot Light AttenuationSpot Light AttenuationPoint Light AttenuationPoint Light AttenuationRect Light AttenuationRect Light Attenuation

Tip: Attenuation Radius controls how far light travels. Source Radius/Angle controls shadow softness. These are independent β€” increasing one doesn't affect the other.


Section 4: Shadows β€” Soft vs Hard (10 min)

What Determines Shadow Softness?

The bigger the apparent size of the light source, the softer the shadow.

Shadow softness depends on the apparent size of the light source as seen from the subject β€” not its actual size.

A light source can be massive, but if it's far away, it appears small and creates hard shadows.

Apparent Size = Actual Size Γ· Distance

How Real-World Lights Work

The Sun β€” Hard Shadows

The sun is enormous (1.4 million km diameter), but it's 150 million km away. From Earth, it only spans about 0.5 degrees of the sky β€” a tiny dot.

Result: Sharp, hard-edged shadows on a clear day.

TODO: Add real-world sun hard shadow reference image

Overcast Sky β€” Soft Shadows

When clouds roll in, the sun's light scatters through the cloud layer. Now the entire sky becomes your light source β€” thousands of times larger in apparent size.

Result: Soft, diffused shadows (or nearly invisible shadows).

TODO: Add overcast soft shadow reference image

A Bare Bulb β€” Changes with Distance

Move a bare light bulb close to an object:

  • Bulb appears large relative to subject
  • Soft shadows

Move the same bulb far away:

  • Bulb appears small (approaches a point)
  • Hard shadows

This is the inverse of what you might expect β€” for a given source size, moving the light closer increases its apparent size relative to the subject, creating softer shadows.

The Photography Studio Approach

Photographers figured this out long ago:

TechniqueWhat It DoesShadow Result
Large softbox close to subjectMaximizes apparent sizeVery soft
Small softbox far from subjectMinimizes apparent sizeHarder
Bare flash far awayPoint sourceHard edge
Bounce off ceilingEntire ceiling becomes sourceSoft fill

Your light box works the same way β€” it's a large diffuse panel placed close to the product, maximizing apparent size for soft, even illumination.


Now let's see how Unreal implements these concepts with specific controls per light type.

Source Radius / Source Angle

Unreal simulates shadow softness with different controls per light type:

For Point/Spot Lights: Source Radius

  • Simulates the physical size of the bulb/fixture
  • Larger radius = softer shadows
  • 0 = infinitely small point = hard shadows

With Source Radius = 0, you get sharp, hard-edged shadows:

Source Radius ZeroSource Radius Zero

Hard Shadow from Point LightHard Shadow from Point Light

Increase the Source Radius to simulate a larger light source:

Source Radius LargeSource Radius Large

Soft Shadow from Point LightSoft Shadow from Point Light

Notice how the shadow edges become softer and more gradual β€” this is physically accurate to how real area lights behave.

For Directional Light: Source Angle

  • Simulates the angular size of the sun disk
  • 0.5Β° β‰ˆ real sun on clear day (hard shadows)
  • Larger values = overcast sky effect (soft shadows)
  • 5Β°+ = heavily overcast, very soft
  • Typically you don't need to change this β€” the default is physically accurate for sunlight

With a small Source Angle (like the real sun):

Source Angle SmallSource Angle Small

Directional Hard ShadowDirectional Hard Shadow

Increase the Source Angle to simulate overcast conditions:

Source Angle LargeSource Angle Large

Directional Soft ShadowDirectional Soft Shadow

Note: Realistically, the sun rarely exceeds ~5Β° Source Angle. Setting the angle too high can introduce artifacts and noise in shadows. Achieving truly soft directional lighting (like heavy overcast) requires additional techniques we'll cover later.

For Rect Lights: Source Width/Height

  • Physical dimensions of the light panel
  • Larger panel = softer shadows
  • Directly matches real softbox behavior

Small Source Width/Height values create harder shadows:

Rect Light Dimensions SmallRect Light Dimensions Small

Rect Light Hard ShadowRect Light Hard Shadow

Larger dimensions create softer, more diffused shadows:

Rect Light Dimensions LargeRect Light Dimensions Large

Rect Light Soft ShadowRect Light Soft Shadow

Distance Still Matters

In Unreal, the Source Radius/Angle is the base softness. The actual shadow softness also depends on:

  • Distance from light to object (affects apparent size)
  • Distance from object to shadow-receiving surface (affects penumbra spread)

Light close to subject β€” larger apparent size, softer shadows:

Point Light ClosePoint Light Close

Same light moved further away β€” smaller apparent size, harder shadows:

Point Light FarPoint Light Far

A Rect Light that looks soft up close will cast harder shadows on distant objects β€” just like reality.

Tip: This is why photographers use large softboxes positioned close to their subjects. The combination of large size + close distance maximizes shadow softness.


Section 5: Shadow Systems Theory (5 min)

UE5 provides multiple shadow systems. Most modern UE5 projects use Virtual Shadow Maps (VSM), but it's important to understand the full landscape β€” including the legacy approach.

MethodHow It WorksBest For
Shadow MapsTraditional shadow mapping β€” uses CSM for Directional Lights, standard shadow maps for local lightsLegacy projects, non‑VSM workflows, simpler tuning
Virtual Shadow Maps (VSM)Rasterized shadow maps with intelligent tiling/cachingDefault choice β€” works on any GPU
Distance Field ShadowsPre-computed mesh distance fields for soft area shadowsLarge environments, long-distance soft shadows
Hardware Ray TracedReal-time ray casting via RTX/DXRCinematics, accurate area light shadows

Terminology Note: Shadow Maps is the method (project setting). Cascade Shadow Maps (CSM) is a technique within that method, specifically used for Directional Lights. Local lights (Point, Spot, Rect) use traditional shadow maps without cascades.

The methods differ most visibly in how they handle shadow softness from area lights:

  • Shadow Maps (including CSM) use depth-based shadow mapping β€” stable and fast, but produces hard shadows by default. Soft shadows require PCSS filtering.
  • VSM calculates penumbra mathematically β€” applies a blur to shadow edges. The shadow shape is always the same regardless of light geometry.
  • Distance Fields approximate area shadows using mesh distance data β€” creates soft shadows but with resolution limitations.
  • Hardware RT actually traces rays to different points on the light source β€” the shadow shape reflects the light's physical geometry (rectangular penumbra from Rect Lights, round from Source Radius).

Section 6: Shadow Maps Method (Legacy) (5 min)

The Shadow Maps method is the classic UE4-era approach β€” it's a project-level setting that determines how all dynamic shadows are rendered. Within this method, different light types use different techniques:

Light TypeShadow Map Technique
Directional LightsCascade Shadow Maps (CSM) β€” splits view into distance-based cascades
Point LightsStandard shadow map (rendered as 6 faces of a cube)
Spot LightsStandard shadow map (single projection)
Rect LightsStandard shadow map (single projection)
Shadow MapsVSM
Shadow MapsShadow MapsVSM ShadowVSM Shadow

Cascade Shadow Maps split the camera's view frustum into multiple distance bands ("cascades"), each with its own shadow map:

  • Near camera = highest resolution shadows
  • Far from camera = lower resolution shadows

This technique addresses the resolution problem unique to Directional Lights β€” they illuminate the entire scene, so a single shadow map would be stretched too thin.

  • Shadow Maps dynamic shadows are relevant for Stationary and Moveable lights.
  • Static lights normally rely on baked shadows (Lightmass). If you're using Force No Precomputed Lighting, you won't get baked shadows anyway.
  • You're maintaining a legacy project or pipeline that already relies on Shadow Maps tuning
  • You're intentionally avoiding VSM for compatibility or simplicity reasons

In project settings:

Edit β†’ Project Settings β†’ Engine β†’ Rendering β†’ Shadows β†’ Shadow Map Method

  • Shadow Maps = Traditional shadow mapping (CSM for Directional, standard for local lights)
  • Virtual Shadow Maps = Modern VSM workflow

(TODO: Add screenshot of Shadow Map Method setting.)

When using the Shadow Maps method, CSM tuning for Directional Lights happens in the light's Details panel:

  • Dynamic Shadow Distance (MovableLight / StationaryLight): how far CSM shadows render
  • Num Dynamic Shadow Cascades: how many cascades (more = higher quality, higher cost)
  • Cascade Distribution Exponent: pushes more resolution near camera (higher = tighter near camera)
  • Cascade Transition Fraction: blends between cascades to reduce visible "bands"

Tip: If you see cascade "popping" while moving the camera, increase the transition fraction and/or adjust the distribution exponent.

All lights using the Shadow Maps method produce hard shadows by default:

Light TypeWhy Hard Shadows by Default
Directional LightsCSM technique stores depth comparisons β€” inherently sharp-edged
Point / Spot / Rect LightsDefault Source Radius = 0 β€” represents a point source, which creates hard shadows

This is a fundamental limitation of depth-based shadow mapping. The shadow map stores "is this pixel in shadow?" as a binary yes/no, resulting in sharp edges.

To get soft shadows in Shadow Maps mode, you have two options:

Option 1: PCSS Filtering (affects all lights)

r.Shadow.FilterMethod 1

This enables Percentage-Closer Soft Shadows (PCSS), which dynamically adjusts shadow softness based on the distance between occluder and receiver.

Note: PCSS adds a performance cost and may introduce aliasing artifacts in some scenarios.

Option 2: Increase Source Radius (local lights only)

For Point, Spot, and Rect lights, increasing the Source Radius property (or Source Width/Height for Rect Lights) will produce softer shadows β€” but only when combined with PCSS or other filtering.

  • Hard shadow edges: All lights produce hard shadows by default
  • Cascade lines / popping: (Directional only) transitions between cascades become visible during movement
  • Aliasing / stair-step edges: limited resolution, especially in mid/far cascades
  • Shadow "swimming": (Directional only) subtle instability as the cascades re-fit around the camera

Section 7: Virtual Shadow Maps (5 min)

VSM is UE5's default shadow system β€” enabled automatically when you create a project.

VSM ShadowVSM Shadow

VSM uses massive 16KΓ—16K shadow textures split into tiles, with different structures per light type:

Light TypeVSM Structure
DirectionalClipmap β€” expanding ranges around camera, each level is 16K covering twice the radius of the previous
SpotSingle 16K VSM with mip chain for level of detail
PointCube map of 16K VSMs (one per face)
RectSingle 16K VSM with mip chain specialized for rectangular projections and soft area shadowing
  1. Scene is divided into pages/tiles
  2. Only visible tiles get rendered
  3. Tiles near camera get higher resolution
  4. Distant tiles get lower resolution
  5. Results are cached and reused across frames

Note: Local lights provide significant resolution increase vs traditional shadow maps, but very large local lights can run out of virtual resolution. Use Directional Lights for large-scale shadows.

VSM is the right default for most projects:

  • Works with all light mobilities (Static, Stationary, Moveable)
  • Works on any GPU β€” no special hardware required
  • Excellent shadow detail and resolution
  • Handles many lights efficiently
  • Good performance with static or slow-moving content

VSM behaves differently depending on distance and mesh type:

Far Distance:

  • Nanite vs Non-Nanite meshes may have different shadow behavior at long distances
  • VSM clipmaps handle this automatically, but you may see quality differences

Close Distance:

  • Generally excellent detail due to high virtual resolution
  • The clipmap system allocates more pages near the camera

VSM builds quality over multiple frames through temporal accumulation. When the camera or objects move quickly:

  • Flickering at shadow edges
  • Shimmering artifacts
  • A "crawling" look during camera motion

This isn't a bug β€” it's the cache updating. Usually subtle, but noticeable on fast-moving shots.

VSM calculates soft shadows mathematically based on Source Radius/Angle and distance. The softness looks good, but it's an approximation β€” all lights produce the same generic soft edge regardless of their actual shape.

Penumbra noise is controlled by ray count. At Epic scalability, both local and Directional Lights use 8 rays by default.

Console VariableWhat It Controls
r.Shadow.Virtual.SMRT.RayCountLocalRays for local lights (Point, Spot, Rect)
r.Shadow.Virtual.SMRT.RayCountDirectionalRays for Directional Lights
r.Shadow.Virtual.SMRT.SamplesPerRayLocalSamples per ray (local)
r.Shadow.Virtual.SMRT.SamplesPerRayDirectionalSamples per ray (Directional)
  • Fewer rays = visible noise in penumbra
  • Setting to 0 = disables SMRT, reverts to single-sample hard shadows

Most VSM controls live under these namespaces:

  • r.Shadow.Virtual.* β€” general VSM settings (resolution, caching, page management)
  • r.Shadow.Virtual.SMRT.* β€” soft shadow ray tracing settings (ray counts, samples)

Tip: Use r.Shadow.Virtual. in the console and press Tab to see all available options.

To visualize how VSM is working, use the viewport debug modes:

Show β†’ Virtual Shadow Map β†’ [Visualization Mode]

VSM Debug VisualizationVSM Debug Visualization

ModeWhat It Shows
Shadow MaskWhich areas are in shadow
Clipmap/Mip LevelResolution distribution across the scene
Virtual PageHow pages are allocated
Cached PageWhich pages are being reused

Tip: VSM is already enabled by default. You don't need to change any settings unless you want to use a different shadow system.


Section 8: Distance Field Shadows (8 min)

Distance Field Shadows use pre-computed Mesh Distance Fields to create soft area shadows.

Important: Distance Field Shadows only work with Stationary and Moveable lights. Static lights cannot use Distance Field shadows.

VSM (Default)Distance Field
VSM ShadowVSM ShadowDF ShadowDF Shadow

Notice how Distance Field shadows have a different softness character β€” they use the mesh's distance field data rather than mathematical blur.

A distance field stores, for every point in space around a mesh, how far away the nearest surface is. This pre-computed data lets the engine quickly determine shadow coverage without tracing individual rays.

Distance fields are generated at mesh import time, but the system must be enabled in project settings.

Enable Mesh Distance Fields

Required for Distance Field Shadows.

Edit β†’ Project Settings β†’ Engine β†’ Rendering β†’ Software Ray Tracing

β˜‘ Generate Mesh Distance Fields

After enabling, reimport meshes or restart the editor for distance fields to generate.

Per-Light Enable:

Distance Field Shadows SettingDistance Field Shadows Setting

  • Select the light actor
  • Details panel β†’ Distance Field Shadows: Enabled

Distance Field SettingsDistance Field Settings

This is an important distinction for Directional Lights:

Shadow SystemDistance Field Behavior
CSM (Shadow Maps)Distance Fields and CSM work together. You can use both simultaneously β€” CSM for near shadows, Distance Fields for distant soft shadows. You can also disable CSM entirely and use only Distance Fields.
VSM (Virtual Shadow Maps)Distance Fields and VSM are mutually exclusive for Directional Lights. You choose one or the other β€” enabling Distance Field Shadows disables VSM for that light, and vice versa. CSM settings have no effect when using VSM.

Why the difference? CSM and Distance Fields are separate systems that can complement each other. VSM is a unified system that replaces both β€” it handles near and far shadows internally, so Distance Fields become an alternative rather than a supplement.

Good for:

  • Large open worlds with distant shadows
  • Soft area shadows from Directional Lights
  • Stylized projects where approximate softness is acceptable

Limitations:

  • Resolution depends on distance field quality
  • Thin geometry may not cast accurate shadows
  • Memory overhead from distance field data
  • Less accurate than hardware ray tracing for close-up area light shadows
SettingWhat It Does
Distance Field Shadow DistanceHow far DF shadows extend from camera
Ray Start Offset Depth ScaleAdjusts shadow start point to reduce artifacts

Note: With CSM workflow, Distance Field Shadows and CSM can work together β€” DF for distant/soft shadows, CSM for nearby detail. With VSM, you choose one or the other.

To visualize mesh distance fields in the viewport:

Show β†’ Visualize β†’ Mesh DistanceFields

Mesh Distance Fields VisualizationMesh Distance Fields Visualization

If meshes appear pink/magenta, distance fields are not generated for them β€” check that Generate Mesh Distance Fields is enabled and reimport the meshes.


Section 9: Hardware Ray Traced Shadows (10 min)

Hardware Ray Traced shadows use your GPU's RTX/DXR hardware to physically trace shadow rays. This produces the most accurate results but requires compatible hardware.

Mobility: Hardware RT shadows work with all light mobilities (Static, Stationary, Moveable).

VSMDistance FieldHardware RT
VSMVSMDFDFRTRT

Notice the shadow shape differences β€” RT shadows reflect the actual light geometry with physically accurate penumbras.

With hardware ray tracing, Unreal shoots rays from surfaces toward the light source:

  • Point lights: One ray toward a single point β€” simple shadow
  • Area lights (Rect Light, lights with Source Radius): Multiple rays toward different points across the light's surface

The result: shadow shapes that actually reflect the light's geometry. A Rect Light casts a shadow with a rectangular penumbra. A light with Source Radius creates round soft edges. This matches real-world photography.

Use RT shadows when:

  • You need accurate shadow shapes from area lights
  • You're doing cinematics or virtual production
  • Shadow quality is critical to your visual target
  • You have RTX hardware and frame budget to spare

Stick with VSM/Distance Fields when:

  • You need to support non-RTX hardware
  • Performance is critical (real-time gameplay)
  • Shadow shape accuracy isn't important to your art style

Tip: Many projects use both β€” VSM for gameplay, RT for cutscenes. You can switch per-light or globally.

Far Distance β€” Culling CVars:

At far distances, Unreal culls objects from the ray tracing scene (TLAS) to save performance. This can cause shadows to disappear on distant objects.

Console VariableDefaultWhat It Does
r.RayTracing.Culling3Master culling mode (0 = disabled)
r.RayTracing.Culling.Radius10000Max distance for RT geometry
r.RayTracing.Culling.Angle1Solid-angle culling multiplier

Solid-Angle Culling Explained:

The r.RayTracing.Culling.Angle CVar controls "cone" culling β€” it removes objects that appear too small in angle from the camera's perspective, especially outside the direct view.

  • Base threshold is 5 degrees, and the CVar is a multiplier
  • Default 1 = ~5Β° threshold
  • 0.5 = ~2.5Β° (less aggressive, keeps more geometry)
  • 0 = disable culling entirely (expensive)

Tip: If distant objects are missing RT shadows, try r.RayTracing.Culling 0 to test, then tune the radius/angle for your scene.

Close Distance β€” Near Clip:

For very close objects, RT can miss geometry due to camera near clip settings. If RT shadows disappear on close objects:

Console VariableDefaultWhat It Does
r.SetNearClipPlane1Sets the camera near clip plane distance
r.SetNearClipPlane 0.005

This allows RT to trace geometry much closer to the camera (useful for product visualization, VR, etc.).

Step 1: Enable Hardware Ray Tracing

Enable Hardware Ray Tracing

Master switch for all RT features. Requires editor restart.

Edit β†’ Project Settings β†’ Engine β†’ Rendering β†’ Hardware Ray Tracing

β˜‘ Support Hardware Ray Tracing

Hardware Ray Tracing SettingsHardware Ray Tracing Settings

Step 2: Enable RT Shadows

Per-Light (Recommended) β€” Selective control:

  • Select light actor
  • Details panel β†’ Cast Ray Traced Shadows: Enabled

Cast Ray Traced Shadows - Use Project SettingCast Ray Traced Shadows - Use Project Setting

Cast Ray Traced Shadows - EnabledCast Ray Traced Shadows - Enabled

Global β€” All lights use RT:

Enable Ray Traced Shadows Globally

Enables RT shadows for all lights in the project at once.

Edit β†’ Project Settings β†’ Engine β†’ Rendering β†’ Ray Tracing

β˜‘ Ray Traced Shadows

Ray Traced Shadows Global SettingRay Traced Shadows Global Setting

ApproachHardware RTPer-Light SettingGlobal Setting
Selective RTβœ“ Requiredβœ“ On lights you wantNot needed
All RTβœ“ RequiredNot neededβœ“ Enabled

RT shadows use sampling β€” more rays = cleaner shadows but higher GPU cost.

Why noise happens: With limited rays, you're sampling a probability. 4 rays might give 2 blocked, 2 unblocked = 50% shadow. More samples averages this out for cleaner results.

Per-Light: Details panel β†’ Ray Tracing β†’ Samples Per Pixel

Global: Console variable r.RayTracing.Shadow.SamplesPerPixel [value]

SamplesQualityUse Case
1NoisyReal-time preview
2-4BalancedGeneral gameplay
4-8+CleanCinematics, final renders

Samples Per Pixel - 1 sampleSamples Per Pixel - 1 sample

1 Sample - Noisy Shadow1 Sample - Noisy Shadow

Samples Per Pixel - 10 samplesSamples Per Pixel - 10 samples

10 Samples - Clean Shadow10 Samples - Clean Shadow

Key Points:

  • UE5 supports multiple shadow systems, including legacy CSM and modern VSM
  • VSM works on any GPU with good quality; shows temporal artifacts on fast motion
  • Distance Fields enable long-distance soft shadows (Stationary/Moveable only)
  • Hardware RT produces accurate shadow shapes but requires RTX hardware
  • Choose based on your hardware targets, performance budget, and visual requirements