Back to Lighting

Part 9: AMBIENT OCCLUSION SYSTEMS

~18 min3 sections

What you'll learn:

  • The three AO methods: SSAO, DFAO, and RTAO
  • Where each method's settings live (Project Settings, Post Process Volume, Sky Light)
  • How AO methods interact, combine, and override each other
  • Detailed settings and configuration for each method

Section 34: AO Systems Theory (5 min)

Unreal provides three methods for calculating ambient occlusion. Understanding where each method's settings live is key to controlling them.

MethodFull NameSettings LocationRequirements
SSAOScreen Space Ambient OcclusionPost Process VolumeNone (default)
DFAODistance Field Ambient OcclusionSky LightMovable Sky Light + Distance Fields
RTAORay Traced Ambient OcclusionPost Process VolumeHardware Ray Tracing + RT GPU

AO settings are spread across three locations:

LocationControls
Project SettingsMaster on/off, Distance Field generation
Post Process VolumeSSAO settings, RTAO enable/settings
Sky LightDFAO settings, Combine Mode

This is important: AO methods don't just exist independently — they have a priority system.

PriorityMethodBehavior
HighestRTAOWhen enabled, overrides both SSAO and DFAO
MidDFAO + SSAOCombine based on Sky Light's Combine Mode setting
LowestSSAO aloneUsed when DFAO is unavailable

Section 35: SSAO, DFAO & RTAO (8 min)

Settings Location: Post Process Volume

SSAO calculates occlusion using only the rendered depth buffer — what's visible on screen.

How it works:

  1. For each pixel, sample nearby depth values
  2. If nearby pixels are closer (occluding geometry), darken the pixel
  3. Blur the result for smoother occlusion

Pros:

  • Works on any geometry
  • No precomputation required
  • Fast and widely compatible

Cons:

  • View-dependent — occlusion changes as camera moves
  • Limited to screen-space information
  • Can miss occlusion from off-screen geometry

Settings Location: Sky Light (must be Movable)

DFAO uses the Mesh Distance Fields we enabled in Part 2 and used for shadows in Part 4.

Requirements:

  1. Project Settings: Generate Mesh Distance Fields must be enabled
  2. Sky Light Mobility: Must be set to Movable (Static/Stationary Sky Lights cannot use DFAO)

Why Movable? DFAO requires dynamic world-space calculations. Static and Stationary Sky Lights use baked precomputed lighting and cannot access distance field data for dynamic AO.

How it works:

  1. For each pixel, ray march through the distance field data
  2. Distance fields provide occlusion information from all geometry (not just on-screen)
  3. Result is view-independent and stable

Pros:

  • View-independent — consistent regardless of camera angle
  • Stable, dynamic, works in world space
  • Handles large-scale occlusion well

Cons:

  • Requires Movable Sky Light
  • Resolution limited by distance field quality
  • Doesn't capture small detail as well as SSAO

Threading the Distance Field story: We enabled Distance Fields in Part 2, used them for soft shadows in Part 4, and now use them again for DFAO. Later, in Part 11: Indirect Lighting Systems, Distance Fields will appear again for Lumen's software ray tracing.


Settings Location: Post Process Volume

RTAO performs accurate AO via hardware ray tracing, independent of screen space or distance fields.

Requirements:

  1. Project Settings: Support Hardware Ray Tracing enabled
  2. Hardware: RTX/DXR capable GPU + DirectX 12
  3. Post Process Volume: Ray Traced Ambient Occlusion enabled

How it works:

  1. For each pixel, trace rays into the scene
  2. Rays test against actual geometry for occlusion
  3. Result is physically accurate

Pros:

  • Highest quality AO
  • Accurate for all geometry sizes
  • View-independent

Cons:

  • Requires RT hardware
  • Most expensive method
  • May have noise at low sample counts

When Ray Traced AO is enabled in your Post Process Volume, it replaces both SSAO and DFAO. This is the highest quality option and fully overrides other methods.

When both DFAO and SSAO are active (no RTAO), they combine based on the Combine Mode setting on the Sky Light:

Combine ModeBehavior
MinimumTakes the darker of the two values at each pixel
MultiplyMultiplies both AO values together (darker overall)

This allows DFAO to handle large-scale occlusion while SSAO adds fine contact detail.


ScenarioRecommendation
Highest quality (RT hardware)RTAO — overrides other methods
Most projects (no RT)DFAO + SSAO combined — best of both
Interior small detailsSSAO (better at small-scale occlusion)
Outdoor large-scaleDFAO (more stable at distance)
Performance-criticalSSAO only (cheapest)

Section 36: AO Settings & Configuration (5 min)

With your Post Process Volume selected, navigate to:

