Improving realism with prebaked ambient occlusion
The Phong shading model uses a very simplistic model of ambient light. It simply adds a constant value to the shading model everywhere in the scene. This is not very realistic, and leads to a very flat look. In reality, the amount of ambient light that reaches a point on a surface depends on the environment. For example, consider a point in the corner of an empty room versus a point on a flat surface in the middle of a room. Think of ambient light as a light source that emanates from all directions. If the point is in a corner, then the nearby walls block much of the ambient light from reaching that point (if we ignore reflection). Alternatively, if the point is on a flat surface, then almost all of the ambient light reaches the point without being blocked.
Ambient occlusion (AO) is a technique for approximating this effect. The basic idea involves computing the accessibility of each point on the surface and attenuating the shading model...