Graphics Reference
In-Depth Information
Figure 32.20: The eight samples per pixel that were used to generate the Monte Carlo ren-
dering on top are filtered with RPF to produce the improved rendering on the bottom, which
is virtually indistinguishable from a Monte Carlo rendering generated with 8,192 samples
per pixel. (Courtesy of Pradeep Sen and Soheil Darabi, ©2012 ACM, Inc. Reprinted by
permission.)
32.10 Exercises
Exercise 32.1: Up through Listing 32.10, we addressed the effects of the refrac-
tive index in two places in our program: in approximating the Fresnel term,
and in computing the change in radiance at an interface between surfaces of
different refractive indices. We did not, however, use the coefficient of extinc-
tion at all: Every material we considered transmits light perfectly, which means
that all absorption takes place only at the boundaries between materials. Modify
the path tracer to account for the coefficient of extinction of a material.
Exercise 32.2: (a) Let A =( 0, 0 ) , B =( 1, 0 ) , and C =( 1, 1 ) , and let T
be the triangle ABC . Suppose that the texture coordinates for A are ( u A , v A )=
( 0.2, 0.6 ) ,for B they're ( 0.3, 0.3 ) , and for C they're ( 0.5, 0.1 ) . Assume that texture
coordinates are interpolated linearly across the triangle. Find the unit vector u such
that the u -coordinate increases fastest in direction u .
(b) Generalize to arbitrary point and texture coordinates at the three vertices.
Exercise 32.3: (a) We used photon mapping to estimate the diffuse scattering
of indirect light. Jensen suggests not even storing photons except on diffuse sur-
faces. And we also omit direct lighting from the photon mapping calculation—that
gets handled in a separate step. But what would happen if you used photon map-
ping for specular reflections and direct lighting as well? What would you expect?
Would a final gather be of any use?
(b) If you've written a photon-mapping renderer, try modifying it to handle each
of these individually. Were your predictions correct?
Exercise 32.4: Our path tracer and photon mapper both assume that all light
sources are “on the outside”—we don't allow for a glowing lamp embedded in a
glass sphere. Where in the code is the assumption embedded?
 
Search WWH ::




Custom Search