SOME THEORY BEHIND REAL-TIME RENDERING

Similar documents
The Rendering Equation and Path Tracing

Choosing the Right Algorithm & Guiding

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

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

Global Illumination. COMP 575/770 Spring 2013

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

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

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

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Lecture 7 - Path Tracing

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

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

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

COMBINING VOLUMETRIC ESTIMATORS

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

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

Assignment 3: Path tracing

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

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

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

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

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

Realistic Image Synthesis

Shading and Illumination

Overview. Radiometry and Photometry. Foundations of Computer Graphics (Spring 2012)

Lecture 12: Photon Mapping. Biased Methods

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

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

6. Illumination, Lighting

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

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

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

rendering equation camera all

Recent Advances in Monte Carlo Offline Rendering

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

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

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

Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008)

Illumination Algorithms

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

The Rendering Equation Philip Dutré. Course 4. State of the Art in Monte Carlo Global Illumination Sunday, Full Day, 8:30 am - 5:30 pm

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons

Lecture 7: Monte Carlo Rendering. MC Advantages

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

Photon Mapping. Michael Doggett Department of Computer Science Lund university

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

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

The Rendering Equation. Computer Graphics CMU /15-662

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

Stochastic Path Tracing and Image-based lighting

Monte Carlo Path Tracing. The Rendering Equation

Efficient Caustic Rendering with Lightweight Photon Mapping

Bi-Directional Polarised Light Transport

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

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

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

In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple

- Volume Rendering -

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

Radiometry and reflectance

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

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

Biased Monte Carlo Ray Tracing

- Volume Rendering -

Photon Mapping. Kadi Bouatouch IRISA

Lighting - the Radiance Equation

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

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

Computer graphics III Path tracing. Jaroslav Křivánek, MFF UK

Global Illumination and the Rendering Equation

CSE 681 Illumination and Phong Shading

13 Distribution Ray Tracing

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

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

INTERACTIVE GLOBAL ILLUMINATION WITH VIRTUAL LIGHT SOURCES

Metropolis Light Transport

Global Illumination and Monte Carlo

Global Illumination The Game of Light Transport. Jian Huang

Multiple Importance Sampling for Emissive Effects

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

Biased Monte Carlo Ray Tracing:

The Rendering Equation & Monte Carlo Ray Tracing

Photometric Stereo.

Introduction to Radiosity

BRDF Computer Graphics (Spring 2008)

TDA361/DIT220 Computer Graphics, January 15 th 2016

Precomputed Radiance Transfer: Theory and Practice

Parallel Monte Carlo Approach for Integration of the Rendering Equation

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Lighting and Materials

Reflection models and radiometry Advanced Graphics

Outline of Lecture. Real-Time High Quality Rendering. Geometry or Vertex Pipeline. Basic Hardware Pipeline. Pixel or Fragment Pipeline

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

Mixing Monte Carlo and Progressive Rendering for Improved Global Illumination

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Chapter 7 - Light, Materials, Appearance

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Transcription:

SOME THEORY BEHIND REAL-TIME RENDERING Jaroslav Křivánek Charles University in Prague

Off-line realistic rendering (not yet in rea-time)

Ray tracing 3

4

Image created by Bertrand Benoit Rendered in Corona Renderer 5

Image created by Jeff Patton Rendered in Corona Renderer 6

ŠKODA Rapid Catalogue 7

8

Image created by Weta Digital 20 th Century Fox 9

Image created by Weta Digital 20 th Century Fox 10

vimeo >> The Great Gatsby 11 VFX

vimeo >> The Great Gatsby 12 VFX

Global illumination

Global illumination Color bleeding Image credit: Michael Bunnell 14 14

Global illumination Caustics 15

Global illumination in games 16

Basic light transport theory

Image generation Pixel value = average radiance reflected from surfaces visible through the pixel Generating an image involves (some sort of) light transport simulation Radiance L (x, ω) 18 18

Radiance Radiometric quantity measuring amount of light energy along a ray Denoted L (x, ω) x position ω direction ω Units [W / m 2 sr ] Essential properties of radiance Proportional to perceived brightness xxxxx Constant along a ray xxxxxx x 19

Light reflection x 20 20

Light reflection BRDF Bi-directional Reflectance Distribution Function Obr. Wojciech Matusik 21 21

BRDF Formal definition Bidirectional Reflectance Distribution Function outgoing n L i (ω i ) L r (ω o ) dω i reflected θ o θ i incoming f r ( ω ω ) i o = L i dlr ( ωo) ( ω ) cosθ dω i i i [sr 1 ] 22

Surface appearance and the BRDF Appearance BRDF lobe (for four different viewing directions) Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/ 23

