Biased Monte Carlo Ray Tracing:

Similar documents
Biased Monte Carlo Ray Tracing

Discussion. Smoothness of Indirect Lighting. History and Outline. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Spring 2013)

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

Recent Advances in Monte Carlo Offline Rendering

Global Illumination using Photon Maps

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate?

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

The Rendering Equation and Path Tracing

2/1/10. Outline. The Radiance Equation. Light: Flux Equilibrium. Light: Radiant Power. Light: Equation. Radiance. Jan Kautz

Photon Mapping. Michael Doggett Department of Computer Science Lund university

Stochastic Path Tracing and Image-based lighting

Photon Mapping. Kadi Bouatouch IRISA

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

CS 563 Advanced Topics in Computer Graphics Irradiance Caching and Particle Tracing. by Stephen Kazmierczak

Lecture 12: Photon Mapping. Biased Methods

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

The Rendering Equation. Computer Graphics CMU /15-662

Lecture 7: Monte Carlo Rendering. MC Advantages

Choosing the Right Algorithm & Guiding

Importance Sampling of Area Lights in Participating Media

Final Project: Real-Time Global Illumination with Radiance Regression Functions

Global Illumination and Monte Carlo

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Motivation. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

Photon Differentials

Lecture 7 - Path Tracing

Photon Mapping. Due: 3/24/05, 11:59 PM

Motivation: Monte Carlo Path Tracing. Sampling and Reconstruction of Visual Appearance. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Irradiance Gradients. Media & Occlusions

Introduction to Photon Mapping RADIANCE Workshop 2010 Course Advanced Fenestration

Global Illumination. COMP 575/770 Spring 2013

Reflection models and radiometry Advanced Graphics

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

Greg Ward / SIGGRAPH 2003

Low Memory Spectral Photon Mapping

Monte Carlo Integration COS 323

Motivation: Monte Carlo Rendering. Sampling and Reconstruction of Visual Appearance. Caustics. Illumination Models. Overview of lecture.

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm

Illumination Algorithms

THE goal of rendering algorithms is to synthesize images of virtual scenes. Global illumination

Monte Carlo Integration COS 323

Ongoing Developments in Photon Mapping

Physically Realistic Ray Tracing

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

13 Distribution Ray Tracing

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

An introduction to Global Illumination. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Assignment 3: Path tracing

Improved Illumination Estimation for Photon Maps in Architectural Scenes

Philipp Slusallek Karol Myszkowski. Realistic Image Synthesis SS18 Instant Global Illumination

SOME THEORY BEHIND REAL-TIME RENDERING

Statistical Acceleration for Animated Global Illumination

Hardware Implementation

Time Dependent Photon Mapping

Monte Carlo Ray-tracing and Rendering

Surface Integrators. Digital Image Synthesis Yung-Yu Chuang 12/13/2005

Global Illumination with Glossy Surfaces

x ~ Hemispheric Lighting

To Do. Advanced Computer Graphics. Course Outline. Course Outline. Illumination Models. Diffuse Interreflection

Lecture 18: Primer on Ray Tracing Techniques

Realistic Image Synthesis

Path differentials and applications

Efficient Simulation of Light Transport in Scenes with Participating Media using Photon Maps

Global Illumination The Game of Light Transport. Jian Huang

THEA RENDER ADAPTIVE BSD ENGINE

A NEW APPROACH OF DENSITY ESTIMATION FOR GLOBAL ILLUMINATION

Variance reduction using interframe coherence for animated scenes

BRDFs. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Energy Redistribution Path Tracing

Multiple Importance Sampling for Emissive Effects

A Frequency Analysis of Light Transport

Distribution Ray Tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

CSCI 4972/6963 Advanced Computer Graphics Quiz 2 Tuesday April 17, 2007 noon-1:30pm

An Effective Stratified Sampling Scheme for Environment Maps with Median Cut Method

6. Illumination, Lighting

CS348B: Image Synthesis

Reading. 8. Distribution Ray Tracing. Required: Watt, sections 10.6,14.8. Further reading:

Rendering Equation & Monte Carlo Path Tracing I

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Today. Participating media. Participating media. Rendering Algorithms: Participating Media and. Subsurface scattering

Metropolis Light Transport

Interactive Methods in Scientific Visualization

Realistic Camera Model

Representativity for Robust and Adaptive Multiple Importance Sampling

Improved Radiance Gradient Computation

