Graphics Reference
In-Depth Information
Figure 32.12: The Cornell box rendered with 100, 10,000, and 1,000,000 photons.
at P , that determines how much each photon's contribution should matter in the
radiance estimate. If we change from the cylinder kernel to a conelike function
(photons near the gather radius have their contributions reduced to near zero),
then each arrival or departure of a photon within the gather radius (as we vary P )
has a gradual impact. This is the approach used in our renderer.
A very different approach is described by Jensen: Rather than gathering pho-
tons within a fixed radius, we enlarge the radius enough to get a certain number of
photons, and then use the area of the resultant disk in the conversion from power
(stored at incoming photons) to outgoing radiance.
The ray-trace-with-photon-mapping renderer we've written has several param-
eters (the number of samples to use to estimate lighting from area lights, the radius
of the kernel, the number of photons to shoot into the scene), each of which has
an effect on the final result. Figure 32.12 shows that with only 100 photons, the
Cornell box scene looks blotchy, because most points in the scene are not within
the kernel radius of any photons at all. With one million photons, each point is
near thousands of photons, and the estimate of diffusely reflected indirect light is
very smooth. (We've used a large number of samples for area lights to reduce that
source of variation in the image.)
With a larger kernel radius, the low-photon-count image would look smoother,
but then distant photons would affect the appearance of the scene at any point.
Clearly there's a tradeoff between photon count N and kernel radius r . In Jensen's
original photon-mapping algorithm, the radiance estimate was provided by using
afixed number, k , of photons, enlarging the radius as necessary to find that many
photons. This has the advantage of scale invariance —if you double the scene size,
you needn't change anything—but it still leaves the problem of choosing N and k .
The number of samples used in estimating direct lighting from area lights also
has an impact on noise in the image. Figure 32.13 shows this, again using the
Cornell box. With only one sample per light, the image is very noisy; with 100,
the noise is lower than that of the photon-mapped estimate of reflected indirect
radiance in Figure 32.12.
Inline Exercise 32.8: In the one-sample-per-source image, how is the noisi-
ness correlated with the brightness, and why? In which areas of the image is
the human visual system most sensitive to the noise?
It's typical in renderers like this one to use many primary rays per pixel. If
we use 100 primary rays, then we need not use very many rays (per primary
ray) to estimate direct lighting from area sources. We still, however, as Inline
Exercise 32.8 shows, must address the noise in some way, particularly if there
are dark areas in the scene. Fortunately in the case of the Cornell box, indirectly
 
 
Search WWH ::




Custom Search