Details Panel > Rendering Features > Ambient Occlusion
SettingWhat It DoesDefaultTypical Range
IntensityStrength of darkening (0 = off)0.50.3 – 1.0
RadiusHow far to check for occlusion (cm)200100 – 400
PowerContrast curve of the occlusion2.01.0 – 4.0
QualitySample count (noise vs performance)ScalabilityLeave default

To disable SSAO explicitly:

  • Set Intensity to 0, or
  • Uncheck the Ambient Occlusion override entirely

If you have hardware ray tracing enabled, you'll find RTAO settings in the same section:

Details Panel > Rendering Features > Ambient Occlusion:
    Ray Traced Ambient Occlusion: ✓ On
SettingWhat It DoesDefaultNotes
Ray Traced Ambient OcclusionEnable RTAO (overrides SSAO/DFAO)OffRequires RT hardware
IntensityStrength of ray traced AO1.00.0 – 1.0
RadiusRay trace distance200Larger = more distant occlusion
Samples Per PixelRay count (quality vs noise)1Higher = cleaner but slower

Note: When RTAO is enabled, it completely replaces SSAO and DFAO. You don't need to disable them separately.


DFAO is controlled through your Movable Sky Light:

Sky Light > Details > Distance Field Ambient Occlusion
SettingWhat It DoesDefault
Occlusion Max DistanceHow far DFAO traces (cm)1000
Occlusion ContrastHow dark the occlusion gets0.5
Occlusion ExponentFalloff curve of occlusion1.0
Min OcclusionMinimum darkness (prevents pure black)0.0
Occlusion TintColor tint applied to occluded areasBlack
Occlusion Combine ModeHow DFAO combines with SSAOMinimum

Combine Mode Explained

ModeResult
MinimumUses the darker value from DFAO or SSAO at each pixel
MultiplyMultiplies DFAO × SSAO (darker overall, richer AO)

For most projects, Multiply produces richer ambient occlusion by letting both methods contribute.


If using RTAO, you can also enable ray traced shadows from the Sky Light:

Sky Light > Details > Light:
    Cast Ray Traced Shadow: ✓ On

This enhances AO and indirect lighting quality by casting ray traced shadows from the sky light. Only effective when RTAO is enabled.


Best Quality (with RT hardware)

Post Process Volume:
    Ray Traced Ambient Occlusion: ✓ On
    Samples Per Pixel: 2-4 (balance quality/performance)

Sky Light:
    Cast Ray Traced Shadow: ✓ On

RTAO overrides SSAO and DFAO automatically.

Good Quality (without RT hardware)

Project Settings:
    Generate Mesh Distance Fields: ✓ On
    Ambient Occlusion: ✓ On

Sky Light (Movable):
    Occlusion Combine Mode: Multiply
    Occlusion Contrast: 0.5

Post Process Volume:
    Intensity: 0.5
    Radius: 200

DFAO handles large-scale, SSAO adds fine detail, Multiply combines them.


IssueCauseFix
No AO visibleAO disabled in Project SettingsEnable Ambient Occlusion in Default Settings
AO looks view-dependent/flickeryOnly SSAO activeEnable DFAO (Movable Sky Light + Distance Fields)
DFAO not workingSky Light not MovableChange Sky Light Mobility to Movable
DFAO not workingDistance Fields not generatedEnable Generate Mesh Distance Fields in Project Settings
AO too darkIntensity or contrast too highReduce Intensity (PPV) or Occlusion Contrast (Sky Light)
AO missing on specific meshesMesh has no distance fieldCheck mesh settings, enable distance field generation
PPV settings not applyingInfinite Extent not enabledEnable Infinite Extent (Unbound) on the PPV
RTAO not availableNo RT hardware or not enabledCheck GPU support, enable Hardware Ray Tracing in Project Settings

Key Points:

  • Three AO methods: SSAO (Post Process Volume), DFAO (Sky Light), RTAO (Post Process Volume)
  • RTAO overrides both SSAO and DFAO when enabled — highest quality
  • DFAO + SSAO combine based on Sky Light's Combine Mode (Minimum or Multiply)
  • DFAO requires Movable Sky Light — Static/Stationary cannot use distance field AO
  • Settings are spread across Project Settings, Post Process Volume, and Sky Light
  • Use Min Occlusion on Sky Light to prevent areas from going pure black
  • Distance Fields connect Part 2 (setup) → Part 4 (shadows) → Part 9 (AO) → Part 11 (Lumen software RT)

You now have ambient lighting (Parts 6-7), ambient occlusion fundamentals (Part 8), and ambient occlusion systems (Part 9) working together. But in the real world, light doesn't stop when it hits a surface — it bounces. In Part 10: Indirect Lighting, we'll explore Lumen and how light bounces create the subtle color bleeding and soft illumination that makes scenes feel real.