Graphics Reference
In-Depth Information
we have determined a visible point, all we have to is to send out a ray toward the light
source and see if it hits an object on the way. Radiosity methods handle shadows by
in large automatically, except some extra processing is required along the outlines of
shadows.
Finally, we need to point out that one needs to distinguish between hard and soft
shadow algorithms . We have discussed the former that simply determine in a “true”
or “false” manner whether a point is in a shadow. One associates either 0 or the normal
light intensity value to the point. Because of this, all that is involved is a visibility
determination of points in the umbra region of a shadow (the points that receive no
light). A soft shadow algorithm also includes a penumbra region in the computation
(the points that receive partial light). We refer the reader to the above-listed refer-
ences to see how algorithms can be modified to accomplish this. The references also
touch on the much more difficult problem of shadows when there are transparent
objects present.
9.4.2
Transparency
There are two ways to model transparency. The simple way is to ignore refraction and
pretend that light will pass straight through an object without any bending. The other
is to take refraction into account.
Using the simple model with no refraction, transparency can be implemented by
letting surfaces only partially obscure surfaces behind them. If a painter's algorithm
is used in the visible surface determination algorithm, then one can overwrite (in the
back-to-front manner) each face on the current background with a blending function
of the type
(
)
Il
=-
kIkI
+
,
(9.9)
tf
tb
where I f and I b are the illumination associated to the face and current background,
respectively, and k t is a transparency factor. As usual, there is a separate equation (9.9)
for each wavelength. One problem with this approach is that one loses any specular
reflection. To avoid this one can restrict the interpolation to the ambient and diffuse
component of the light and then add the specular component from the front object.
Adding transparency in this way greatly increases the cost of the rendering algorithm
because every surface is painted whether visible or not.
Using refraction in the transparency model increases the cost even further because
light no longer travels in a straight line and one has to compute how it is bent. Con-
sider a light ray passing from one medium to another at a point p on their common
boundary. See Figure 9.11. Let L and T be the unit vectors associated to the light paths
in the first and second medium as shown in the figure. Let q 1 (the angle of incidence )
be the angle between L and the unit normal vector N to the boundary surface at a
point and q 2 (the angle of refraction ), the angle between T and N . Snell's law states
that
sin
sin
q
q
n
n
1
2
1
2
=
,
(9.10)
Search WWH ::




Custom Search