7
$\begingroup$

Ambient Occlusion is a physical approximation to occlude ambient light. If ambient light is not considered post-processing, why is AO? Ambient occlusion has the same inputs as regular deferred lighting, plus kernels and a noise map, but essentially, it can be handled the same way. Is there a reason why it's considered post-processing and deferred lighting/shading isn't?

$\endgroup$
10
$\begingroup$

This is a potentially confusing re-use of terminology. Ambient Occlusion is not in itself a post processing effect. Screen Space Ambient Occlusion is a post processing effect using the depth buffer to approximate the effects produced by Ambient Occlusion.

Ambient Occlusion is a relatively expensive global method, while Screen Space Ambient Occlusion is the cheaper alternative for real time animation. Only the latter is considered post processing.

$\endgroup$
  • 2
    $\begingroup$ Another possible reason for the confusion is that Ambient Occlusion is most of the times rendered out into a separate pass and added in later. Making it seem like it could be a post processing effect. $\endgroup$ – bram0101 Jun 1 '17 at 18:41
  • $\begingroup$ @bram0101 does that apply to Ambient Occlusion that is not using the Screen Space Ambient Occlusion approximation? $\endgroup$ – trichoplax Jun 1 '17 at 19:48
  • 2
    $\begingroup$ @trichoplax Yes, for example with Voxel-Cone Traced AO. In that method, the AO is added as a separate pass $\endgroup$ – RichieSams Jun 1 '17 at 22:10
  • 1
    $\begingroup$ @trichoplax with offline render engines it is done a lot, especially with VFX or general 3d animation. There could be a few reasons for rendering it out separately. 1. Most shaders and lights do not have a button to turn on ao meaning you have to create a render pass for it. 2. Passes can be faster to render or easier to set up. 3. In VFX or some animation productions, they render out in a bunch of different passes to then add them together in post for more control. I am talking about ao from offline render engines so it is ray traced ao. $\endgroup$ – bram0101 Jun 2 '17 at 5:46
  • $\begingroup$ These comments suggest it is not as simple as I described, and there is a much better answer waiting to be posted... $\endgroup$ – trichoplax Jun 2 '17 at 9:35
4
$\begingroup$

Ambient occlusion isn't a technique, but rather a concept. It can be implemented (and approximated) as a post-processing effect such as SSAO, SSDO, HBAO+, etc. @trichoplax gave a good answer, I just wanted to elaborate on the comments.

Is there a reason why it's considered post-processing and deferred lighting/shading isn't?

I personally would consider deferred rendering to be a post-processing effect, but it depends on your definition of a post-processing effect. For this answer, I will assume it's anything that doesn't require geometry other than a screen-space quad or (triangle) to be rendered.

Post-Process Techniques

Screen space AO techniques involve reading the depth and/or normal buffers to determine if light should be occluded. There are expansions on these techniques that deal with temporal aliasing as well as occlusions by objects in the scene. Some people also apply AO to separate parts of the scene (dynamic and static objects for instance). This is where the definition of post-processing might become ambiguous.

Some renderers do post-process AO before the lighting pass however. Usually these renderers either do a Z-prepass or are light-prepass renderers. This can be used on devices with lower VRAM or eDRAM to preserve memory since you can also do tonemapping during your lighting pass.

World-Space Static Techniques

Lightmaps can be used particularly for static environments AO can be easily computed offline. Similarly, art assets can have AO textures.

World-Space Partially Dynamic Techniques

Some objects just need rough AO and are largely rigid. For instance, AO fields and decals can be used with or without SSAO to improve AO for some objects (by Nathan Reed). Another example includes placing a circle around a character's feet.

World-Space Dynamic Techniques

NVidia came up with VXAO, which is a voxel-based ambient occlusion effect that helps simulate AO in places that aren't visible of screen. This has been one of the downsides to SSAO. Another issue with SSAO is that it must be computed each frame and is subject to temporal aliasing (bad for VR, although some people have developed improvements for this). VXAO can also reduce the memory/production costs of having many AO textures. Also, VXAO can have considerable latency with updates (if the application wants this). However, VXAO has a high performance cost.

Other applications, such as voxel-based games, can approximate AO very easily by using algorithms based on neighborhood information. This is kind of similar to VXAO, but without the rasterization (voxelization) steps, and they may have much rougher approximations.

As you can see, there are many implementations of AO, many of which aren't post-processing effects.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.