Instantly Add Depth to Scenes and Objects with SSAO

With every release of Vortex Studio, we look for ways to increase the visual realism of simulations. Of course, this has to be balanced with the impact on performance new features carry. Vortex Studio 2017a’s new screen-space ambient occlusion (SSAO) extension is a new way to rapidly add depth to all the objects in a scene without reducing simulation performance.

Before we explain how to use the new extension, let’s take a step back and define ambient occlusion.

What is Ambient Occlusion?

In the real world, light bounces from surface to surface. Whenever there are angles, corners and narrow spaces, however, fewer photons are able to reach these occluded locations. The resulting visual phenomenon is called ambient occlusion – an absence of light that appears as a soft shadow. It’s a subtle effect, but when it’s not present, objects appear flat and artificial.

Without occlusion layer With occlusion layer

In computer graphics, it’s possible to calculate an occlusion factor for each point on a surface and incorporate this into the lighting model. Computing the occlusion is expensive, however, and in general it isn’t practical for real time rendering. An alternative option is to pre-calculate the effect, but this has its own limitations in regard to how far light sources and objects can subsequently be moved.

Screen Space Ambient Occlusion (SSAO) is a technique that efficiently approximates the ambient occlusion effect in real time. Instead of calculating everything, it relies on a few sample points, and then adds noise and blurring to hide the visual artifacts caused by relying on a limited number of samples. The technique is independent from scene complexity, and has no need to pre-process data. This means it requires no loading time and no allocation in system memory. It works with dynamic scenes, in the same consistent way for every pixel on the screen, and is executed completely on the GPU.

Using the SSAO extension means that objects will gain volume and definition with no extra content (such as an Occlusion texture map) needing to be generated. It’s not a perfect method — sometimes shadows will appear too large or too small — but it’s useful for many situations. The images below show an urban scene with and without SSAO. Without SSAO, the skyscrapers are flat slabs. As soon as SSAO is turned on, they gain definition and volume.

Cityscape without SSAO

Cityscape with SSAO

If you’d like to learn more about SSAO, and how to add it to your simulations in Vortex Studio, you can see it in action in our on-demand launch webinar: