I've heard about ambient occlusion and it looks nice, but what exactly is it?
Ambient occlusion is a method to approximate how bright light should be shining on any specific part of a surface, based on the light and it's environment. This is used to add realism.
Wikipedia has a nice paragraph that explains what is done.
Ambient light is a light type in computer graphics that is used to simulate global illumination. Ambient occlusion is simply a simulation of the shadowing caused by objects blocking the ambient light, because ambient light is environmental, unlike other types of shadowing, ambient occlusion does not depend on light direction, so it can be pre-computed for static objects.
Without AO (left) Note that the shadow in the left image is caused by directional light , with AO (right).
In traditional Ray Tracing ambient occlusion is simulated by sampling rays from a certain point, which takes a shape of a hemisphere, and then is checked for intersection with the scene (also called object space AO).
Notice how ray samples are used to simulate AO integration.
Notice the aliasing (dots) caused by ambient occlusion under-sampling.
Because the ray tracing sampling technique is too slow to be used in real time computer graphics. Other methods emerged that simulates this behavior, one notable approach is called Screen Space Ambient Occlusion (SSAO).
SSAO, is a screen space technique, developed by Crytek. The ambient occlusion is computed in a full-screen pass, using the Z-buffer as the only input.
The ambient occlusion factor
The value of
SSAO component of a typical game scene
Ambient Occlusion.. for those who are not really familiar with gaming graphics technology, ambient occlusion adds specific amount of light in every object in the scene. every polygons are rendered in different angle, in that case the amount of light is uneven that makes the game more realistic and appealing to eye
Ambient occlusion usually means applying data that represents how much ambient light hits a surface. That data is usually a gray scale texture or vertex colors depending on the implementation.
To compute the data the most common way is the render the scene with with a solid white texture and 1 point light multiple times, moving the point light each time to a different location on a sphere or hemisphere. The results of all the renders are averaged and that gives you the data about each particular location in the scene and how much light hits that location.
For example a place in the scene that in always bright no matter where you put the light will be bright where as a place that is dark no matter where you put the light will be dark. The result is that you get something that will put dark shadows in crevices and cracks and soft lighting where objects would generally cast a shadow.
Ambient occlusion is a method to compute lighting on a surface of an object that takes into account light brightness due to occlusion of the surface in relation to light source.
That is, ambient occlusion is a shading method that is global in nature which means light/illumination from each point in a scene can influence other points in a scene. In contrast with local shading methods like Phong/Blinn, this means shading with ambient occlusion adds more realism.
Here is a bit of a simplified explanation. Ambient occlusion is a neat trick way of simulating global lighting which is faster than other methods we have so far. Rays are cast from every direction from a surface point 'up' in relation to the surface. Rays that do not reach any object in its path, that is they reach the background void threshold (the 'sky'), increase the brightness of the surface. Rays which, on the other hand, hit geometry when cast from surface, add no brightness to surface. So surface points which are surrounded by lots of other geometry are kind of in a shade.
SSAO is just one way of doing ambient occlusion.