Surface appearance and the BRDF Appearance BRDF lobe (for four different viewing directions) Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/ 24

Surface appearance and the BRDF Appearance BRDF lobe (for four different viewing directions) Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/ 25

Surface appearance and the BRDF Appearance BRDF lobe (for four different viewing directions) Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/ 26

Reflection equation Total reflected radiance: integrate contributions of incident radiance, weighted by the BRDF, over the hemisphere L r ( x, ω ) o = L H ( x) i ( x, ω ) i f r ( x, ω ω ) cosθ dω i o i i upper hemisphere over x n L i (x, ω i ) L r (x, ω o ) θ o θ i dω i CG III (NPGR010) - J. Křivánek 2015

But where does the incident radiance come from? Other surfaces in the scene! Rendering Equation x L(r(x,ω i ), ω i ) 28 ω i ω o L i (x,ω i ) 28 + = ) ( i i o i i i o o e o o d cos ), ( ) ),, (r( ), ( ), ( x x x x x H f r L L L ω θ ω ω ω ω ω ω

Recursive calculation of rendering equation To calculate L(x, ω o ) I need to calculate L(r(x, ω ), ω ) for all directions ω around the point x. For the calculation of each L(r(x, ω ), ω ) I need to do the same thing recursively At each step, apply Monte Carlo integration to sample the hemisphere etc. r( r(x,ω ), ω ) ω o x ω ω r(x, ω ) 29

Monte Carlo integration General approach to numerical evaluation of integrals f(x) Integral: Monte Carlo estimate of I: p(x) x 1 0 x 5 x 3 x 4 x 2 x 6 1 Correct on average : 30

Slide credit: Iwan Kawrakov 31

Rendering equation Operator form L = L e + T L L = L e + T L L: Equilibrium radiance L e : Emitted radiance T: Transport & scattering operator 32

Progressive approximation Each application of T corresponds to one step of reflection & light propagation L + TL + 2 + 3 + e e e e = L T L T L... emission direct illumination OpenGL shading one-bounce indirect illumination two-bounce indirect illumination 33

Progressive approximation L e T L e T T Le T T T Le L e L + 2 3 e T L e L e + TLe + T L L e e +... +T Le 34

Idea: Distributed ray tracing (Cook 84) 35

Path tracing 36

Path tracing, Naive getli (x, ω): y = traceray(x, ω) return Le(y, ω) + Lr (y, ω) // emitted radiance // reflected radiance Lr(y, ω): ω = genuniformrandomdir( n(y) ) return getli (y, ω ) * brdf(y, ω, ω ) * dot(ω, n(y)) * 2π 37

Path tracing, Naive getli (x, ω): y = traceray(x, ω) return Le(y, ω) + Lr (y, ω) // emitted radiance // reflected radiance Lr(y, ω): ω = genuniformrandomdir( n(y) ) return getli (y, ω ) * brdf(y, ω, ω ) * dot(ω, n(y)) * 2π 38

Practical formulas for light transport P. Dutré: Global Illumination Compendium, http://people.cs.kuleuven.be/~philip.dutre/gi/ 39

ROBUST GI CALCULATION

Path sampling techniques Path tracing Light tracing Bidirectional path tracing 41

All possible bidirectional techniques vertex on a light sub-path vertex on en eye subpath 42

All possible bidirectional techniques vertex on a light sub-path vertex on en eye subpath no single techniques importance samples all the terms VPLs 43

Bidirectional path tracing Use all of the above sampling techniques Combine using Multiple Importance Sampling 44

BPT Implementation 45

Results Images: Eric Veach BPT, 25 samples per pixel PT, 56 samples per pixel 46

Insufficient path sampling techniques Reference solution Bidirectional path tracing 47

Insufficient path sampling techniques In BPT, Specular-Diffuse-Specular paths sampled with zero (or very small) probability specular S diffuse D 48

PHOTON MAPPING (DENSITY ESTIMATION)

Photon mapping (Density estimation) 1. Many fwd walks + store collisions ( photon map ) 2. Radiance estimate: (Kernel) density estimation 50

Photon mapping 1. Photon tracing Photon emission Particle tracing Storage in the photon map 2. Rendering with photon map Like path tracing Photon map query instead of recursion 51

Photon mapping SDS paths H.W.Jensen Wojciech Jarosz 52

Our work: Vertex Connection and Merging BPT + PM combination

54 Bidirectional path tracing (30 min)

55 Photon mapping (Density estimation) (30 min)

56 Vertex connection and merging (30 min)

THANK YOU! Questions? [cgg.mff.cuni.cz/~jaroslav]