Photon Mapping. Photon Mapping. Why Map Photons? Sources. What is a Photon? Refrac=on of a Caus=c. Jan Kautz

Monte Carlo Integration of The Rendering Equation. Computer Graphics CMU /15-662, Spring 2017

Transcription:

Biased Monte Carlo Ray Tracing: Filtering, Irradiance Caching and Photon Mapping Dr. Henrik Wann Jensen Stanford University May 24, 2001

Unbiased and consistent Monte Carlo methods Unbiased estimator: E{X} =... Consistent estimator: lim E{X} N... Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 2

Unbiased and consistent: A very simple example Unbiased estimator: 1 N N i=1 f(ξ i ) Consistent estimator: 1 N + 1 N i=1 f(ξ i ) Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 3

Path tracing (unbiased) 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 4

Path tracing (unbiased) 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 5

Path tracing (unbiased) 100 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 6

How can we remove this noise?)

How can we remove this noise?) More samples (slow convergence, σ 1/ N)

How can we remove this noise?) More samples (slow convergence, σ 1/ N) Better sampling (stratified, importance, qmc etc.)

How can we remove this noise?) More samples (slow convergence, σ 1/ N) Better sampling (stratified, importance, qmc etc.) Adaptive sampling

How can we remove this noise?) More samples (slow convergence, σ 1/ N) Better sampling (stratified, importance, qmc etc.) Adaptive sampling Filtering

How can we remove this noise?) More samples (slow convergence, σ 1/ N) Better sampling (stratified, importance, qmc etc.) Adaptive sampling Filtering Caching and interpolation Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 7

Stratified sampling 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 8

Quasi Monte-Carlo (Halton sequence) 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 9

Fixed (Random) Sequence 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 10

Filtering: idea Noise is high frequency

Filtering: idea Noise is high frequency Remove high frequency content Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 11

Unfiltered image 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 12

3x3 lowpass filter 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 13

3x3 median filter 10 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 14

Energy preserving filters

Energy preserving filters Distribute noisy energy over several pixels

Energy preserving filters Distribute noisy energy over several pixels Adaptive filter width Diffusion style filters Splatting style filters Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 15

Problems with filtering Everything is filtered (blurred) Textures Highlights Caustics...

Problems with filtering Everything is filtered (blurred) Textures Highlights Caustics... Solution: Try to filter the noisy part of the illumination Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 16

Caching Techniques

Caching Techniques Irradiance caching : Compute irradiance at selected points and interpolate. Photon mapping : Density estimation and importance sampling using a precomputed flux representation. Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 17

Box: direct illlumination Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 18

Box: global illlumination Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 19

Box: indirect irradiance Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 20

Irradiance caching: idea Greg Ward, Francis Rubinstein and Robert Clear: ``A Ray Tracing Solution for Diffuse Interreflection''. Proceedings of SIGGRAPH 1988. Idea: Irradiance changes slowly interpolate. Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 21

Irradiance sampling E(x) = 2π L (x, ω ) cos θ dω

Irradiance sampling E(x) = = L (x, ω ) cos θ dω 2π 2π π/2 0 0 L (x, θ, φ) cos θ sin θ dθ dφ

Irradiance sampling E(x) = = 0 L (x, ω ) cos θ dω 2π 2π π/2 π T P θ t = sin 1 ( 0 T t=1 t ξ T ) L (x, θ, φ) cos θ sin θ dθ dφ P p=1 L (θ t, φ p ) and φ p = 2π p ψ P Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 22

Irradiance change ɛ(x) E x (x x 0) + E θ (θ θ 0) } {{ } } {{ } position rotation

Irradiance change ɛ(x) E x (x x 0) + E θ (θ θ 0) } {{ } } {{ } position rotation ( ) 4 x x 0 E 0 + 2 2N(x) π x N(x 0 ) avg } {{ } } {{ } position rotation Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 23

Irradiance interpolation w(x) = 1 ɛ(x) 1 x x 0 1 N(x) N(x 0 ) x avg + E i (x) = i w i (x)e(x i ) w i (x) i Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 24

Irradiance caching algorithm Find all irradiance samples with w(x) > q if (samples found) interpolate else compute new irradiance sample Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 25

Box: irradiance gradients 1000 sample rays, w>10 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 26

Box: irradiance cache positions 1000 sample rays, w>10 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 27

Box: irradiance gradients 1000 sample rays, w>20 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 28

Box: irradiance cache positions 1000 sample rays, w>20 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 29

Box: irradiance gradients 5000 sample rays, w>10 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 30

Box: irradiance cache positions 5000 sample rays, w>10 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 31

Photon Mapping Two-pass method: Pass 1 : Build a photon map using photon tracing Pass 2 : Render the image using the photon map Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 32

A simple test scene Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 33

Building the Photon Map: Photon Tracing Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 34

Photons Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 35

The photon map datastructure The photons are stored in a left balanced kd-tree struct photon = { float position[3]; rgbe power; char phi, theta; short flags; } // power packed as 4 bytes // incoming direction Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 36

Radiance estimate L(x, ω) = Ω f r (x, ω, ω)l (x, ω ) cos θ dω

Radiance estimate L(x, ω) = = Ω Ω f r (x, ω, ω)l (x, ω ) cos θ dω f r (x, ω, ω) dφ2 (x, ω ) dω cos θ da cos θ dω

Radiance estimate L(x, ω) = = = Ω Ω Ω f r (x, ω, ω)l (x, ω ) cos θ dω f r (x, ω, ω) dφ2 (x, ω ) dω cos θ da cos θ dω f r (x, ω, ω) dφ2 (x, ω ) da

Radiance estimate L(x, ω) = = = f r (x, ω, ω)l (x, ω ) cos θ dω Ω f r (x, ω, ω) dφ2 (x, ω ) Ω dω cos θ da cos θ dω f r (x, ω, ω) dφ2 (x, ω ) Ω da n f r (x, ω p, ω) Φ p(x, ω p) πr 2 p=1 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 37

Radiance estimate L Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 38

Reflection inside a metal ring 50000 photons / 50 photons in radiance estimate Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 39

Caustics on glossy surfaces 340000 photons / 100 photons in radiance estimate Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 40

Cognac glass Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 41

Cube caustic Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 42

Caustic from a glass sphere 10000 photons / 50 photons in radiance estimate Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 43

Caustic from a glass sphere Path tracing 1000 paths/pixel Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 44

Caustic from a glass sphere in Grace Cathedral Using lightprobe from www.debevec.org Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 45

Direct visualization of the radiance estimate 100000 photons / 50 photons in radiance estimate Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 46

Direct visualization of the radiance estimate 500000 photons / 500 photons in radiance estimate Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 47

Fast estimate 200 photons / 50 photons in radiance estimate Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 48

Only use photons for indirect irradiance 10000 photons / 500 photons in radiance estimate Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 49

Two photon maps global photon map caustics photon map Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 50

Rendering Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 51

Rendering: direct illumination Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 52

Rendering: specular reflection Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 53

Rendering: caustics Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 54

Rendering: indirect illumination Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 55

Two-pass method Radiance = direct illumination + specular reflection/transmission + caustics + soft indirect irradiance Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 56

Rendering Equation Solution L r (x, ω) = = f r (x, ω, ω)l i (x, ω ) cos θ i dω i Ω x Ω x f r (x, ω, ω)l i,l (x, ω ) cos θ i dω i + Ω x f r,s (x, ω, ω)(l i,c (x, ω ) + L i,d (x, ω )) cos θ i dω i + Ω x f r,d (x, ω, ω)l i,c (x, ω ) cos θ i dω i + Ω x f r,d (x, ω, ω)l i,d (x, ω ) cos θ i dω i. Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 57

Box 200000 global photons, 50000 caustic photons Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 58

Fractal box 200000 global photons, 50000 caustic photons Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 59

Sphereflake caustic Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 60

Little Matterhorn Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 61

Mies house (swimmingpool) Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 62

Mies house (3pm) Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 63

Mies house (6pm) Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 64

Mies house (7pm) Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 65

Participating media Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 66

Participating media: photon tracing Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 67

The volume photon map Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 68

The volume radiance estimate L ( ω )L(x, ω) = n p=1 p(x, ω p, ω) Φ p(x, ω p) 4 3 πr3 Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 69

Rendering participating media Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 70

Volume caustic Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 71

Rising smoke Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 72

Rising smoke Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 73

Subsurface scattering Skin Marble Actually most materials Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 74

Subsurface scattering Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 75

David (subsurface scattering) Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 76

David (subsurface scattering) Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 77

Diana the Huntress

Diana the Huntress

Diana the Huntress Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 78

Diana the Huntress Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 79

Diana the Huntress: no subsurface scattering Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 80

Diana the Huntress: subsurface scattering Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 81

More information http://graphics.stanford.edu/~henrik/ henrik@graphics.stanford.edu Biased Monte Carlo ray tracing: filtering, irradiance caching and photon mapping 82