Screen Space Ambient Occlusion

from Wikipedia, the free encyclopedia
SSAO component of a typical game scene

Screen Space Ambient Occlusion (SSAO) is a rendering technique in computer graphics for the efficient approximation of the frequently used " Ambient Occlusion " effect in real time. It was developed by Vladimir Kajalin while working at Crytek and was first used in 2007 on Crysis , a video game made by Crytek for Microsoft Windows.

implementation

The algorithm is implemented as a pixel shader , by analyzing the depth buffers of a scenery, which are stored in a texture. For each pixel on the screen, a pixel shader scans the depth values ​​around a pixel and tries to calculate the respective amount of occlusion for the scanned points. In its simplest implementation, the occlusion (covering) factor is only calculated based on the difference in depth values ​​between the scanned point and the current point.

Without additional intelligent solutions, such a brute force method would have to read out texture data about 200 times per calculated pixel for an acceptable image quality. Games like Assassin's Creed Black Flag use the technology, while alternative mechanisms like technology HBAO + have a shorter running time.

In order to improve the performance for the player, AO shaders are often rendered at half resolution, which in theory reduces the computing time by 1: 4. However, the quality is reduced rather imperceptibly, as AO is often used as a subtle effect.

In order to get good results with far fewer accesses to the texture data, the sampling is carried out using a randomly rotating kernel. The kernel alignment is repeated every n screen pixels in order to limit the noise in the final image to high frequency noise. This high-frequency noise is then largely softened, taking into account possible interruptions or disturbances in the depth values ​​(using methods to compare the normal with the corresponding depth values ​​for neighboring pixels, for example) and thus reduced or completely removed. Such methods reduce the number of depth value samples of the pixels to about 16 per pixel or less, while the image quality is still very good. Only with these methods can software-based SSAO be used in real-time applications (e.g. computer games).

Compared to other ambient occlusion methods, SSAO has the following advantages:

  • It works regardless of the complexity of the scene.
  • The data does not have to be prepared, there are no additional loading times and no memory allocations in the system memory.
  • Works with dynamic scenes.
  • Works in the same consistent way for every pixel on the screen.
  • No CPU usage - the process can be carried out entirely by the GPU.
  • Can be integrated comparatively easily into any modern graphics pipeline.

This procedure also has some disadvantages:

  • The calculation is reduced to a small area, and the result in many cases depends on the respective view, since the result of SSAO depends solely on the respective adjacent Texel depths, completely without any consideration of the geometry and other factors of the objects.
  • It is difficult to remove high frequency noise from blurring without affecting depth discontinuities such as object edges (the effect should not "bleed out" onto other objects). An example of an undesirable effect can be seen in Metro 2033 (2010) when one stands with the knife close to a wall. In this case, a fairly large, dark zone will form on the wall around the knife.
  • Depending on which techniques are used for rendering and how intensively the AO effect is used, it can clearly stand out from the "regular" shadows. A radius that is too large or an intensity value that is too high can quickly be noticed.

See also