Ambient occlusion is a shading method used in 3D computer graphics which can help add realism by taking into account attenuation of indirect light caused by nearby geometry. Unlike local methods like Phong shading, ambient occlusion is a global method, meaning the illumination at each point has a relationship with all of the geometry in the scene. However, it is a very crude approximation to full global illumination. The appearance achieved by ambient occlusion alone is very similar to the way an object appears on an overcast day.
The ambient occlusion Ap at a point p on a surface with normal N can be computed by integrating visibility over the hemisphere Ω around p:
where N is the surface normal at point p and Vp,ω is the visibility function at p which is zero if p is occluded in the direction ω and one elsewhere. A variety of techniques are used to evaluate this integral in practice: perhaps the most straightforward way is to use the Monte Carlo method by casting rays from the point p and testing for intersection with other scene geometry (i.e., ray tracing). A similar approach is to render the view from p by rasterizing black geometry on a white background and taking the (normalized) average of rasterized fragments. Both of these approaches are referred to as "inside-out," as opposed to "outside-in" methods which determine visibility of multiple points at a time by rendering the view from a number of viewpoints around an object. Depth-map ambient occlusion is one example of an outside-in approach.
In addition to the ambient occlusion term, a "bent normal" Nb is often generated which points in the average direction of unoccluded samples. The bent normal can be used to look up incident radiance from an envronment map to approximate image-based lighting. However, there are some cases in which the average direction of illumination provides a poor description of what's going on, e.g.,
There are several approaches to calculating ambient occlusion in real time, including ones that use multiple shadow maps, and ambient occlusion fields.
Ambient occlusion is related to the problem of surface accessibility, and is a special case of accessibility shading, which determines surface appearance based on how easy it is for a surface to be touched by various elements (e.g., dirt, light, etc.). However, ambient occlusion has mostly been popularized by its use in recent years as an efficient production technique by computer animation studios.
External Links