path tracing computer graphics path tracing 2009 fabio pellacini 1



Similar documents
CSE168 Computer Graphics II, Rendering. Spring 2006 Matthias Zwicker

Computer Graphics Global Illumination (2): Monte-Carlo Ray Tracing and Photon Mapping. Lecture 15 Taku Komura

Path Tracing. Michael Doggett Department of Computer Science Lund university Michael Doggett

PHOTON mapping is a practical approach for computing global illumination within complex

Mathematics for Global Illumination

Monte Carlo Path Tracing

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

Advanced Computer Graphics. Rendering Equation. Matthias Teschner. Computer Science Department University of Freiburg

Monte Carlo Path Tracing

Path tracing everything. D.A. Forsyth

PATH TRACING: A NON-BIASED SOLUTION TO THE RENDERING EQUATION

CS 431/636 Advanced Rendering Techniques"

Chapter 10. Bidirectional Path Tracing

How To Improve Efficiency In Ray Tracing

Volumetric Path Tracing

Dhiren Bhatia Carnegie Mellon University

A Theoretical Framework for Physically Based Rendering

Specular reflection. Dielectrics and Distribution in Ray Tracing. Snell s Law. Ray tracing dielectrics

INTRODUCTION TO RENDERING TECHNIQUES

Path Tracing - Literature Research. Rick de Bruijne May 17, 2011

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS

The RADIANCE Lighting Simulation and Rendering System

VARIANCE REDUCTION TECHNIQUES FOR IMPLICIT MONTE CARLO SIMULATIONS

Rendering Area Sources D.A. Forsyth

Computer Animation: Art, Science and Criticism

Design, Analysis, and Optimization of LCD Backlight Unit using Ray Tracing Simulation

Path Tracing Overview

Variance reduction techniques used in BEAMnrc

Thea Omni Light. Thea Spot Light. Light setup & Optimization

Optical Design Tools for Backlight Displays

Monte Carlo Ray Tracing

Photon Mapping Made Easy

Improved predictive modeling of white LEDs with accurate luminescence simulation and practical inputs

Biasing. 7 th FLUKA Course NEA Paris, Sept.29-Oct.3, 2008

Accelerating the bidirectional path tracing algorithm using a dedicated intersection processor

IN previous chapters we assumed that all lighting interactions occurred at surfaces. In particular,

Introduction to Computer Graphics

Making Sense of the Mayhem: Machine Learning and March Madness

MCRT: L6. Initial weight of packet: W = L / N MC At each interaction multiply weight by probability of scattering: W = a W

Introduction to Discrete Probability. Terminology. Probability definition. 22c:19, section 6.x Hantao Zhang

Reflectance Characteristics of Accuflect Light Reflecting Ceramic

Deferred Shading & Screen Space Effects

Lezione 4: Grafica 3D*(II)

A Ray Tracing Solution for Diffuse Interreflection

Introduction to the Monte Carlo method

Acceleration Methods for Ray Tracing based Global Illumination

Recent Advances in Light Transport Simulation: Some Theory and a lot of Practice

Light Control and Efficacy using Light Guides and Diffusers

5. The Nature of Light. Does Light Travel Infinitely Fast? EMR Travels At Finite Speed. EMR: Electric & Magnetic Waves

Simulation Exercises to Reinforce the Foundations of Statistical Thinking in Online Classes

A Short Introduction to Computer Graphics

Geant4 Visualization. Andrea Dotti April 19th, 2015 Geant4 M&C+SNA+MC 2015

REAL-TIME IMAGE BASED LIGHTING FOR OUTDOOR AUGMENTED REALITY UNDER DYNAMICALLY CHANGING ILLUMINATION CONDITIONS

The Basics of Scanning Electron Microscopy

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

Comp 410/510. Computer Graphics Spring Introduction to Graphics Systems

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

Electron Microscopy 3. SEM. Image formation, detection, resolution, signal to noise ratio, interaction volume, contrasts

Mathematics on the Soccer Field

CHAPTER 9: IMPORTANCE SAMPLING IN MCNP

