Using Distance Field Ambient Occlusion

Choose your OS:

DFAO_Header.png

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 FieldsNEW! 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.

Steps

This feature requires that Generate Mesh Distance Fields be enabled in your Project Settings in the Rendering section. For more information visit the Distance FieldsNEW! page.

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

    AddSkylight.png

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

    TransformMobility.png

  3. Once the Sky Light is set to Movable, DFAO will be automatically enabled for the level.

    Direct Lighting Only

    Sky Light's Distance Field Ambient Occlusion

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.

Tags