Screen Space Ambient Occlusion (SSAO) is an effect that approximates the attenuation of light due to occlusion. This is generally best used as a subtle effect, in addition to standard global illumination, that darkens corners, crevices, or other features to create a more natural, realistic look.
![]() |
![]() |
![]() |
---|---|---|
Scene without Ambient Occlusion | Ambient Occlusion Only | Scene with Ambient Occlusion |
This effect is achieved using a SSAO method, meaning the AO amount is computed in a deferred pass in screen space. Our method makes use of the depth buffer and the normal from the GBuffer (see Deferred Shading). This means normal map details will affect the results. In UE4, the effect is applied to the AmbientCubemap. It does not affect the direct lighting because here we use shadow mapping.
You can look at the AO value directly by using the "Visualize GBuffer" view mode (see View Modes) or by using the show flag "Visualize Ambient Occlusion".
As the AO is part of the GBuffer, it also can be output by the material. The SSAO and material AO become combined and can result in even darker AO.
Property | Description | ||||||
---|---|---|---|---|---|---|---|
Intensity | Controls the amount of ambient occlusion globally. A value of 0.0 means no ambient occlusion; 1.0 means full ambient occlusion.
|
||||||
Radius | Defines the radius in Unreal units. A larger radius can run slower (texture cache trashing) and show more artifacts due to the limited sample count.
|
||||||
Radius in WorldSpace | If enabled, the value of the AO Radius property is assumed to be in world-space. Otherwise, it is assumed to be in view-space. | ||||||
Distance | A tweak parameter that is needed to avoid dark halos around objects. As the SSAO technique only has the zbuffer, it cannot know about the thickness of objects.
Notice the halo around the horn of the character in the example on the right. The large distance setting causes the horn to calculate occlusion against the surface behind it in an unrealistic manner. |
||||||
Power | Controls the strength of the darkening effect that is computed.
|
||||||
Bias | Allows to tweak AO details. Some bias is needed to avoid precision artifacts in the distance. >0, in unreal units, default (3.0) works well for flat surfaces but can reduce details. |