The amount of ambient light present in a scene is controlled by a pseudo light source of type ambient.
There is only one ambient light source; its default intensity is 1, 1, 1. If more than one ambient light source is defined, only the last instance is used. A surface's ambient color is multiplied by the intensity of the ambient source to give the total ambient light reflected from the surface.
Directional sources are described by a direction alone, and are useful for modeling light sources that are effectively infinitely far away from the objects they illuminate.
Point sources are defined as a single point in space. They produce shadows with sharp edges and are a good replacement for extended and other computationally expensive light source.
Spotlights are useful for creating dramatic localized lighting effects. They are defined by their position, the direction in which they are pointing, and the width of the beam of light they produce.
θin is the the angle at which
the light source begins to be attenuated. At
θout,
the spotlight intensity is zero.
This affords control
over how ``fuzzy'' the edges of the spotlight are. If neither angle
is given, they both are effectively set to 180 degrees.
Extended sources are meant to model spherical light sources. Unlike point sources, extended sources actually possess a radius, and as such are capable or producing shadows with fuzzy edges (penumbrae). If you do not specifically desire penumbrae in your image, use a point source instead.
The shadows cast by
extended sources are modeled by taking samples of the source at
different locations on its surface. When the source is partially
hidden from a given point in space, that point is in partial shadow
with respect to the extended source, and the sampling process is
usually able to determine this fact.
Quadrilateral light sources are computationally more expensive than extended light sources, but are more flexible and produce more realistic results. This is due to the fact that an area source is approximated by a number of point sources whose positions are jittered to reduce aliasing. Because each of these point sources has shading calculations performed individually, area sources may be placed relatively close to the objects it illuminates, and a reasonable image will result.
The values of usamp and vsamp are usually chosen to be
proportional to the lengths of the u and v axes. Choosing a
relatively high number of samples will result in a good approximation
to a ``real'' quadrilateral source. However, because complete
lighting calculations are performed for each sample,
the computational cost is directly proportional to the product
of usamp and vsamp.