Ambient occlusion "is a shading and rendering technique used to calculate how exposed each point in a scene is to ambient lighting.

Ambient lighting is regarding to What is ambient lighting?:

... lighting to be constant and independent from position: that's ambient lighting.

If ambient lighting has no fixed position, how can points then be more or less exposed to it? Ambient lighting is "shining by a constant amount in all directions." So if the light is coming from all directions, every point should be exposed by the same factor to the ambient lighting.


Your point is correct when applied to ambient lighting as an approximation technique. This crude approach does indeed give the same lighting level to all surfaces regardless of their surroundings.

However, ambient occlusion is a different (less crude) approach, that models how the light levels in a real scene vary depending on how much reflected light can reach a surface. The confusion is due to two very different approaches having similar names.

Ambient occlusion is a much better approximation of what in real life is described as ambient light - light that arrives from the background rather than directly from a light source.

If ambient lighting has no fixed position, how can points then be more or less exposed to it?

When used in the context of ambient occlusion, the term "ambient lighting" still means background light approximated as being the same in all directions, but the surface is lit based on how many of those directions are not occluded by objects in the scene.

This gives subtly varying light levels that give much more realistic images than with a single level of ambient lighting. This gives the effects seen in real life such as the corners of a room being slightly darker than elsewhere.

  • $\begingroup$ "the surface is lit based on how many of those directions are not occluded by objects in the scene. " I unterstand this. But the question is from where comes the light? Where is the origin? Because if I have two balls, and the ambient lighting has it's origin between those balls, then there won't be nothing occluded, because there is nothing between objects and light source. But if the origin is behind one of the balls, then one ball is occluded by the other. -> i.imgur.com/IRDvCzF.png So the position of the source is important to determine what will be occluded. But Amb.L. has no pos. $\endgroup$ – Joey Sep 1 '15 at 0:28
  • 2
    $\begingroup$ @Joey With one point light source every point on a surface will be either lit or not. With two point light sources a point on a surface may be lit by zero, one or two lights, giving three different light levels. With many point lights, there is gradual variation in the lighting. Ambient occlusion pretends that there are an infinite number of point light sources in the distance in all directions. This is not physically realistic, but it gives an approximation to the lighting in a real scene, where light is reflected from the objects in the scene so that they are all lit by second hand light. $\endgroup$ – trichoplax Sep 1 '15 at 9:05
  • 2
    $\begingroup$ It might help a bit for understanding to specify that ambient occlusion is usually simulating light coming from the "sky," which would clear up questions about what the source of the light is. $\endgroup$ – porglezomp Sep 1 '15 at 13:23
  • 2
    $\begingroup$ @porglezomp that's a useful way of thinking about it to gain understanding, but it can also be used in a closed room with no sky, where the ambient occlusion is the occlusion of the light reflected multiple times from the walls. $\endgroup$ – trichoplax Sep 1 '15 at 13:44
  • $\begingroup$ @trichoplax Yeah, that's why I put it in quotes. $\endgroup$ – porglezomp Sep 1 '15 at 13:48

Ambient light does not really exist, if we do not talk about cosmology. What we call ambient is just light form many secondary reflections.

enter image description here

Image 1: No ambient light (left) and ambient light (right). Both look artificial.

We can approximate ambient light by a constant factor. But this looks slightly washed out as ambient light is not constant over the scene. To make the ambient look better we can use a trick. If we make a hemispherical probe for object coverage (occlusion), we get an estimate of how much the pixel lies inside a cavity. The less you live in cavity the more likely the ambient light is going to hit here.

enter image description here

Image 2: By modulating the ambient light with local geometric occlusion we get a much nicer and realistic contribution of ambient light. Final color and contribution also tweaked slightly (right). Just plain ambient (left).

NOTE: Ambient occlusion component is also used by other phenomena so it can also simulate dirt packing etc. In any case your NOT supposed to multiply ambient occlusion by everything. Quite many tutorials make this mistake. You should add the ambient occlusion to existing image, that is if you only estimate ambient light with it.

  • $\begingroup$ Oops. the shared models of the red, metal and green balls don't react to ambient light but they do react to my ambient occlusion light. Hope you get the point nonetheless. $\endgroup$ – joojaa Sep 1 '15 at 11:40

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.