What is ambient lighting?

Wikipedia says:

An ambient light source represents a fixed-intensity and fixed-color light source that affects all objects in the scene equally.

By saying "affects all objects equally" they mean all objects get the same amount of light? So if you have three houses in your scene, you would need to calculate a specific position for the ambient lighting source, in order that every object gets the same amount of light? If not, you would not have an ambient light source?

What is the difference between "normal" lighting from the sun and ambient lighting?

• In a word: evil. – imallett Oct 20 '15 at 15:21

In this context, Ambient lighting refers to a very crude approximation of indirect lighting.

Direct lighting from a direct source is relatively simple to evaluate and model, even in real-time. But the light that is not absorbed will bounce all over the place and cause indirect lighting. This is why for example a lamp will a lampshade will light a whole room and not only the narrow area underneath.

But modeling indirect lighting is difficult and costly. So an approximation is to consider that lighting to be constant and independent from position: that's ambient lighting.

In the case of outdoor scene, ambient lighting would represent the blue light coming from the sky dome, as opposed to the orange direct light coming from the Sun.

• Technically light from the sun is white. – ratchet freak Aug 31 '15 at 8:09
• @ratchetfreak: True; there's something to say about temperature, but the topic is unrelated to the original question. – Julien Guertault Aug 31 '15 at 9:17
• @ratchetfreak only if you're in space, which you're typically not. Our glorious atmosphere makes it appear yellowish (by scattering the blue). – imallett Oct 20 '15 at 15:23

Traditional rendering solutions do not do account for secondary light bounces (called indirect light). Even with strategically placed fill lights you still have areas where none of the direct light hits.

Ambient light tries to solve this problem by shining by a constant amount in all directions. In practice this means that light position or surface normal has no meaning, one just adds some of the shaders color multiplied by ambient light color to the shading result.

Ambient light has a tendency to look artificial when overused. But the opposite problem is that surfaces look like they are on outer space. Ambient light also makes the difference between dark materials and light materials more apparent.

Image 1: Image without ambient light (left) looks like it was shot in space. Image with ambient (right) looks more natural, although possibly a bit flat if overused.

The real problem is that ambient light does not really exist. Even if youd argue that its useful model, it certainly is not uniform. Its just a quick fix. Therefore all kinds of tricks, like ambient occlusion, have been proposed to enhance the quality of ambient light.