50
Error analysis of estimators that use combinations of stochastic sampling strategies for direct illumination Kartic Subr, Derek Nowrouzezahrai, Wojciech Jarosz, Jan Kautz and Kenny Mitchell Disney Research, University of Montreal, University College London

Kartic Subr , Derek Nowrouzezahrai , Wojciech Jarosz , Jan Kautz and Kenny Mitchell

  • Upload
    svein

  • View
    22

  • Download
    0

Embed Size (px)

DESCRIPTION

Kartic Subr , Derek Nowrouzezahrai , Wojciech Jarosz , Jan Kautz and Kenny Mitchell Disney Research, University of Montreal, University College London. Error analysis of estimators that use combinations of stochastic sampling strategies for direct illumination. - PowerPoint PPT Presentation

Citation preview

Page 1: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

Error analysis of estimators that use combinations ofstochastic sampling strategies for direct illuminationKartic Subr, Derek Nowrouzezahrai, Wojciech Jarosz, Jan Kautz and Kenny Mitchell

Disney Research, University of Montreal, University College London

Page 2: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

direct illumination is an integral

Exitant radiance Incident radiance

Page 3: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

abstracting away the application…

0

Page 4: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

numerical integration implies sampling

0sampled integrand

secondary estimate using N samples

Page 5: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

render 1 (N spp) render 2 (N spp) render 1000 (N spp)

Histogram of radiance at pixel

each pixel is a secondary estimate(path tracing)

Page 6: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

why bother? I am only interested in 1 image

Page 7: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

error visible across neighbouring pixels

Page 8: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

histograms of 1000 N-sample estimates

estimated value (bins)

Num

ber o

f esti

mat

esreference

stochasticestimator 2

stochastic estimator 1

deterministicestimator

Page 9: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

error includes bias and variance

estimated value (bins)

Num

ber o

f esti

mat

esreference

bias

variance

Page 10: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

error of unbiased stochastic estimator = sqrt(variance)

error of deterministic estimator = bias

Page 11: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

Variance depends on samps. per estimate ‘N’

estimated value (bins)

Num

ber o

f esti

mat

es

estimated value (bins)N

umbe

r of e

stim

ates

Histogram of 1000 estimates with N =10

Histogram of 1000 estimates with N =50

Page 12: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

increasing ‘N’, error approaches bias

N

erro

r

Page 13: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

convergence rate of estimator

N

erro

r

log-Nlo

g-er

ror

convergence rate = slope

Page 14: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

comparing estimators

log-

erro

r

log-N

Estimator 2

Estimator 1

Estimator 3

Page 15: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

the “better” estimator depends on application

log-

erro

r

log-N

Estimator 2

Estimator 1

real

-tim

e

Offl

ine

sample budget

Page 16: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

typical estimators (anti-aliasing)

log-

erro

r

log-N

random MC (-0.5)

MC with jittered sampling (-1.5)QMC (-1)

randomised QMC (-1.5)

MC with importance sampling (-0.5)

Page 17: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

What happens when strategies are combined?

Z X Y= +

combined estimate

single estimate using estimator 1

single estimate using estimator 2

( ) / 2

?

& what about convergence?

Page 18: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

What happens when strategies are combined?

Non-trivial, not intuitiveneeds formal analysis

can combination improve convergence or only constant?

Page 19: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

we derived errors in closed form…

Page 20: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

combinations of popular strategies

Page 21: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

Improved convergence by combining …

Strategy A Strategy B Strategy C

New strategy D Observed

convergence of D is better than

that of A, B or C

Page 22: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

exciting result!

Strategy A Strategy B Strategy C

New strategy D

jittered antithetic importance

Observedconvergence of D

is better than that of A, B or C

Page 23: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

related work

Correlated and antithetic sampling

Combining variance reduction

schemes

Monte Carlo sampling

Variance reduction

Quasi-MC methods

Page 24: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

Intuition(now)

