Using Distance Field Ambient Occlusion

How to setup and use Distance Field Ambient Occlusion in Unreal Engine 4.



In your games, you may rely mostly on screen space techniques to provide dynamic Ambient Occlusion (AO) or even precomputed lighting to make objects feel grounded in the world. These techniques are very useful but have their limitations. Screen Space Ambient Occlusion (SSAO) is limited to using scene depth and can only work within the visible screen space. Precomputed methods only work for static objects in the world, which means they can't update in realtime. Distance Field Ambient Occlusion (DFAO) is a fully dynamic AO method using Mesh Distance Fields for movable Static Meshes. It is also not limited to only being used in dynamically lit worlds; it can be used with precomputed lighting.

In this guide, you'll learn how to enable DFAO for your scene with a Sky Light and then explore the settings that can be adjusted.


This feature requires that Generate Mesh Distance Fields be enabled in your Project Settings in the Rendering section. See how to enable Mesh Distance Fields here, if you have not done so already.

  1. Start by navigating to the Modes window, then in the Lights section, select and drag a Sky Light into the Level Viewport.


  2. With the Sky Light selected, navigate over to its Details panel and set its Mobility to Movable.


End Result

Once the Sky Light is set to Movable, Distance Field Ambient Occlusion will automatically be enabled for your level.

Sky Light | without | Distance Field Ambient Occlusion

Sky Light | with | Distance Field Ambient Occlusion

You can see in this comparison example how much of a difference adding a Sky Light to your scene can make when Distance Field Ambient Occlusion is enabled.

Additional Sky Light Settings

Use the Distance Field Reference to learn about settings specific to Distance Field Ambient Occlusion for Sky Lights. These settings enable you to have artistic control over your scene, like controlling the accuracy of the occlusion, its tint and contrasts, and more.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback