Ambient occlusion

from Wikipedia, the free encyclopedia
Application of AO

Ambient Occlusion (English Ambient Occlusion , AO) is a shading method, which in 3D computer graphics to achieve is used with relatively short render time a realistic shading scenes. Although the result is not physically correct, its realism is often sufficient to dispense with computationally intensive global lighting .

Surroundings obscuration is calculated in addition to conventional shading with Phong shading or similar algorithms. The result of the AO calculation is simply multiplied as a grayscale image with the conventional render result. This can be done directly during rendering or in post-processing. An image that was calculated using ambient obscuration is similar to the lighting situation on a cloudy day - extremely diffuse shades are the main feature.

Most render engines support environmental obscuration in the form of a shader or as a global effect.

functionality

Ambient obscuration is based on the observation that in cracks and corners there is usually a lower illuminance, which is mainly due to the numerous, diffuse reflections that occur at these narrow points. The physically exact calculation of these lighting conditions is extremely time-consuming, which is why the technology of surrounding obscuration comes into play here.

The process simulates a unit ball of light that illuminates certain or all objects in a 3D scene. Incoming light can therefore only be blocked or attenuated in percentage terms by this geometry by means of self-masking. Two parameters are calculated for each measuring point: the percentage of occlusion and the bent normal ("bent perpendicular"), which points in the direction of the lowest percentage of occlusion. The Bent Normal can later be used for advanced lighting simulations, e.g. B. in light transfer via Irradiance Environment Maps .

Calculation of the parameters

The procedure required to calculate the two parameters mentioned above can be divided into two basic classes: The inside-out method is the classic approach to calculation. Here, rays are sent from the measuring point over its hemisphere and checked for collision with the object itself. If the beam collides with part of the geometry in the direction , no light from this direction can reach the point. The opposite is the case if the ray should be able to continue on its way unhindered. Provides this ratio by a visibility function , which fall takes the value 0, otherwise 1 in the case of occlusion, so the degree of masking is calculated by integrating the visibility function of the hemisphere of the point with normal vector by

This function can be easily implemented using a ray tracer through Monte Carlo integration . If you average all rays that were not covered by geometry, you get the Bent normal at the same time. It should be noted that the Bent Normal is not necessarily correct: special situations can result in the occlusion of a point dividing the permeable part of the hemisphere in two. In this case there is no clear direction of the lowest occlusion.

The second class for determining the surrounding obscuration parameters are the outside-in methods. Here the object is viewed from the outside. It is the point centered and the object to random solid angle and rotated. The visibility of the point can be determined using the OpenGL extension ARB_Occlusion_Query, which counts the number of fragments in the finished image of an object. If the randomly selected solid angle belongs to the hemisphere of the point, the visibility function can be implemented and used via the extension. Here, too, a good approximation can be calculated using a sufficient number of samples through Monte Carlo integration.

Static and dynamic environmental obscuration

Since the result of the environmental obscuration method is independent of the position of the light sources, it can be used for static geometry both in rendered images and in real-time applications such as e.g. B. computer games are used.

However, if it is a question of dynamic geometry that can assume unpredictable positions and shapes at runtime (in contrast to keyframe animations ), the calculation must be accelerated considerably in order to meet the real-time requirements of an application. Various elaborations on this topic exist for the AO simulation of individual objects. However, if several objects should also be able to shade each other, then all objects must be taken into account simultaneously during the calculation. Since this effort is too high for current graphics accelerators, an approximation is proposed that precalculates AO parameters for the surroundings of an object and saves them in cubemaps. These are read out at runtime in the event of a collision between objects and transferred to the AO parameters of the colliding objects.

Web links

Wikibooks: Blender Documentation: Ambient Occlusion  - Learning and teaching materials

swell

  1. A render engine is a computer program that converts 3D computer graphics into an image. The computer graphics themselves do not yet contain all the intricacies of light and color like the rendered image.
  2. A shader is a mathematical description of the external appearance of a 3D geometry.
  3. a b Sattler et al .: Hardware-accelerated ambient occlusion computation , In: Vision, Modeling, and Visualization 2004, Akademische Verlagsgesellschaft Aka GmbH, Berlin, November 2004.
  4. Brunell: Dynamic Ambient Occlusion and Indirect Lighting (PDF; 1.6 MB), In: GPU Gems 2, Addison-Wesley, 2005, pp. 223-233
  5. Laine et al .: Ambient occlusion fields ( Memento of the original from May 1, 2006 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. , In: SI3D '05: Proceedings of the 2005 symposium on Interactive 3D graphics and games. New York, NY, USA: ACM Press, 2005. @1@ 2Template: Webachiv / IABot / www.tml.tkk.fi