Formalism(suppl. mat)

Page 25: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

recall combined estimator

Z X Y= +

combined estimate

single estimate using estimator 1

single estimate using estimator 2

( ) / 2

Page 26: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

applying variance operator

Z X Y= +

combined estimate

single estimate using estimator 1

single estimate using estimator 2

V ( ) V ( ) V ( )( ) / 4

+ 2 cov ( , ) /4X Y

Page 27: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

variance reduction via negative correlation

Z X Y= +V ( ) V ( ) V ( )( ) / 4

+ 2 cov ( , ) /4X Y

combined estimate

single estimate using estimator 1

single estimate using estimator 2

best case is when X and Y have a correlation of -1

Page 28: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

“antithetic” estimates yield zero variance!

Z X Y= +V ( ) V ( ) V ( )( ) / 4

+ 2 cov ( , ) /4X Y

combined estimate

single estimate using estimator 1

single estimate using estimator 2

Page 29: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

antithetic estimates vs antithetic samples?

X YX = f(s) Y = f(t)

x

f(x)

s t

X

Y

Page 30: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

antithetic estimates vs antithetic samples?

x

f(x)

s t

X

Y

if t=1-s, corr(s,t)=-1- (s,t) are antithetic samples- (X,Y) are not antithetic estimates unless f(x) is linear!- worse, cov(X,Y) could be positive and increase overall variance

Page 31: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

antithetic sampling within strata

x

f(x)

s t

?

Page 32: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

integrand not linear within many strata• But where linear, variance is close to zero

• As number of strata is increased, more benefit– i.e. if jittered, benefit increases with ‘N’– thus affects convergence

• Possibility of increased variance in many strata

• Improve by also using importance sampling?

Page 33: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

review: importance sampling as warp

x

f(x)

g(x)

uniform

Ideal case: warped integrand is a constant

Page 34: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

with antithetic: linear function sufficient

x

with

with

with

Page 35: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

with stratification + antithetic: piece-wise linear is sufficient

x

Warped integrand

Page 36: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

summary of strategies• antithetic sampling

– zero variance for linear integrands (unlikely case)

• stratification (jittered sampling)– splits function into approximately piece-wise linear

• importance function– zero variance if proportional to integrand (academic case)

Page 37: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

summary of combination• Stratify

• Find importance function that warps into linear func.

• Use antithetic samples

• Resulting estimator: Jittered Antithetic Importance sampling (JAIS)

Page 38: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

details (in paper)• Generating correlated samples in higher dimensions

• Testing if correlation is positive (when variance increases)

Page 39: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

results

Low discrepancy Jittered antithetic MIS

Page 40: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

results

Page 41: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

comparisons using Veach’s scene

antithetic

jittered

LH cube

JA+MIS

Page 42: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

comparison with MIS

Page 43: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

comparison with solid angle IS

Page 44: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

comparison without IS

Page 45: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

limitation

GI implies high dimensional domain

Glossy objects create non-linearities

Page 46: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

limitation: high-dimensional domains

Page 47: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

conclusion• Which sampling strategy is best?

– Integrand?– Number of secondary samples?– Bias vs variance?

• Convergence of combined strategy – could be better than any of the components’ convergences

• Jittered Antithetic Importance sampling– Shows potential in early experiments

Page 48: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

future work• Explore correlations in high dimensional integrals

• Analyse combinations with QMC sampling

• Re-asses notion of importance, for antithetic importance sampling

Page 49: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

acknowledgements

• I was funded through FI-Content, a European (EU-FI PPP) project.

• Herminio Nieves - HN48 Flying Car model. http://oigaitnas.deviantart.com

• Blochi - Helipad Golden Hour environment map. http://www.hdrlabs.com/sibl/archive.html

Page 50: Kartic Subr , Derek  Nowrouzezahrai ,  Wojciech Jarosz ,  Jan  Kautz  and Kenny  Mitchell

thank you