5.2.3.3 Area Lights


Regular light sources in POV-Ray are modeled as point light sources, that
is they emit light from a single point in space. Because of this the
shadows created by these lights have the characteristic sharp edges that
most of us are use to seeing in ray traced images. The reason for the
distinct edges is that a point light source is either fully in view or it
is fully blocked by an object. A point source can never be partially
blocked.

Area lights on the other hand occupy a finite area of space. Since it is
possible for an area light to be partially blocked by an object the shadows
created will have soft or "fuzzy" edges. The softness of the edge is
dependent on the dimensions of the light source and it's distance from the
object casting the shadow.

The area lights used in POV-Ray are rectangular in shape, sort of like a
flat panel light. Rather than performing the complex calculations that
would be required to model a true area light, POV-Ray approximates an area
light as an array of "point" light sources spread out over the area
occupied by the light. The intensity of each individual point light in the
array is dimmed so that the total amount of light emitted by the light is
equal to the light color specified in the declaration.
 

Syntax:

light_source {
<X, Y, Z> color red # green # blue #

area_light <X1, Y1, Z1>, <X2, Y2, Z2>, N1, N2

}

The light's location and color are specified in the same way as a
regular light source.

The area_light command defines the size and orientation of the area light
as well as the number of lights in the light source array. The vectors
<X1,Y1,Z1> and <X2,Y2,Z2> specify the lengths and directions of the edges
of the light. Since the area lights are rectangular in shape these vectors
should be perpendicular to each other. The larger the size of the light the
thicker that the soft part of the shadow will be. The numbers N1 and N2
specify the dimensions of the array of point lights. The larger the number
of lights you use the smoother your shadows will be but the longer they
will take to render.

The jitter command is optional. When used it causes the positions of the
point lights in the array to be randomly jittered to eliminate any shadow
banding that may occur. The jittering is completely random from render to
render and should not be used when generating animations.

Example:

light_source {
<0, 50, 0> color White

area_light <5, 0, 0>, <0, 0, 10>, 5, 5
}

This defines an area light that extends 5 units along the x axis and 10
units along the z axis and is centered at the location <0,50,0>. The light
consists of a 5 by 5 array of point sources for a total of 25
point lights.