Importance Importance Resampling for Resampling for Global Global Illumination Illumination Justin Talbot, David Cline, and Justin Talbot, David Cline, and Parris Egbert Parris Egbert Brigham Young University Brigham Young University Provo, UT Provo, UT
33
Embed
Importance Resampling for Global Illumination Justin Talbot, David Cline, and Parris Egbert Brigham Young University Provo, UT.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Importance Resampling Importance Resampling for Global Illuminationfor Global Illumination
Justin Talbot, David Cline, and Parris Justin Talbot, David Cline, and Parris EgbertEgbert
Brigham Young UniversityBrigham Young UniversityProvo, UTProvo, UT
TermsTerms
Importance Sampling (IS)Importance Sampling (IS)
• Variance reduction technique for Monte Carlo integrationVariance reduction technique for Monte Carlo integration
• Developed in statistical literatureDeveloped in statistical literature• Two stage technique for generating samples from a Two stage technique for generating samples from a
• Novel variance reduction technique for Monte Carlo Novel variance reduction technique for Monte Carlo integration using SIR to generate samplesintegration using SIR to generate samples
OutlineOutline
Related WorkRelated Work Importance ResamplingImportance Resampling Resampled Importance SamplingResampled Importance Sampling Selection of parametersSelection of parameters ResultsResults ConclusionConclusion
To be unbiased, weight must account for:To be unbiased, weight must account for:• gg is unnormalized is unnormalized• YYii are only approximately distributed are only approximately distributed
When M=1, reduces to standard IS using When M=1, reduces to standard IS using pp
As M → ∞, approaches standard IS using As M → ∞, approaches standard IS using g g (normalized)(normalized)
VarianceVariance
Some intuition, see paper for the gory detailsSome intuition, see paper for the gory details
Compared to importance samplingCompared to importance sampling• Using Using gg (instead of (instead of pp) reduces variance) reduces variance• The weighting term increases varianceThe weighting term increases variance
VarianceVariance
For a fixed N, RIS is at least as good as For a fixed N, RIS is at least as good as standard importance sampling.standard importance sampling.
Assuming Assuming gg is a better sampling density is a better sampling density than than pp
EfficiencyEfficiency
Efficiency - Variance reduction per timeEfficiency - Variance reduction per time
Increasing M means decreasing N and vice versa.Increasing M means decreasing N and vice versa.
There is an efficiency optimal trade off between M There is an efficiency optimal trade off between M and Nand N
EfficiencyEfficiency
If efficiency optimal M > 1, then RIS is betterIf efficiency optimal M > 1, then RIS is better
Generally occurs when:Generally occurs when:• gg is a lot better than is a lot better than pp
AND/ORAND/OR• Computing Computing gg and and pp is much cheaper than computing is much cheaper than computing ff
Example - Direct LightingExample - Direct Lighting
Direct Lighting: accounts for light arriving Direct Lighting: accounts for light arriving at a surface directly from a light sourceat a surface directly from a light source
To use RIS, we must chooseTo use RIS, we must choose• pp – like standard importance sampling – like standard importance sampling• gg• MM• NN
Example - Choosing gExample - Choosing g Remember, RIS is better when:Remember, RIS is better when:
• gg is a lot better than is a lot better than ppAND/ORAND/OR
• Computing Computing gg and and pp is much cheaper than computing is much cheaper than computing ff
So, we want a So, we want a gg that is very similar to that is very similar to ff and cheap to and cheap to computecompute
An obvious(?) choice is:An obvious(?) choice is:
gg must be real-valued, so take luminance must be real-valued, so take luminance
Example - Choosing M and NExample - Choosing M and N
N=100, M=1(Better shadows, color)
N=1, M=450(Better direct lighting)↔
Robustly choosing M and NRobustly choosing M and N Finding the Finding the truetrue optimal values of M and N can be optimal values of M and N can be
difficult:difficult:
• There are different optimal values of M and N for each There are different optimal values of M and N for each pixelpixel
• Requires estimating Requires estimating TTXX – Time to compute fake sample, – Time to compute fake sample, TTYY – Time to compute real sample, – Time to compute real sample, and variance and variance
for each pixel.for each pixel.
• See paper for detailsSee paper for details
Robustly choosing M and NRobustly choosing M and N Instead, we approximate a single pair for Instead, we approximate a single pair for
the entire image using just Tthe entire image using just TXX and T and TYY::
• M’ = TM’ = TYY/T/Txx
• N’ = Remainder of timeN’ = Remainder of time
Using M’ and N’ will result in no more than Using M’ and N’ will result in no more than 2 times the variance of the true optimal 2 times the variance of the true optimal valuesvalues
• For common scenes, the bound will be much For common scenes, the bound will be much smaller.smaller.
Results – Direct LightingResults – Direct Lighting
RIS using estimated optimal values:
N’=64.8, M’=3.37
57% variance reduction (equal time)
Results – Direct LightingResults – Direct Lighting
Variance reduction is scene Variance reduction is scene dependentdependent
Using approximate optimal values of Using approximate optimal values of M and N may be worse than standard M and N may be worse than standard importance samplingimportance sampling
• New general unbiased variance reduction New general unbiased variance reduction techniquetechnique
• Demonstrated how to choose parameters Demonstrated how to choose parameters robustlyrobustly
• Demonstrated successful variance reduction on Demonstrated successful variance reduction on some scenessome scenes
Concluding ThoughtsConcluding Thoughts
RIS is better than IS when:RIS is better than IS when:
g g is much better than is much better than ppAND/ORAND/OR
Computing Computing gg and and pp is much cheaper than is much cheaper than computing computing ff
Intuition: RIS takes advantage of Intuition: RIS takes advantage of differences in variance or differences in variance or computation expensecomputation expense
Concluding ThoughtsConcluding Thoughts
Future WorkFuture Work
• Application to other problems in rendering or Application to other problems in rendering or other fieldsother fields
• Development of better choices of Development of better choices of gg and and pp
• Combining RIS and Multiple Importance Combining RIS and Multiple Importance SamplingSampling