home *** CD-ROM | disk | FTP | other *** search
- A spotlight is a point light source where the rays of light are cons-
- trained by a cone. The light is bright in the center of the spotlight and
- falls off/darkens to soft shadows at the edges of the circle. The syntax
- is:
- light_source {
- <CENTER>
- color red #, green #, blue #
- spotlight
- point_at <POINT>
- radius #
- falloff #
- tightness #
- }
-
- A spotlight is positioned using two vectors. The first vector is the
- usual <CENTER> vector that you would use to position a point light source.
- The second vector is the point_at <POINT>, the vector position of the point
- the light is pointing at, similar to the look_at in a camera description.
-
- The following illustrations will be helpful in understanding how these
- values relate to each other:
-
- (+) Spotlight <center>
- / \
- / \
- / \
- / \
- / \
- / \
- +-----*-----+
- ^ point_at <point>
-
- The center is specified the same way as a normal point light_source.
- Point_at <POINT> is the location that the cone of light is aiming at. Spot-
- lights also have three other parameters: radius, falloff, and tightness.
-
- If you think of a spotlight as two nested cones, the inner cone would be
- specified by the radius parameter, and would be fully lit. The outer cone
- would be the falloff cone and beyond it would be totally unlit. The values
- for these two parameters are specified in degrees of the half angle at the
- peak of each cone:
-
- (+) Spotlight <center>
- |\ <----- angle measured here
- | \
- || \
- || \ shaded area = radius cone
- ||| \ outer line = falloff cone
- |||| \
- ||||| \
- +-------+
-
- The radius # is the radius, in degrees, of the bright circular hotspot at
- the center of the spotlight's area of affect. The falloff # is the falloff
- angle of the radius of the total spotlight area, in degrees. This is the
- value where the light 'falls off' to zero brightness. Falloff should be
- larger than the radius. Both values should be between 1 and 180.
-
- The tightness value specifies how quickly the light dims, or falls off,
- in the region between the radius (full brightness) cone and the falloff
- (full darkness) cone. The default value for tightness is 10. Lower tight-
- ness values will make the spot have very soft edges. High values will make
- the edges sharper, the spot 'tighter'. Values from 1 to 100 are acceptable.
-
- Spotlights may used anyplace that a normal light source is used. Like
- normal light sources, they are invisible points. They are treated as shapes
- and may be included in CSG shapes. They may also be used in conjunction
- with area_lights. For example:
- // This is the spotlight.
- light_source {
- <10, 10, 0>
- color red 1, green 1, blue 0.5
- spotlight
- point_at <0, 1, 0>
- tightness 50
- radius 11
- falloff 25
- }
-