1 / 48

Importance Resampling for Global Illumination

Importance Resampling for Global Illumination. Justin F. Talbot Master’s Thesis Defense Brigham Young University Provo, UT. Global Illumination. Goal: Create realistic images from virtual scenes. Global Illumination. Goal: Create realistic images from virtual scenes.

Faraday
Download Presentation

Importance Resampling for Global Illumination

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Importance Resampling for Global Illumination Justin F. Talbot Master’s Thesis Defense Brigham Young University Provo, UT

  2. Global Illumination Goal: Create realistic images from virtual scenes.

  3. Global Illumination Goal: Create realistic images from virtual scenes. Approach: Treat each pixel as an integral.

  4. Monte Carlo Integration Approximation: • Generate random samples, {y1,…,yN}, from density q • Evaluate f at each sample • Compute estimate

  5. Monte Carlo Integration • Importance Sampling • Choose q to be nearly proportional to f • Restrictions: • q must be normalized (integrate to 1) • q must be easy to sample

  6. Thesis Question • Can we generalize importance sampling to allow • unnormalized q? • difficult to sample q? • Motivation: • If so, then we can pick a q that is more proportional to f. • More variance reduction.

  7. Thesis Contributions • Resampled Importance Sampling (RIS) • Proofs • RIS unbiased • RIS variance • Efficiency optimal parameters • Robust approximate parameters • RIS combined with • Stratified Sampling • Multiple Importance Sampling • Application to direct lighting problem

  8. Resampled Importance Sampling • A generalization of importance sampling that permits • unnormalized q and • difficult to sample q. • Based upon a sampling technique called importance resampling.

  9. Importance Resampling • Goal: generate samples from q • Problems: • q may not be normalized. • q can’t be sampled using simpler techniques • Solution: use 2-stage sampling (resampling)

  10. Importance Resampling

  11. Importance Resampling • Generate proposals from density p.p should be easy to sample Proposals = {x1,…,xM}

  12. Importance Resampling • Generate proposals from density p. • Compute weights.Weighted proposals form a discrete approximation of q

  13. Importance Resampling • Generate proposals from density p. • Compute weights. • Draw samples from the proposals with probability prop. to weight.Samples are approximately distributed according to q!Samples = {y1,…,yN}

  14. Importance Resampling • Provides a way to generate samples from a “difficult” distribution. • Limitations: • Distribution is an approximation for any finite number of proposals, M. • Samples may be repeated if drawn from same set of proposals.

  15. Resampled Importance Sampling • How do we combine • proposals {x1,…,xM}, • weights {w(x1),…,w(xM)}, and • samples {y1,…,yN} to create an unbiased estimate of ?

  16. Resampled Importance Sampling • How do we combine • proposals {x1,…,xM}, • weights {w(x1),…,w(xM)}, and • samples {y1,…,yN} to create an unbiased estimate of ?

  17. Resampled Importance Sampling • How do we combine • proposals {x1,…,xM}, • weights {w(x1),…,w(xM)}, and • samples {y1,…,yN} to create an unbiased estimate of ? Same as standard Monte Carlo integration estimate (except q is not normalized)

  18. Resampled Importance Sampling • How do we combine • proposals {x1,…,xM}, • weights {w(x1),…,w(xM)}, and • samples {y1,…,yN} to create an unbiased estimate of ? Additional term corrects: Importance Resampling approximation Unnormalized q

  19. Thesis Question • Can we generalize importance sampling to allow • unnormalized q? • difficult to sample q? • Motivation: • If so, then we can pick a q that is more proportional to f. • More variance reduction. YES!

  20. Resampled Importance Sampling • The variance of RIS is: • To give more variance reduction than standard importance sampling: • proposals must be computationally cheaper than samples AND • q must be more prop. to f than p (a better importance sampling density).

  21. Resampled Importance Sampling • We also have to choose M (# of proposals) and N (# of samples). • For a fixed time constraint, we have to trade off.

  22. Example - Choosing M and N ↔ N=1, M=450 (Better direct lighting) N=100, M=100 (Better shadows, color)

  23. Resampled Importance Sampling • Could directly minimize variance equation • Too hard, so we approximate

  24. Resampled Importance Sampling • M* = 0.5 * Ttotal / Tproposal • N* = 0.5 * Ttotal / Tsample • Simple • Give equal time to proposals and samples • Robust • Results in no more than twice the variance of the true optimal values

  25. Results – Direct Lighting RIS using estimated optimal values: M* = 218, N* = 64.8 57% variance reduction (equal time)

  26. Results – Direct Lighting N=100, M=100 N=64.8, M=218 N=1, M=450

  27. Results II 34% variance reduction

  28. Results III 33% variance reduction

  29. Stratifying RIS • Stratified sampling

  30. Stratifying RIS • Stratified sampling • Divide domain into strata • Take a single sample in each strata • Avoids clustering of samples

  31. Stratifying RIS • In RIS • Stratify proposals • Avoids clustering • Apply standard techniques

  32. Stratifying Proposals Proposals only RIS without stratification 34% variance reduction

  33. Stratifying RIS • In RIS • Stratify proposals • Avoids clustering • Apply standard techniques

  34. Stratifying RIS • In RIS • Stratify proposals • Avoids clustering • Apply standard techniques • Stratify samples • Avoids clustering • Avoids duplicates

  35. Stratifying RIS • How do we stratify samples? • Equal-proposals • Equal-weights

  36. Stratifying Samples Proposals only Equal-proposals Equal-weights 34% variance reduction 37% variance reduction 42% variance reduction

  37. Multiple Importance Sampling Start at surface Start at light • We can often generate proposals from multiple densities • How can we combine them?

  38. Multiple Importance Sampling Start at surface Start at light • We can often generate proposals from multiple densities • How can we combine them? • Multiple Importance Sampling

  39. Multiple Importance Sampling • Generate proposals from densities p1,…,pK.p should be easy to sample, i.e. using CDF inversion or rejection samplingProposals = {x1,…,xM}

  40. Multiple Importance Sampling • Generate proposals from densities p1,…,pK. • Compute weights.

  41. Multiple Importance Sampling • Generate proposals from densities p1,…,pK. • Compute weights.

  42. Multiple Importance Sampling • Generate proposals from densities p1,…,pK. • Compute weights. • Draw samples from the proposals with probability prop. to weight.

  43. Multiple Importance Sampling Start at surface Start at light

  44. Multiple Importance Sampling MIS without RIS MIS with RIS 30% variance reduction

  45. Thesis Contributions • Resampled Importance Sampling (RIS) • Proofs • RIS unbiased • RIS variance • Efficiency optimal parameters • Robust approximate parameters • RIS combined with • Stratified Sampling • Multiple Importance Sampling • Application to direct lighting problem

  46. Concluding Thoughts • RIS is better than IS when: • q is a better importance sampling density than p AND • Computing proposals is much cheaper than computing samples • Intuition: RIS takes advantage of differences in variance or computation expense

  47. Concluding Thoughts • Future Work • Application to other problems in global illumination • Application to other fields • Development of better choices of q and p • Examine trade off between computational expense and importance sampling quality

  48. Questions

More Related