Ambient Occlusion is an umbrella term for all sorts of different variations on a theme. When you drill down to it though, whether it’s AO, SSAO, VXAO, HBAO, HDAO, or whatever it may be, it’s a method for tracing shadows based on ambient light sources.
Ambient Occlusion can be fairly succinctly broken down by looking at the name itself. Ambient, meaning the immediate surrounds of something (in games this refers to a light source), and Occlusion, meaning the obstruction of one thing by another. Put together, Ambient Occlusion is the rendering of shadows based upon how exposed the area is to ambient lighting .
So you’ve got a few ambient light sources flinging light out in every direction, including the sun, some lamps, or whatever it may be. This light is scattered every which way and, without tracing, basically lights up an entire scene in an unnatural glow. AO is used to help add shadows to the approximate location where we would expect to see them, such as where two objects meets. An example of this can be seen on the stairs in the pair of Hitman 2 screenshots below.
In games, we typically see two forms of AO these days - Screen Space Ambient Occlusion (SSAO) and Horizon-Based Ambient Occlusion (HBAO) (or HDAO for certain AMD titles). Both of these methods are a faster, more streamlined version of true ambient occlusion which use the depth of pixels within a scene to calculate darkness rather than true shadows cast from scene geometry. Using this method, a corner of a room would be darker, for example.
SSAO darkens the corners and edges found in any given scene. It’s artificially achieved rather than directly related to light sources; a crude approximation of global illumination.
The downside to SSAO is that it cannot account for occlusion from either off-screen geometry or on-screen geometry which is occluded. That’s literally why it’s called ‘Screen Space’ AO. It’s an imperfect tool then; one which adds a great deal to visual quality but which will be surpassed by ray-traced lighting and shadows in time.
HBAO is a post processing effect also designed to add realism to scenes by highlighting surface details and reproducing a reduction in light due to occlusion. HBAO arguably delivers more accurate AA than SSAO and, these days, is highly tuned to use minimal GPU time.
How demanding is Ambient Occlusion?
We would consider a typical application of AO in a game to be mid to high in terms of how demanding it is. The typically frame rate hit you can expect when enabling Ambient Occlusion is between 5-10%. There are exceptions though, such as Apex Legends. Poor implementation at launch mean Ambient Occlusion could cause you to lose up to 20% of your FPS in Apex Legends.
Is it worth enabling Ambient Occlusion?
While AO is a comparatively hacky way of adding more realistic shadows to a scene, in the absence of a realistic alternative it’s absolutely the best way to go. You’ll see from the Gears 5 comparison screenshots below that it’s it at least worth AO on, although notching it up to High or Ultra is arguably a case of diminishing returns.
Lighting, and by it's very nature the lack of lighting, are absolutely the key to achieving what we could term realistic visuals. Textures and models can pretty much be as complex as we want these days, but sufficient lighting and shadows are required in order to life up a game's visuals to the next level. Ambient Occlusion is a very important step toward this.
Whilst Ambient Occlusion was once a very demanding process, fine-tuning as well as more powerful GPUs mean AO has a very small impact on performance. You will experience lowered frame rates in certain circumstances but the base AO settings will offer a decent enough visual experience.
More Graphics Options Guides
Anisotropic Filtering / Texture Filtering
Login or Register to join the debate
Graphics nerd here, just a few corrections:
1) AO's implementation as it stands is a hack/approximation and has nothing to do with actual lights (even hacky ambient ones). It is merely calculated using the proximity of geometry and, as such, does not account for direct lighting (where AO wouldn't be visible) or transparencies (that's why AO around grass looks bad).
2) It is possible for corners of a room to actually be brighter than the corresponding walls due to light concentration and bouncing. AO would be wrong in that case.
It baffles me why AO isn't subtracted from the direct light pass or adjusted in value masked by the shadow pass. In other words, AO will appear stronger in shadows (indirect light zones!) and almost non-existent in direct light, so why not use shadow/lighting buffers to adjust the effect...
I used to use that method back in the day to circumvent the unrealistic darkening of AO passes when GI wasn't as fast to render as it is nowdays on bruteforce GI/PT.
Always off you can see better in corners because they are not dark. well its gaming i want to see everything
Since ray tracing is slowly coming, is ambient occlusion something of the past?
Nah it's gonna take years since something can surpass it. Atleast in a playable sense.
It will at some point. Same goes for other shadow and reflection settings. Its made fun of and taken out of context, but it really will "just work".
Good article Jon. Thanks.