Previous:Point Lights Main Index Next:Cylindrical Lights
Normally light radiates outward equally in all directions from the source. However the spotlight
keyword can be used to create a cone of light that is bright in the center and falls of to darkness in a soft fringe effect at the edge. Although the cone of light fades to soft edges, objects illuminated by spotlights still cast hard shadows. The syntax is:
- light_source {
<Location>,
COLOR spotlight
[LIGHT_MODIFIERS...] }
- radius
Radius | falloff
Falloff | tightness
Tightness | point_at
<Spot>
The point_at
keyword tells the spotlight to point at a particular 3D coordinate. A line from the location of the spotlight to the point_at
coordinate forms the center line of the cone of light. The following illustration will be helpful in understanding how these values relate to each other.
The geometry of a spotlight.
The falloff
, radius
, and tightness
keywords control the way that light tapers off at the edges of the cone. These four keywords apply only when the spotlight
or cylinder
keywords are used.
The falloff
keyword specifies the overall size of the cone of light. This is the point where the light falls off to zero intensity. The float value you specify is the angle, in degrees, between the edge of the cone and center line. The radius
keyword specifies the size of the "hot-spot" at the center of the cone of light. The "hot-spot" is a brighter cone of light inside the spotlight cone and has the same center line. The radius
value specifies the angle, in degrees, between the edge of this bright, inner cone and the center line. The light inside the inner cone is of uniform intensity. The light between the inner and outer cones tapers off to zero.
For example with radius 10
and falloff 20
the light from the center line out to 10 degrees is full intensity. From 10 to 20 degrees from the center line the light falls off to zero intensity. At 20 degrees or greater there is no light. Note that if the radius and falloff values are close or equal the light intensity drops rapidly and the spotlight has a sharp edge. The default values for both radius
and falloff
is 70.
The values for these two parameters are half the opening angles of the corresponding cones, both angles have to be smaller than 90 degrees. The light smoothly falls off between the radius and the falloff angle like shown in the figures below (as long as the radius angle is not negative).
Intensity multiplier curve with a fixed falloff angle of 45 degrees.
Intensity multiplier curve with a fixed radius angle of 45 degrees.
The tightness
keyword is used to specify an additional exponential softening of the edges. The intensity of light at an angle from the center line is given by: intensity * cos(angle)tightness. The default value for tightness is 10. Lower tightness values will make the spotlight brighter, making the spot wider and the edges sharper. Higher values will dim the spotlight, making the spot tighter and the edges softer. Values from 1 to 100 are acceptable.
Intensity multiplier curve with fixed angle and falloff angles
of 30 and 60 degrees respectively and different tightness values.
You should note from the figures that the radius and falloff angles interact with the tightness parameter. Only negative radius angles will give the tightness value full control over the spotlight's appearance as you can see from the figure below. In that case the falloff angle has no effect and the lit area is only determined by the tightness parameter.
Intensity multiplier curve with a negative radius angle and different tightness values.
Spotlights may be used anyplace that a normal light source is used. Like any light sources, they are invisible. They may also be used in conjunction with area lights.
Previous:Point Lights Main Index Next:Cylindrical Lights