Graphics Reference
In-Depth Information
Figure 9.16.
A spherical environment mapping.
point dependent way. As an example, consider Figure 9.16. The picture is assumed to
be painted on a spherical environment surface E . We map it onto the object O as
follows: To each visible point q on O we map that point p on E to which the ray from
the viewpoint reflects. Nice effects can be achieved by either moving the object O or
changing the viewpoint. The environment surface does not have to be a sphere. In
fact, it turns out that a sphere is not a good choice because trying to paint a picture
on it can easily cause distortion. A more common choice is to use a cube. One could,
for example, take six pictures of a room and map these to the six sides of the cube.
Environment mappings were originally developed in [BliN76] where they were
called reflection mappings . [Gree86] suggested using cubes. The whole idea of envi-
ronment mappings is basically a cheap way to get the kind of reflection effects that
one gets with ray tracing, but they have become popular. Large flat surfaces on objects
cause problems however because the reflection angle changes too slowly.
9.8
Bump Mappings
A problem related to giving texture to objects is to make them look rough or smooth.
Simply painting a “rough” texture on a surface would not work. It would not make
the surface look rough but only look like roughness painted on a smooth surface. The
reason for this is that the predefined texture image is using a light source direction
that does not match the one in the actual scene. One needs to change the normals
(from which shading is defined if one uses the Phong model) if one wants an effect
on the shading. This was done by Blinn ([Blin78]), who coined the term “bump
mapping.” Again, assume that we have a surface patch X parameterized by a func-
tion p(u,v). A normal vector n(u,v) at a point on the surface is obtained by taking the
cross-product of the partial derivatives of p(u,v) with respect to u and v, that is,
(
) =
(
) ¥
(
)
nuv
,
p uv
,
p uv
,
.
u
v
If we perturb the surface slightly along its normals, we get a new surface Y with para-
meterization function P(u,v) of the form
(
)
nuv
nuv
,
,
(
) =
(
) +
(
)
Puv
,
puv
,
buv
,
,
(9.13)
(
)
Search WWH ::




Custom Search