Light Types: What's the Difference?

on this page: ambient lighting | light attenuation

You can create three different types of lights in a scene:

Directional lights are the simplest type of light. They have a direction (but no location). Point lights, as the diagram shows, radiate light equally in all directions from a given location. Spot lights illuminate light along a primary direction from a given location. The spot lights in your scene are analogous to theatrical spot lights, which produce a cone of light that diverges from the light's location.

Each of these lights has a color, an intensity, and an ambient intensity. Point lights and spot lights also have a radius, which indicates how far an object can be from the light and still be lit.

Ambient Lighting

Ambient light is the illumination that results from the scattering and reflection of light emitted by all the lights in the scene. It does not have a particular location or direction associated with it. For each light you create, you can specify its ambient intensity, which is the intensity of the ambient emission from the light. This intensity can range from 0.00 (no contribution to ambient lighting) to 1.00 (maximum contribution for this light to ambient lighting in the scene).

If a light is on, its contribution to the scene's overall ambient lighting is computed (for each of red, green, and blue values) by multiplying the light's intensity by its ambient intensity, and multiplying the result by the light's value for that color component.

Light Attenuation

If you really want to fine tune the attributes of a point light or spot light, you can use the three attenuation fields to specify exactly how illumination falls off with distance from the light. In order, these fields represent three types of attenuation:

The attenuation is defined mathematically as follows:

1/(attenuation[0] + attenuation [1]*r + attenuation [2]*r^2)

where r is the distance of the light to the surface being illuminated, attenuation [0] is the amount of constant attenuation, attenuation [1] is the amount of linear attenuation, and attenuation [2] is the amount of quadratic attenuation. The default is no attenuation.

Jump to: