A Theory of Monte Carlo Visibility Sampling

Slides:



Advertisements
Similar presentations
Real-time Shading with Filtered Importance Sampling
Advertisements

An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
3-D Computational Vision CSc Image Processing II - Fourier Transform.
Robust statistical method for background extraction in image segmentation Doug Keen March 29, 2001.
Computer graphics & visualization Global Illumination Effects.
Stratified Sampling for Stochastic Transparency
Light Fields PROPERTIES AND APPLICATIONS. Outline  What are light fields  Acquisition of light fields  from a 3D scene  from a real world scene 
MIT EECS 6.837, Durand and Cutler Sampling, Aliasing, & Mipmaps.
Accelerating Spatially Varying Gaussian Filters Jongmin Baek and David E. Jacobs Stanford University.
Kartic Subr, Derek Nowrouzezahrai, Wojciech Jarosz, Jan Kautz and Kenny Mitchell Disney Research, University of Montreal, University College London.
Scalability with many lights II (row-column sampling, visibity clustering) Miloš Hašan.
5D COVARIA NCE TRACING FOR EFFICIENT DEFOCUS AND MOTION BLUR Laurent Belcour 1 Cyril Soler 2 Kartic Subr 3 Nicolas Holzschuch 2 Frédo Durand 4 1 Grenoble.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
Sampling, Aliasing, & Mipmaps
An Efficient Representation for Irradiance Environment Maps Ravi Ramamoorthi Pat Hanrahan Stanford University.
Advanced Computer Graphics (Fall 2009) CS 294, Rendering Lecture 5: Monte Carlo Path Tracing Ravi Ramamoorthi
CS248 Midterm Review. CS248 Midterm Mon, November 4, 7-9 pm, Terman Aud Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
Immagini e filtri lineari. Image Filtering Modifying the pixels in an image based on some function of a local neighborhood of the pixels
CS248 Midterm Review. CS248 Midterm Mon, November 3, 7-9 pm, Gates B01 Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 17: Frequency Analysis and Signal Processing for Rendering Ravi Ramamoorthi
CS443: Digital Imaging and Multimedia Filters Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring 2008 Ahmed Elgammal Dept.
Introduction to Computer Vision CS / ECE 181B Thursday, April 22, 2004  Edge detection (HO #5)  HW#3 due, next week  No office hours today.
Linear View Synthesis Using a Dimensionality Gap Light Field Prior
A Theory of Locally Low Dimensional Light Transport Dhruv Mahajan (Columbia University) Ira Kemelmacher-Shlizerman (Weizmann Institute) Ravi Ramamoorthi.
Matlab Tutorial Continued Files, functions and images.
Frequency Analysis and Sheared Reconstruction for Rendering Motion Blur Kevin Egan Yu-Ting Tseng Nicolas Holzschuch Frédo Durand Ravi Ramamoorthi Columbia.
1 Image filtering Hybrid Images, Oliva et al.,
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Titre.
Direct Illumination with Lazy Visibility Evaluation David Hart Philip Dutré Donald P. Greenberg Cornell University SIGGRAPH 99.
© Chun-Fa Chang Sampling Theorem & Antialiasing. © Chun-Fa Chang Motivations “ My ray traced images have a lot more pixels than the TV screen. Why do.
ElectroScience Lab IGARSS 2011 Vancouver Jul 26th, 2011 Chun-Sik Chae and Joel T. Johnson ElectroScience Laboratory Department of Electrical and Computer.
Antialiasing with Line Samples Thouis R. Jones, Ronald N. Perry MERL - Mitsubishi Electric Research Laboratory.
1 Patch Complexity, Finite Pixel Correlations and Optimal Denoising Anat Levin, Boaz Nadler, Fredo Durand and Bill Freeman Weizmann Institute, MIT CSAIL.
Efficient Irradiance Normal Mapping Ralf Habel, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University of Technology.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
Image Processing Edge detection Filtering: Noise suppresion.
Fourier Analysis of Stochastic Sampling For Assessing Bias and Variance in Integration Kartic Subr, Jan Kautz University College London.
Real-time Shading with Filtered Importance Sampling Jaroslav Křivánek Czech Technical University in Prague Mark Colbert University of Central Florida.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Digital image processing Chapter 3. Image sampling and quantization IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction 2. Sampling in the two-dimensional.
4. Numerical Integration. Standard Quadrature We can find numerical value of a definite integral by the definition: where points x i are uniformly spaced.
Fourier Depth of Field Cyril Soler, Kartic Subr, Frédo Durand, Nicolas Holzschuch, François Sillion INRIA, UC Irvine, MIT CSAIL.
Duy & Piotr. How to reconstruct a high quality image with the least amount of samples per pixel the least amount of resources And preserving the image.
MIT EECS Sampling, Aliasing, & Mipmaps. MIT EECS Last Time? Global illumination “physically accurate light transport” The rendering equation.
CS348B Lecture 9Pat Hanrahan, Spring 2005 Overview Earlier lecture Statistical sampling and Monte Carlo integration Last lecture Signal processing view.
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
Sampling Pixel is an area!! – Square, Rectangular, or Circular? How do we approximate the area? – Why bother? Color of one pixel Image Plane Areas represented.
1 Methods in Image Analysis – Lecture 3 Fourier CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2004 George Stetten, M.D., Ph.D.
Digital Image Processing
2D Fourier Transform.
01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
Noise Filtering in Monte Carlo Rendering
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Linear Filters and Edges Chapters 7 and 8
Sampling and Reconstruction of Visual Appearance
Distributed Ray Tracing
Sampling Theorem & Antialiasing
(C) 2002 University of Wisconsin, CS 559
Sampling and Antialiasing
All about convolution.
Sampling Theorem told us …
Joshua Barczak CMSC435 UMBC
Image filtering Hybrid Images, Oliva et al.,
Distributed Ray Tracing
Monte Carlo I Previous lecture Analytical illumination formula
Motion-Based Analysis of Spatial Patterns by the Human Visual System
Distributed Ray Tracing
Distributed Ray Tracing
Presentation transcript:

A Theory of Monte Carlo Visibility Sampling Ravi Ramamoorthi UC Berkeley John Anderson Pixar (now at Google) Mark Meyer Pixar Derek Nowrouzezahrai Disney Research Zurich University of Montreal

Motivation Soft shadows critical in high quality rendering Monte Carlo sampling of visibility most common Which (non-adaptive) sampling patterns are better? Theory of Monte Carlo visibility sampling Focus on (binary) visibility only; not general rendering

Monte Carlo Soft Shadows Light Pixel

Experiment: Sampling Strategies circle light uniform jitter RMS 6.6%

Experiment: Sampling Strategies circle light stratified RMS 8.3% Circle

Experiment: Sampling Strategies square light uniform jitter RMS 13.4%

Experiment: Sampling Strategies square light stratified RMS 10.4%

Contributions Theory of Visibility Sampling for Linear Lights Uniform Jitter Sampling Lowest error at center of stratum (uniform sampling) Can avoid banding, keep low error with uniform jitter 2D Pixel-Light Fourier Analysis Planar Area Lights

Previous Work Early MC Sampling [Cook 86, Mitchell 87,96, HK 94] Empirical Study Linear Lights [Ouellette & Fiume 01] Adaptive Sampling [Mitchell 91, Guo98] Adaptive Filtering [Hachisuka 08, …, this session] Shadow Coherence [Agrawala et al. 00, Egan et al. 11] Can leverage our approach Signal Processing and Frequency Analysis Space-Angle [Durand et al. 05] Sheared Visibility Spectrum [Egan et al. 11] Fourier Analysis of MC [Ouellete & Fiume 01, Durand 11]

Linear Lights: Discontinuities Blocker Pixel 1 Discontinuity Visibility Single Discontinuity: Heaviside Function Two Discontinuities: Boxcar Function Many Discontinuities: Many Box Functions

Single Discontinuity: Uniform Sampling Error of Uniform Sampling Error depends only on stratum of discontinuity Error depends only on discontinuity location Worst-Case, Variance (N = samples) Depends only on sample placement in stratum Visibility at Pixel Uniform Sampling Absolute Error

Single Discontinuity: Errors Uniform Sampling is optimal (but bands, bias) Reduces variance by factor of 2 vs. stratified Benefits of uniform without banding? Stratified best unbiased method for 1 discontinuity, but… Sample Location Worst-Case RMS Error Variance End-pts of stratum e.g., QMC Halton Random (Jittered) Stratified Sampling Center (Uniform)

Two Discontinuities: Boxcar 1 Visibility Assume discontinuities in different strata For very complex visibility, stratification not useful anyway Strata 1 V Ground truth net visibility = 0.75 + 0.75 = 1.5 Uniform Sampling: net visibility = 1+1 = 2, biased Stratified Sampling: net vis 00 / 01 / 10 / 11 = 0,1,2, high variance Uniform Jitter: net vis 00 / 01 / 10 / 11 = 0,1,2, low variance

Two Discontinuities: Errors Uniform Jitter exploits correlation of discontinuities Error stays the same as in the single discontinuity case While other methods (stratified) double the variance Multiple discontinuities: separate into individual box functions Uniform Jitter has same variance as uniform Optimal with no bias or banding Sampling Method Worst-Case RMS Error Variance Stratified Uniform Jitter Uniform

Linear Light: Uniform Error Image (scaled up) Uniform 16 samples 3.97% RMS Error (best) Uniform causes banding

Linear Light: Uniform Jitter Error Image (scaled up) Uniform Jitter 16 samples 4.21% RMS Error No banding, low error

Linear Light: Stratified Error Image (scaled up) Stratified 16 samples 5.36% RMS Error (worst)

2D Pixel Light Fourier Analysis Fourier analysis for fixed depth blocker Shadow spectrum line in pixel-light space Wedge if blockers at multiple depths [Egan 2011] Builds on [Egan 2011] and Fourier analysis of Monte Carlo [Durand 2011] but full pixel-light theory y Light y Ωy Occlusion Blocker x Receiver x Ωx Visibility Spatial Domain Fourier Domain

Fourier Analysis: Uniform Sampling Sampling pattern same for all x in uniform sampling Fourier spectrum on vertical line, spacing depends on N Product of visibility and sampling: Fourier convolution Errors (only) when aliases touch spatial axis Banding since error concentrated in specific frequencies Ωy Ωy Ωy Ωx Ωx Ωx Visibility Spectrum Uniform Sampling Sampled Visibility

Fourier Analysis: Uniform Jitter Sampling pattern uniform spaced but jittered at each x Fourier spectrum dots for replicas become horizontal lines Fourier convolution: Central spectrum plus noise Errors diffused to entire spatial axis No banding: error not concentrated in specific frequencies Ωy Ωy Ωy Ωx Ωx Ωx Visibility Spectrum Uniform Jitter Sampling Sampled Visibility

Planar Area Lights Apply linear 1D analysis to each “scanline” of 2D light But possible bad correlation between scanlines Samples Correlated Samples De-Correlated Uniform Jitter Stratified Blocked Visible

Frequency Analysis: Shape of Light For one pixel, Fourier spectrum of visibility, light Uniform Jitter is a regular comb pattern Simple visibility lies on a line (assume horizontal) Ωy Ωx

Frequency Analysis: Shape of Light Integral of product of visibility and sampling pattern True in spatial or Fourier domain Ground Truth is constant (0 frequency) term only Errors when significant spectral overlap Ωy Ωx

Frequency Analysis: Shape of Light Smooth lights (e.g., Gaussian, circular) Multiply light by Gaussian same as multiply sampling pattern Fourier: Convolve sampling pattern by Gaussian Overlap now only along horizontal line, not full pattern Ωy Ωx

Implementation Simple shaders in RenderMan (general RIB files) NVIDIA Optix for real-time applications Sampling patterns in closest hit kernel Practical Result: Uniform Jitter best published method to our knowledge for circle, linear lights

Grids: Circle Light: Stratified 20

Grids: Circle Light: Uniform Jitter 20

Grids: Circle Light: Halton, Warp 25

Grids: Circle and Gaussian Lights Comparable gain across all sample counts

Conclusion Comprehensive Theory of MC Visibility Sampling Linear (1D) Lights: Uniform Jitter is optimal Circular or Gaussian Light: Uniform Jitter is better Square Light: Uniform Jitter worse than Stratified Halton, blue noise do not perform better Introduce new Statistical and Fourier approaches Best sampling pattern depends on shape of light Can choose linear or circular instead of square lights Practical gains of 20%-40% for almost no effort Future analyses of Monte Carlo patterns Optimal pattern for planar lights still an open question

Acknowledgments Rob Cook for inspiration, discussing 2D pixel-light Fredo Durand for notes on Fourier Monte Carlo Kevin Egan, Florian Hecht, Christophe Hery, Juan Buhler for scenes in the paper Li-Yi Wei and Christophe Hery for discussions of blue noise and sampling methods respectively Anonymous reviewers for many helpful suggestions

To Jim Arvo, 1956-2011

Tentacles: Very Complex Visibility All methods (including pure random) perform the same Circle Light: Stratified 20 samples Uniform Jitter: 20 samples

Tentacles: Very Complex Visibility Error vs Samples: Circle Light Error vs Samples: Square Light