Graphics Reference
In-Depth Information
Furthermore, it's possible that some light is visible from point P but shadowed
at point Q , in which case the use of the incoming light at Q in estimating the
incoming light at P is inappropriate. It is for this reason that photon mapping
is biased: Without infinitely many photons, some points in dark areas will get
their radiance estimates in part from photons in lighter areas, biasing them toward
brighter estimates.
h
h
Q
v 9
v
On the other hand, at least at points of diffuse surfaces, photon mapping is
consistent: As the number of photons, N , goes to infinity, the K samples used to
estimate the light arriving at P are closer and closer to P , causing the incoming
directions to be increasingly better approximations of the incoming direction at P ,
and the radiances to be increasingly better approximations of the radiances at P .
R
P
Figure 31.28: Light from the sun
arrives at P from some direction
η
; sunlight will also arrive at Q
from almost exactly that direc-
tion. But if light from a nearby
point R arrives at P in direction
v
Inline Exercise 31.13: The preceding analysis of consistency assumed that K
was held constant while N goes to infinity. Is the analysis still valid if K is set
to a constant multiple of N ,say, K = 10 5 N ? Why or why not?
, that same source will provide
light at Q from direction
v which
Estimating arriving radiance from nearby samples works best when the arriv-
ing radiance varies smoothly as a function of both position and angle. When there
are point lights and sharp edges in the scene, we get hard shadows, which makes
the arriving radiance discontinuous. On the other hand, this nonsmoothness in
arriving radiance is primarily a consequence of direct lighting, that is, light paths
of the form LDE . We can therefore divide the domain of the integral in the render-
ing equation into two parts: those paths of the form LDE , and all other paths. We
can estimate the integral as a sum of the integrals over each part. The first part is
relatively easy: Single-bounce ray tracing suffices to estimate the direct lighting at
every point of the scene. What about the second part? We can estimate that using
photon mapping! But to do so, we need to eliminate any estimate of transport of
the form LDE from the photon map. We do so by slightly modifying the construc-
tion of the photon map: For each of the N photons, we record in the photon map
only the second and subsequent bounces.
Photon mapping has other limitations. Because points that are nearby in space
may not be nearby in surface normal (see Figure 31.29), using all nearby photons
can give erroneous estimates. Several heuristics have been applied to mitigate this
problem [Jen01, ML09].
may not be close to
v
.
Figure 31.29: Estimating arriv-
ing radiance with nearby photons
works badly at corners and near
thin walls.
r 2 ) , we have the problem that as
the point at which we're estimating radiance moves, we typically lose one photon
at one side of the moving disk and gain another somewhere on the other side; if
these two photons have different power vectors (power in each wavelength band),
then the radiance estimate can have discontinuities, which appear as noticeable
artifacts in the final results. Alternative kernels can mitigate this somewhat, as
Jensen describes.
What we've described is the basic form of photon mapping presented in
Jensen's book, but there are many implicit parameters in the description. For
instance, the k -d tree used for storing photons can be replaced by other data struc-
tures like spatial hashing [MM02], the kernel used for density estimation can be
varied, and even the density estimation technique itself can be altered.
When we use the constant kernel
κ
( v )= 1
/
(
π
31.19.0.1 Final Gathering
One particularly effective enhancement is use of a “final gathering” step during
density estimation. When we examine a point P in the scene, we can estimate the
 
 
Search WWH ::




Custom Search