14
Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford Unive rsity SIGGRAPH 1995

Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Embed Size (px)

Citation preview

Page 1: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Optimally Combining Sampling Techniques for Monte Carlo Rendering

Eric Veach and Leonidas J. GuibasComputer Science Department Stanford University

SIGGRAPH 1995

Page 2: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Variance

Sampling the light sources Sampling the BRDF

Sp

ecula

r Ro

ug

hn

ess

Highly specular surface and large light source

Very rough surface and small light source

Page 3: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Multi-sample Model

n

i

n

j ji

jijii

i

i

Xp

XfXw

nF

1 1 ,

,, )(

)()(

1 i

i xw 1)(,where

)()()()()(

)()(1][

1

xdxfxdxpxp

xfxwn

nFE i

i

ii

n

i i

Weighted combination of all the sample values

jjj

iii pc

pcwAn example of wi

(balance heuristic)

ci: relative number of samples taken from pi

Page 4: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Theorem 1

21

min

1][]ˆ[ F

nnFVFV

iiii

jjj

iii pc

pcw

wi: any non-negative functions with i

i xw 1)(

No choice of the wi can improve upon the variance of the balance heuristic by more than (1/mini ni – 1/N)F2

Page 5: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Weighting Heuristics

jjj

iii pc

pcw

jj

ii p

pw

otherwise

ppifw ii 0

1 max

otherwiseppp

pppif

w

jjj

i

i

i

max

max

|

0

(a) balance

(b) cutoff

(c) power

(d) maximum

Page 6: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

variance

roughness

Page 7: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Combine Sampling

With power heuristic )2(

Page 8: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

A simple test scene

(a) Sampling the light source(b) Sampling the hemisphere according to the projected solid angle(c) Combination of samples using the power heuristic

(a) (b) (c)

One area light source and an adjacent diffuse surface.

Page 9: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Bidirectional Path Tracing

3

2

)()()()()()()()(

)()()()()(

,,

21021212101010

10101010

M

pre

M

pe

ie

ippp

xdAxdAxdAxxWxxGxxxfxxGxxL

xdAxdAxxWxxGxxL

LTWLWI

Page 10: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Bidirectional Sampling Strategies

(a) Standard MC path tracing.(b) Standard MC path tracing with direct lighting.(c) Depositing light on a visible surface (photomap).(d) Depositing light when a photon hits the camera lens.

Page 11: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH
Page 12: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Bidirectional Path Tracing

Standard path tracing using the same amount of work (same computation time)

Combines samples from all the bidirectional techniques

25 samples per pixel 56 samples per pixel

Page 13: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

Conclusion

• Power heuristic (with beta=2) gave the best results.

• These techniques are practical, and the additional cost is small – less than 10%

Page 14: Optimally Combining Sampling Techniques for Monte Carlo Rendering Eric Veach and Leonidas J. Guibas Computer Science Department Stanford University SIGGRAPH

PBRT

inline float BalanceHeuristic(int nf, float fPdf, int ng, float gPdf) {return (nf * fPdf) / (nf * fPdf + ng * gPdf);

}inline float PowerHeuristic(int nf, float fPdf, int ng, float gPdf) {

float f = nf * fPdf, g = ng * gPdf;return (f*f) / (f*f + g*g);

}

PBRT define balance and power heuristic in “mc.h”