No matter what kind of light source you use, you will need to specify
its intensity. In this chapter, an Intensity is either a red-green-blue
triple indicating the color of the light source, or a single value that
is interpreted as the intensity of a "white" light. In the current
version of rayshade, the intensity of a light does not decrease as one
moves farther from it.
You may define any number of light sources, but keep in mind that it
will require more time to render images that include many light sources.
It should also be noted that the light sources themselves will not appear
in the image, even if they are placed in frame.
4.2 Shadows
In order to determine the color of a point on the surface of any object,
it is necessary to determine if that point is in shadow with respect to
each defined light source. If the point is totally in with respect to
a light source, then the light source makes no contribution to the
point's final color.
This shadowing determination is made by tracing rays from the point of
intersection to each light source. These "shadow feeler" rays can add
substantially to the overall rendering time. This is especially true if
extended or area light sources are used. If at any point you wish to
disable shadow determination on a global scale, there is a command-line
option (-n) that allows you to do so.
It is also possible to disable
the casting of shadows onto given objects through the use of the
noshadow keyword in surface descriptions. In addition, the
noshadow
keyword may be given following the definition of a light source, causing
the light source to cast no shadows onto any surface.
Determining if a point is in shadow with respect to a light source is
relatively simple if all the objects in a scene are opaque. In this
case, one simply traces a ray from the point to the light source. If
the ray hits an object before it reaches the light source, then the
point is in shadow.
Shadow determination becomes more complicated if there are one or more
objects with non-zero transparency between the point and the light
source. Transparent objects may not completely block the light from a
source, but merely attenuate it. In such cases, it is necessary to
compute the amount of attenuation at each intersection and to continue
the shadow ray until it either reaches the light source or until the
light is completely attenuated.
By default, rayshade computes shadow attenuation by assuming that the
index of refraction of the transparent object is the same as that of the
medium through which the ray is travelling. To disable partial shadowing
due to transparent objects, the shadowtransp keyword should be given
somewhere in the input file.
- shadowtransp
- The intensity of light striking a point is not affected by
intervening transparent objects. If you enclose an object behind
a transparent surface, and you wish the inner object to be
illuminated, you must not use the shadowtransp keyword or the
-o option.
Go to the next section