Data Visualization Study at Earth Simulator Center

ADVANCED THEORIES FOR CG LIGHTING

Let s consider a homogeneous medium characterized by the extinction coefficient β ext, single scattering albedo ω 0 and phase function P(µ, µ').

Efficient Implementation of Bi-directional Path Tracer on GPU

So, you want to make a photo-realistic rendering of the Earth from orbit, eh? And you want it to look just like what astronauts see from the shuttle

ATM S 111, Global Warming: Understanding the Forecast

Contrast ratio what does it really mean? Introduction...1 High contrast vs. low contrast...2 Dynamic contrast ratio...4 Conclusion...

Hi everyone, my name is Michał Iwanicki. I m an engine programmer at Naughty Dog and this talk is entitled: Lighting technology of The Last of Us,

Illuminating With HDRI

Project 2B Building a Solar Cell (2): Solar Cell Performance

Name Class Date. spectrum. White is not a color, but is a combination of all colors. Black is not a color; it is the absence of all light.

Deployment of express checkout lines at supermarkets

GRAFICA - A COMPUTER GRAPHICS TEACHING ASSISTANT. Andreas Savva, George Ioannou, Vasso Stylianou, and George Portides, University of Nicosia Cyprus

Implementing the combing method in the dynamic Monte Carlo. Fedde Kuilman PNR_131_2012_008

A Markov Chain Analysis of Blackjack Strategy

Doppler. Doppler. Doppler shift. Doppler Frequency. Doppler shift. Doppler shift. Chapter 19

Monte Carlo Simulation for Solid Angle Calculations in Alpha Particle Spectrometry

Monte Carlo Sampling Methods

Advanced variance reduction techniques applied to Monte Carlo simulation of linacs

Chapter 4 Variance Reduction Techniques

Model-based Synthesis. Tony O Hagan

Introduction to Logistic Regression

Cathode Ray Tube. Introduction. Functional principle

4.430 Daylighting. Christoph Reinhart Daylight Simulations

DYNAMIC RANGE IMPROVEMENT THROUGH MULTIPLE EXPOSURES. Mark A. Robertson, Sean Borman, and Robert L. Stevenson

Approval Sheet. Interactive Illumination Using Large Sets of Point Lights

How Landsat Images are Made

Amajor benefit of Monte-Carlo schedule analysis is to

Pyramid Tracing vs. Ray Tracing for the simulation of sound propagation in large rooms. Abstract 1. Introduction to the two algorithms

Calculation of Source-detector Solid Angle, Using Monte Carlo Method, for Radioactive Sources with Various Geometries and Cylindrical Detector

STOCHASTIC MODELLING OF WATER DEMAND USING A SHORT-TERM PATTERN-BASED FORECASTING APPROACH

Fast Monte Carlo CVA using Exposure Sampling Method

ABS 731 Lighting Design & Technology. Spring 2006

Choosing the Right Illumination Design Software

Chemistry 102 Summary June 24 th. Properties of Light

Practical Calculation of Expected and Unexpected Losses in Operational Risk by Simulation Methods

Pricing complex options using a simple Monte Carlo Simulation

Transcription:

path tracing computer graphics path tracing 2009 fabio pellacini 1

path tracing Monte Carlo algorithm for solving the rendering equation computer graphics path tracing 2009 fabio pellacini 2

solving rendering equation advantages predictive simulation can be used for architecture, engineering, photorealistic if simulation if correct, images will look real disadvantages (really) slow simulation of physics is computationally very expensive need accurate geometry, materials and lights otherwise just a correct solution to the wrong problem computer graphics path tracing 2009 fabio pellacini 3

rendering equation x x [Bala] computer graphics path tracing 2009 fabio pellacini 4

basic path tracing need to evaluate radiance at x in direction Θ determine visible point look up emission [Bala] computer graphics path tracing 2009 fabio pellacini 5

basic path tracing need to evaluate use Monte Carlo estimation computer graphics path tracing 2009 fabio pellacini 6

basic path tracing generate random direction Ψ i with p(ψ i ) evaluate BRDF evaluate cosine evaluate [Bala] computer graphics path tracing 2009 fabio pellacini 7

basic path tracing need to evaluate determine visible point from x in direction Ψ i in vacuum [Bala] computer graphics path tracing 2009 fabio pellacini 8

basic path tracing need to evaluate recursively execute procedure [Bala] computer graphics path tracing 2009 fabio pellacini 9

russian roulette when to stop recursion? light bounce infinitely in the environment but every bounce has less energy in many cases 3-4 bounces are enough [Bala] computer graphics path tracing 2009 fabio pellacini 10

russian roulette stop after k bounces introduces bias (consistent error) in the solution need to make k large to capture all cases Monte Carlo strategy (Russian Roulette) as stopping criterion pick a probability with which to stop the path at each intersection, test the path correct the radiance estimator accordingly computer graphics path tracing 2009 fabio pellacini 11

russian roulette [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 12

russian roulette computer graphics path tracing 2009 fabio pellacini 13

russian roulette if f is a recursive integral, only continue with probability but weight back the radiance example: path tracing with only 1 chance in 10 the ray will continue estimate radiance of the ray multiplies by 10 intuition: instead of shooting 10 rays, shoot 1 but weight its contribution 10 times computer graphics path tracing 2009 fabio pellacini 14

russian roulette how to choose the probability? small fixed value: longer paths slow but accurate big fixed value: shorter paths fast but inaccurate proportional to integral of reflected light adapts to material properties darker patches will statistically shorten paths exactly like in physics computer graphics path tracing 2009 fabio pellacini 15

basic path tracing pseudocode computeimage() foreach pixel (i,j) estimatedradiance[i,j] = 0 for s = 1 to #viewsamples generate Q in pixel (i,j) theta = (Q E)/ Q-E x = trace(e,theta) estimatedradiance [i,j] += computeradiance(x,-theta) estimatedradiance [i,j] /= #viewsamples [Dutré, Bekaert, Bala] computeradiance(x, theta) estimatedradiance = basicpt(x, theta) return estimatedradiance computer graphics path tracing 2009 fabio pellacini 16

basic path tracing pseudocode basicpt(x, theta) estimatedradiance = Le(x, theta) if(not absorbed) // russian roulette for s = 1 to #radiancesamples psi = generate random dir on hemisphere y = trace(x, psi) estimatedradiance += basicpt(y,-psi) * BRDF(x,psi,theta) * cos(nx,psi) / pdf(psi) estimatedradiance /= #paths return estradiance/(1-absorption) [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 17

basic path tracing intuition [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 18

basic path tracing intuition [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 19

basic path tracing performance 1 sample 16 samples 256 samples [Bala] computer graphics path tracing 2009 fabio pellacini 20

monte carlo vs. deterministic integration Monte Carlo Deterministic [Bala] computer graphics path tracing 2009 fabio pellacini 21

next event estimation in basic path tracing if path does not hit a light, its radiance is 0 unlikely to hit a light by randomly picking dirs. next event estimation want to directly sample light sources by splitting direct and indirect illumination estimation two separate Monte Carlo processes by using area formulation for direct illumination by using hemispherical formulation for indirect computer graphics path tracing 2009 fabio pellacini 22

direct and indirect illum. formulation x x [Bala] computer graphics path tracing 2009 fabio pellacini 23

direct and indirect illum. formulation [Bala] computer graphics path tracing 2009 fabio pellacini 24

direct and indirect illum. formulation computer graphics path tracing 2009 fabio pellacini 25

direct illum. hemisphere sampling [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 26

direct illum. area sampling [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 27

indirect illum. hemisphere sampling discard Le if ray hits light [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 28

indirect illum. recursive evaluation [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 29

next event estimation performance without with [Bala] 16 samples computer graphics path tracing 2009 fabio pellacini 30

next event estimation performance 1 sample 4 samples [Bala] 16 samples 256 samples computer graphics path tracing 2009 fabio pellacini 31

direct illumination one light depends on emitted radiance distribution Le how to pick points y on the light how many points to use number of shadow rays computer graphics path tracing 2009 fabio pellacini 32

direct illumination one light each light type has its own physical models angular distribution defines different light types flood, fill, spot, ect simplest model: emitted radiance is a constant computer graphics path tracing 2009 fabio pellacini 33

direct illumination one light uniform sampling of light area simply sample that [0,1] square and rescale works fairly well in practice slightly better techniques exists tough computer graphics path tracing 2009 fabio pellacini 34

direct illumination many lights [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 35

direct illumination many lights how to allocate samples between different lights various techniques, some quite advanced computer graphics path tracing 2009 fabio pellacini 36

direct illumination many lights split samples uniformly between lights same as M light integrals with previous sampling simple but inefficient would like to weight more brighter lights won t cover in this class computer graphics path tracing 2009 fabio pellacini 37

indirect illumination depends on how to sample the hemisphere uniform distribution importance sampling: pick p to match integral cosine distribution BRDF distribution BRDF*cosine distribution computer graphics path tracing 2009 fabio pellacini 38

indirect illumination uniform dist. [Bala] computer graphics path tracing 2009 fabio pellacini 39

indirect illumination cosine dist. [Bala] computer graphics path tracing 2009 fabio pellacini 40

indirect illumination BRDF Dist. [Bala] computer graphics path tracing 2009 fabio pellacini 41

indirect illumination BRDF*Cosine Dist. [Bala] computer graphics path tracing 2009 fabio pellacini 42

importance sampling performance without with [Bala] computer graphics path tracing 2009 fabio pellacini 43

pt pseudocode pixel sampling computeimage() foreach pixel (i,j) estimatedradiance[i,j] = 0 for s = 1 to #viewsamples generate Q in pixel (i,j) theta = (Q E)/ Q-E x = trace(e,theta) estimatedradiance [i,j] += computeradiance(x,-theta) estimatedradiance [i,j] /= #viewsamples [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 44

pt pseudocode radiance estimation computeradiance(x,theta) estimatedradiance = Le(x,theta) estimatedradiance += directillumination(x, theta) estimatedradiance += indirectillumination(x, theta) return estimatedradiance [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 45

pt pseudocode direct illumination directillumination(x,theta) estimatedradiance = 0 for s = 1 to #shadowrays k = pick random light y = generate random point on light k psi = (x-y) / x-y estimatedradiance += Le_k(y,-psi) * BRDF(x,psi,tetha) * G(x,y) * V(x,y) / (p(k)*p(y k)) estimateradiance /= #shadowrays return estimatedradiance [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 46

pt pseudocode direct illumination UL directillumination(x,theta) estimatedradiance = 0 for k = 1 to #lights for s = 1 to #shadowrays / #lights y = generate random point on light k psi = (x-y) / x-y estimatedradiance += Le_k(y,-psi) * BRDF(x,psi,tetha) * G(x,y) * V(x,y) / p(y) estimateradiance /= #shadowrays return estimatedradiance [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 47

pt pseudocode indirect illumination indirectillumination(x,theta) estimatedradiance = 0 if(not absorbed) // russian roulette for s = 1 to #indirectsamples psi = generate random dir on hemisphere y = trace(x, psi) estimatedradiance += computeradiance(y,-psi) * BRDF(x,psi,theta) * cos(nx,psi) / pdf(psi) estimatedradiance /= #indirectsamples return estimatedradiance /(1-absorption) [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 48

beyond path tracing bidirectional techniues computer graphics path tracing 2009 fabio pellacini 49

path tracing perfectly accurate, but slow to converge noise remains in the image for a long time intuition: is there are bright reflections, we cannot sample them directly halogen lamps idea: shoot paths from the eye and from the light eye paths: work well for reflections light paths: pick up secondary sources in reality very complex computer graphics path tracing 2009 fabio pellacini 50

bidirectional path tracing [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 51

bidirectional path tracing [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 52

photon mapping [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 53

photon mapping [Dutré, Bekaert, Bala] computer graphics path tracing 2009 fabio pellacini 54