Up: Light Sources
Previous: Light Sources
The amount of ambient light present in a scene is controlled by a
pseudo light source of type ambient.
There is only one ambient light source; its default intensity is
1, 1, 1. If more than one ambient light source is defined,
only the last instance is used. A surface's ambient color
is multiplied by the intensity of the ambient source to give the
total ambient light reflected from the surface.
- light Intensity ambient
Define the amount of ambient light present in the entire
Directional sources are described by a direction alone, and are useful
for modeling light sources that are effectively infinitely far away
from the objects they illuminate.
Point sources are defined as a single point in space. They produce
shadows with sharp edges and are a good replacement for extended
and other computationally expensive light source.
- light Intensity directional ^direction
Define a light source with the given intensity that is
defined to be in the given direction from every point
it illuminates. The direction need not be normalized.
Spotlights are useful for creating dramatic localized lighting effects.
They are defined by their position, the direction in which they
are pointing, and the width of the beam of light they produce.
- light Intensity point ^pos
Place a point light source with the given intensity at the
Extended sources are meant to model spherical light sources. Unlike
point sources, extended sources actually possess a radius, and as such
are capable or producing shadows with fuzzy edges (penumbrae). If
you do not specifically desire penumbrae in your image, use a point
- light Intensity spot ^pos ^to
Place a spotlight at ^pos, oriented as to be pointing at
^to. The intensity of the light falls off as
(cosine )^, where is the angle between the
spotlight's main axis and the vector from the spotlight to the
point being illuminated. and
may be used to control the radius of the cone of light
produced by the spotlight.
is the angle at which
the light source begins to be attenuated. At ,
the spotlight intensity is zero.
This affords control
over how ``fuzzy'' the edges of the spotlight are. If neither angle
is given, they both are effectively set to 180 degrees.
The shadows cast by
extended sources are modeled by taking samples of the source at
different locations on its surface. When the source is partially
hidden from a given point in space, that point is in partial shadow
with respect to the extended source, and the sampling process is
usually able to determine this fact.
- light Intensity extended radius ^pos
Create an extended light source at the given position and with
the given radius.
Quadrilateral light sources are computationally more expensive than extended
light sources, but are more flexible and produce more realistic results.
This is due to the fact that an area source is approximated by a
number of point sources whose positions are jittered to reduce aliasing.
Because each of these point sources has shading calculations performed
individually, area sources may be placed relatively close to the
objects it illuminates, and a reasonable image will result.
The values of usamp and vsamp are usually chosen to be
proportional to the lengths of the u and v axes. Choosing a
relatively high number of samples will result in a good approximation
to a ``real'' quadrilateral source. However, because complete
lighting calculations are performed for each sample,
the computational cost is directly proportional to the product
of usamp and vsamp.
- light Intensity area ^p1 ^p2 usamp
Create a quadrilateral area light source.
The u axis
is defined by the vector from ^p1 to ^p2. Along
this axis a total of usamp samples will be taken.
The v axis of the light source is defined by the vector
from ^p1 to ^p3. Along this axis a total of
vsamp samples will be taken.
The projector light source takes an rle image and
"projects" it into the scene.
The specifications of a projector light source are fairly similar to that of a
camera, with a look-to and a look-from point.
Please note that ^up is the u direction, and v is perpendicular to u.
- light Intensity
[ <tile u v | smooth> ]
^from ^to ^up
uangle vangle falloff
Project the image with ^from the position of the light source,
^to the point at which the light source is pointed, and ^up
the vector which orients the light source around the look-to/look-from
The uangle is the angle which the projected image fills in the u
direction, and vangle is the angle which the projected image
fills in the v direction.
falloff is either true or false to turn on or off
realistic 1/r^2 falloff for light intensity.
Only tile or smooth can be given as image texturing
1/r^2 falloff is the physically correct representation of light energy
falloff, but sometimes it is a but difficult to work with, since setting up
real world lighting is a non-trivial process. Note that if you project an
image perpendicularly onto a flat wall with 1/r^2 falloff set to
true, the image will appear brighter in the center of the wall, because that
portion of the wall is closer to the light source than the rest of the wall.
This is a realistic effect that you might not want if you are doing
interesting (but non-realistic) things with the projector.
Up: Light Sources
Previous: Light Sources
Jelle van Zeijl (email@example.com)
Wed Jun 15 16:19:08 MET DST 1994