VXAO transforms world space objects into voxelstransforms the and uses those to calculate shadows. Ambient occlusion is a graphics option available in the settings menu for many video games. While some games will explain that ambient occlusion enhances shadows, almost no game actually explains what it does in detail.
What is ambient occlusion?
Ambient occlusion is a shadowing technique that simulates how objects occlude ambient lighting. It’s designed as a tool to make shadows appear as realistic as possible, with interior edges and surfaces underneath objects having darker shadows.
Tip: Occlude is another word for obstructing or blocking, so ambient occlusion simulates how light is blocked by objects in an attempt to cast realistic shadows.
In its most simplistic form, ambient occlusion only calculates shadows that would be cast from a diffuse light source in the sky. More advanced implementations also take into account other light sources such as lamps, torches, and muzzle flashes.
The first game to include ambient occlusion was the 2007 game Crysis.
What types of ambient occlusion are there?
SSAO, or Screen-Space Ambient Occlusion, is a particularly light-weight implementation of ambient occlusion. “Screen space” is a term that means that SSAO only takes into account objects that are actively being rendered. This means that objects that are not currently visible, will not have any calculations performed.
For example, if there is a tower casting a shadow across a street and you turn the camera so that tower is no longer displayed on the screen, the shadow that it casts will disappear. Similarly, an object in the distance blocked from view by a nearer object, will not cast a shadow, even if one should be visible, such as a tree being blocked by a truck. In some cases, this can mean that a shadow that should appear under an object such as a tank, doesn’t appear, because the back, top, and underside of the tank are not rendered and thus don’t block the light.
SSAO also has issues with casting shadows where there shouldn’t be any, especially when related to two objects at different distances from each other.
HBAO, or Horizon Based Ambient Occlusion is a more advanced ambient occlusion implementation from Nvidia. AMD has a similar implementation that they call HDAO or High Definition Ambient Occlusion. With HBAO, shadows are more accurately applied to surfaces, avoiding casting as many false shadows. Unfortunately, the performance impact is significant, so the effect is only rendered at half scale, meaning that the shadow effect is lower resolution.
HBAO+ is an enhanced version of HBAO which addresses a number of performance issues and allows the shadows to be rendered at full scale, without too much performance impact. This increased resolution allows for softer and smoother shadows. Better shadow blurring effects are especially important for outdoor scenes where objects such as power lines should be casting soft, rather than hard shadows. HBAO+ also addresses issues that HBAO can have with flickering from moving objects or camera movement.
VXAO, or Voxel Accelerated Ambient Occlusion, is a newer technology from Nvidia. Instead of using a screen space algorithm, it uses a world space ambient occlusion algorithm. This means that objects that are off-screen can still cast shadows, which allows for shadows being cast from behind the camera and underneath objects providing a much more realistic appearance. VXAO transforms world space objects into voxels and uses those to calculate shadows.
Tip: Voxels are lower resolution models than the original polygon count of objects. Rendering the textures on voxels would look bad, as the shape of objects would be much lower resolution. For generating shadows, however, this reduced object detail provides a significant performance boost while incurring a negligible decrease in quality.
Unlike previous ambient occlusion implementations, the fact that VXAO is world space means it is aware of the distance between objects, which allows shadows to be more accurately calculated for objects further from the shadow. It also prevents a halo effect that can sometimes be seen around characters walking in front of surfaces such as walls. VXAO is more processor intensive than previous iterations of ambient occlusion but does offer the best shadow quality.