During my look into lighting methods in DevDiary 7.5 (https://scribble285.wordpress.com/2017/08/03/dev-diary-week-7-5/) I briefly mentioned ambient occlusion. Which is a method of darkening the edges of an object to create the sense of complex lighting.
(Source: CryEngine demo)
With the image above you can see that while the shadows calculated on the left are accurate, they come across as flat, and in many cases much of the detail from the geometry of the scene is lost. This is due to the fact that shadows in real-time renderers usually have a set constant value meaning that all projected shadows have the same color, regardless of their level of occlusion from a light source or their surroundings, while some engines offer some features to minimize this effect like soft-shadows and penumbra values, ambient occlusion remains an invaluable effect.
In the scene above on the right you can see that ambient occlusion has been added to the shaded areas to give geometry that is further away from lit areas an extra layer of depth via adding a darkened gradient.
While this effect is relatively expensive in terms of computing power (it never really appeared a lot on older consoles like PS3 or the Xbox 360) it can really increase the graphical fidelity of the game, which is why with the increased power of the Xbox One and PS4 it has become a more common rendering feature.
The many faces of AO
While Ambient Occlusion commonly refers to the post-processing effect of adding extra shading to a rendered scene, there are many different method of achieving this.
(Images below credit: YEN-FU JI – https://www.facebook.com/notes/cryengine-developers/ce5-global-illumination-research/1149915985117187/)
No Ambient Occlusion
SSDO – Deferred Screen Space Directional Occlusion (AO that also takes lighting into account to strengthen or weaken the effect)
SSDO+SVOAO (Sparse Voxel Octree Ambient Occlusion – uses voxels to determine light information in specific areas of the environment)
SVOTI – Sparse Voxel Octree Total Illumination – uses voxels to calculate lighting and shadows
Now these are methods that are all progressively more accurate and mode performance demanding all done through CryEngine V, but I’m using UE4… so what are my options? SSAO – Screen-Space Ambient Occlusion and (In a recent release which I didn’t have time to implement in my project Bent Normal Occlusion)
This was one of the reasons why I switched over to the Nvidia branch of UE4 as it offers the great HBAO+ (Height Based Ambient Occlusion) and VXAO (Voxel Based Ambinet Occlusion)
(Source Rise of the Tomb Raider – https://linustechtips.com/main/topic/768368-980-ti-sli-vs-1080-ti-sli-qhd-benchmarking/)
While these VXAO is a more accurate AO method the extra 4 FPS drop from HBAO+ did not justify it’s implementation in my project. In the end if felt that I managed a better looking and performance friendly AO effect by combining HBAO+ with SSAO for my final in-game solution.
JI, Y. (2017). CE5 Global Illumination research. [online] Facebook.com. Available at: https://www.facebook.com/notes/cryengine-developers/ce5-global-illumination-research/1149915985117187/ [Accessed 27 Jul. 2017].
Linus Tech Tips. (2017). 980 TI SLI vs 1080 TI SLI QHD Benchmarking. [online] Available at: https://linustechtips.com/main/topic/768368-980-ti-sli-vs-1080-ti-sli-qhd-benchmarking/ [Accessed 22 Jul. 2017].