Light sources
From DmWiki
The color for every point on a surface is calculated by summing up the contributions of all light sources that illuminate the surface. Most 3D graphics systems support four standard types of light sources: ambient, point, directional, and spot.
| Table of contents |
Ambient Light
Ambient lighting, also referred to as background light, is a constant light source that illuminates all objects equally. This type of lighting represents the light that arrives at the surface from all directions after being reflected multiple times around the scene from other surfaces. Because ambient light comes from all directions, the entire surface of any object is illuminated uniformly. In general, ambient light is represented as a constant color.
Point Light
A point light radiates light equally in all directions at a given point in space. The light's intensity diminishes as the distance from the light position increases.
Directional Light
Directional light radiates light at a certain direction from an infinite distance. Directional lights are typically used to represent light sources such as the sun. All the light that is generated from a directional light source travels in the same direction, which implies that the light rays emitted are parallel. In addition, because directional lights have no 3D position in the scene, the light radiated does not diminish over distance and therefore have infinite range.
Spot Light
Spot lights are similar to point lights in the following characteristics:
- Having a position from which to radiate light
- Light intensity is attenuated with increased distance (intensity decreases as distance increases).
The main difference, however, is that a spot light specifies a direction of radiation as well as additional factors. These additional factors model a cone from which a beam of light is cast and only objects that lie within the cone are lit. A real-life example of this type of light would be a flashlight; the flashlight only illuminates objects within a cone with certain dimensions.
Area Light
Area lights are geometric entities with emmissive properties. This means that instead of using one point for calculating lighting (as in point/directional/spot) an entire emmisive area is used as a source of light. This allows to achieve a smooth, soft shadow effect. This technique is relatively slow, but the renderings with area lights look more realistic than with other types. It's generally not supported by 3D graphic systems used in games. Area lights can be used to precalculate lighting maps for static object in the scene, which would be used in 3D graphic system afterwards.
