02941 Physically Based Rendering Density Estimation in Photon - - PowerPoint PPT Presentation

02941 physically based rendering
SMART_READER_LITE
LIVE PREVIEW

02941 Physically Based Rendering Density Estimation in Photon - - PowerPoint PPT Presentation

02941 Physically Based Rendering Density Estimation in Photon Mapping Jeppe Revall Frisvad March 2012 What is density estimation? According to a classical reference on the subject [Silverman 1986] Suppose we have a set of observed data


slide-1
SLIDE 1

02941 Physically Based Rendering

Density Estimation in Photon Mapping

Jeppe Revall Frisvad March 2012

slide-2
SLIDE 2

What is density estimation?

◮ According to a classical reference on the subject [Silverman 1986]

◮ Suppose we have a set of observed data points assumed to be samples from an unknown probability density function. ◮ Density estimation is the construction of an estimate of the density function from observed data.

◮ Stochastic particle tracing results in a distribution of particles (data points) in which radiance is proportional to the density of these light particles

[Walter et al. 1997].

◮ This means that we can use density estimation to reconstruct illumination from a photon map [Jensen 2001]. ◮ Illumination is reconstructed by doing a radiance estimate at each visible surface position.

References

  • Silverman, B. W. Density Estimation for Statistics and Data Analysis. Monographs on Statistics and Applied Probability 26, Chapman &

Hall/CRC, 1986.

  • Walter, B., Hubbard, P. M., Shirley, P., and Greenberg, D. P. Global illumination using local linear density estimation. ACM Transactions on

Graphics 16(3), pp. 217-259, July 1997.

  • Jensen, H. W. Realistic Image Synthesis Using Photon Mapping. A K Peters, 2001.
slide-3
SLIDE 3

The radiance estimate

photons radiance L(x, ω) ≈ ˆ L(x, ω) = Le(x, ω) + 1 r2

  • p

K x − xp r

  • fr(x,

ω′

p,

ω)Φp , where p ∈ {p | xp − x ≤ r} and r is the distance to the kth nearest neighbour.

slide-4
SLIDE 4

Density estimation in statistics

◮ The original density estimator is the histogram [Silverman 1986] ˆ f (x) = 1 nr × (no. of Xi in same bin as x) , where n is the number of samples and r is the bin width. ◮ Or, using variable bin width (bandwidth), ˆ f (x) = 1 n × (no. of Xi in same bin as x) (width of bin containing x) . ◮ Or, using a kernel estimator, ˆ f (x) = 1 n

n

  • i=1

1 r K x − Xi r

  • ,

where K is the kernel function (a bell-shaped function: usually symmetric, non-negative, and normalized).

References

  • Silverman, B. W. Density Estimation for Statistics and Data Analysis. Monographs on Statistics and Applied Probability 26, Chapman &

Hall/CRC, 1986.

slide-5
SLIDE 5

Variance vs. bias trade-off

◮ Consider estimation at a single point x. ◮ Let E denote expected value, then the mean square error is MSEx(ˆ f ) = E{(ˆ f (x) − f (x))2} . ◮ Recall that E is a linear operator, and that variance is V {ˆ f (x)} = E{(ˆ f (x))2} − (E{ˆ f (x)})2 . ◮ Then MSEx(ˆ f ) = V {ˆ f (x)} + (E{ˆ f (x)} − f (x))2 = variance + bias . ◮ The expected value is E{ˆ f (x)} = 1 r K x − y r

  • f (y) dy ,

which is a smoothed version of the true density. ◮ Thus the trade-off is between noise and blur.

slide-6
SLIDE 6

Choosing a kernel

◮ In d dimensions, the kernel density estimator is ˆ f (x) = 1 n

n

  • i=i

1 rd K x − xi r

  • .

◮ Standard kernel functions [Silverman 1986]:

Kernel K(x) Efficiency Epanechnikov (C 0) K(x) =

  • 1

2c−1 d (d + 2)(1 − x2)

for x2 < 1

  • therwise

1 2nd order (C 1) K(x) = 3π−1(1 − x2)2 for x2 < 1

  • therwise

0.9939 3rd order (C 2) K(x) = 4π−1(1 − x2)3 for x2 < 1

  • therwise

0.9867 Gaussian (C ∞) K(x) =

  • (2π)−d/2 exp(− 1

2x2)

for x2 < 1

  • therwise

0.9512 Uniform (C 0) K(x) =

  • c−1

d

for x2 < 1

  • therwise

0.9295 where cd is the volume of the d-dimensional unit sphere.

◮ Consider differentiability (smoothness, C i) as well as efficiency.

slide-7
SLIDE 7

Density estimation in photon mapping

◮ The rendering equation in terms of irradiance E = dΦ/dA: L(x, ω) = Le(x, ω) +

  • fr(x,

ω′, ω) dE(x, ω′) ≈ Le(x, ω) +

  • p∈∆A

fr(x, ω′

p,

ω) ∆Φp(x, ω′

p)

∆A ◮ The ∆-term is called the irradiance estimate. ◮ It is computed using a kernel method.

◮ Consider a circular surface area ∆A = πr 2 ◮ Then the power contributed by the photon p ∈ ∆A is ∆Φp(x, ω′

p) = Φp πK

x − xp r

  • where K is a filter kernel.

◮ Simplest choice (constant kernel): K(x) = 1/π for x2 < 1

  • therwise

.

slide-8
SLIDE 8

Using the second order kernel in photon mapping

uniform 2nd order ◮ The uniform kernel has efficiency 0.9295. ◮ The second order kernel has efficiency 0.9939. ◮ Better efficiency means that both bias and variance is reduced (the trade-off is improved).

slide-9
SLIDE 9

Topological bias

no normal check normal check ◮ For radiance estimation, we look for the k nearest neighbours using a kd-tree. The look-up is in 3D, but we only want neighbours on the same surface. ◮ Assuming that the surface is locally flat, we can reduce topological bias by ensuring |(xp − x) · n| < ε.

slide-10
SLIDE 10

Boundary bias - geometrical boundaries

boundaries not handled using mass midpoint of photons

◮ When the look-up area exceeds beyond geometrical boundaries, r is no longer the true kernel support radius. ◮ The mass midpoint of the photons can be used here. ◮ A better way: find the convex hull of the nearest neighbour photons.

slide-11
SLIDE 11

Boundary bias - illumination boundaries

◮ Blur will still appear near sharp illumination features such as caustics. ◮ We cannot completely eliminate this bias. ◮ There are different methods for reducing it:

◮ Differential checking [Jensen and Christensen 1995]: Check the change in the radiance estimate as each photon is included. Stop if the estimate increases or decreases drastically. ◮ Photon differentials [Schjøth et al. 2007]: Trace ray differentials alongside each photon and use them to choose an individual, anisotropic kernel which follows the illumination features.

◮ This is (usually) beyond the scope of this course.

References

  • Jensen, H. W., and Christensen, N. J. Photon maps in bidirectional monte carlo ray tracing of complex objects. Computers & Graphics

19(2), pp. 215–224, March 1995.

  • Schjøth, L., Frisvad, J. R., Erleben, K., and Sporring, J. Photon differentials. In Proceedings of GRAPHITE 2007, pp. 179–186, ACM, 2007.