Choosing the Right Algorithm & Guiding

Similar documents
Realistic Image Synthesis

Mixing Monte Carlo and Progressive Rendering for Improved Global Illumination

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

rendering equation camera all

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

Efficient Caustic Rendering with Lightweight Photon Mapping

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

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

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

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

Lecture 12: Photon Mapping. Biased Methods

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

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

In this part, I will mostly talk about the vertex merging technique (a.k.a. kernel estimation).

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

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

SOME THEORY BEHIND REAL-TIME RENDERING

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

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

Global Illumination. COMP 575/770 Spring 2013

The Rendering Equation. Computer Graphics CMU /15-662

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

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

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

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

Monte Carlo Path Tracing. The Rendering Equation

Photon Mapping. Michael Doggett Department of Computer Science Lund university

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

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

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

Biased Monte Carlo Ray Tracing

Assignment 3: Path tracing

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

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

Metropolis Light Transport

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

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

Lecture 7 - Path Tracing

A Comparison of Global Illumination Methods Using Perceptual Quality Metrics

The Rendering Equation and Path Tracing

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

Lecture 7: Monte Carlo Rendering. MC Advantages

COMBINING VOLUMETRIC ESTIMATORS

Stochastic Progressive Photon Mapping

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

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

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

Biased Monte Carlo Ray Tracing:

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

Bidirectional Path Tracing

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

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

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

Illumination Algorithms

The Rendering Equation & Monte Carlo Ray Tracing

A Survey of Radiosity and Ray-tracing. Methods in Global Illumination

Recent Advances in Monte Carlo Offline Rendering

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

Implementation of Bidirectional Ray Tracing Algorithm

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

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

Introduction to Photon Mapping RADIANCE Workshop 2010 Course Advanced Fenestration

Lighting and Shading

Photon Mapping. Kadi Bouatouch IRISA

In this part of the course, I will discuss various approaches for generating VPLs where they are most needed for a given camera view.

Progressive photon mapping can be interpreted as an estimator that constructs the full paths from camera to light by constantly connecting two fresh

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

Representativity for Robust and Adaptive Multiple Importance Sampling

Variance Reduction. Computer Graphics CMU /15-662, Fall 2016

RND102 - Intro to Path Tracing & RIS in RenderMan

Global Illumination and Monte Carlo

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Progressive Photon Mapping: A Probabilistic Approach

Stochastic Path Tracing and Image-based lighting

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

I present Adjoint-Driven Russian Roulette and Splitting for efficient light transport simulation which is a part of my PhD.

Global Illumination The Game of Light Transport. Jian Huang

Energy Redistribution Path Tracing

Global Illumination using Photon Maps

Physically Realistic Ray Tracing

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

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

Realistic Image Synthesis

Project 3 Path Tracing

Monte Carlo Path Tracing

Scalable many-light methods

13 Distribution Ray Tracing

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

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

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

Numerical Integration

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

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

Participating Media. Part I: participating media in general. Oskar Elek MFF UK Prague

Low Memory Spectral Photon Mapping

Paths, diffuse interreflections, caching and radiometry. D.A. Forsyth

Optimal Strategy for Connecting Light Paths in Bidirectional Methods for Global Illumination Computation

Unifying Points, Beams, and Paths in Volumetric Light Transport Simulation

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

Transcription:

Choosing the Right Algorithm & Guiding PHILIPP SLUSALLEK & PASCAL GRITTMANN

Topics for Today What does an implementation of a high-performance renderer look like? Review of algorithms which to choose for production rendering? Path guiding how path tracers can handle complex illumination Brief look at our current research goal: How to adapt VCM to input scenes?

Choosing the Right Rendering Algorithm REVIEW AND COMPARISON OF THE ALGORITHMS DISCUSSED SO FAR

Path Tracing Kajiya 1986 Straightforward Monte Carlo integration of the Rendering Equation Shoot rays from the eye into the scene Sample incoming direction at hit points Shoot secondary ray Optimization: next event estimation L o x, ω 0 = L e x, ω 0 + H(x) L i x, ω i f r ( ω i, x, ω o ) cosθ i dω i Light Transport Equation

Path Tracing properties + Simple to implement + Efficient at direct illumination Inefficient at caustics Inefficient at indirect illumination

Path Tracing difficult cases

Light Tracing Dutré et al 1993 Reverse of Path Tracing Path Tracing: Shoot importance into the scene, gather radiance Light Tracing: Shoot particles into the scene, gather importance Next Event Estimation: Only way to get contribution for camera with no actual surface W o x, ω 0 = W e x, ω 0 + H(x) W i x, ω i f r ( ω i, x, ω o ) cosθ i dω i Importance Transport Equation

Light Tracing is efficient at rendering indirect illumination PATH TRACING LIGHT TRACING

Light Tracing is efficient at rendering caustics PATH TRACING LIGHT TRACING

Light Tracing properties + (reasonably) good at indirect illumination + efficient at rendering directly visible caustics - In non-trivial scenes: Wastes A LOT of samples in regions of the scene that do not contribute at all! (The solutions to this are either Metropolis or Guiding). 10

Bidirectional Path Tracing (BPT): Veach & Guibas 94, Lafortune & Willems 93 Combines Light Tracing and Path Tracing Connect eye and light paths Combine contributions with MIS: 1. Direct Illumination 2. Randomly hitting light 3. Connecting to the eye 4. Connecting eye and light paths 11

Multiple Importance Sampling (MIS) Veach and Guibas 1995 Combine samples from different techniques Use weighting to select sample with lower variance n 1 n σ i=1 σ i f X i,j n i j=1 wi X i,j p i (X i,j ) Power heuristic: w i = n ip i β σ k n k p k β = 1 Balance heuristic: w i = 1 1+σ k i n k p k n i p i 1+σ k i n k p k β n i p i β p 1 (x) f(x) p 2 (x) 12

Balance Heuristic Weights Without loss of generality, we focus on balance heuristic weights. Assume we sampled a path like the one on the right What other techniques can sample this path? What are the pdfs for these techniques? What is the weight of our current sample? x 0 x 1 x 2 y 0 y 2 y 1 13

Techniques on the light sub-path current technique (actually sampled) x 0 x 2 y 0 x 0 x 2 y 0 y 1 y 1 x 0 x 2 y 0 y 1 x 1 y 2 x 1 y 2 x 1 y 2 x 0 x 2 y 0 y 1 x 1 y 2 14

Light sub-path PDFs current technique For simplicity, and without loss of generality, we ignore the number of samples from each technique The PDF of the current technique is the product of: p cam x 0 x 1 p brdf x 0 x 1 x 2 p light y 0 y 1 p brdf (y 0 y 1 y 2 ) x 0 x 2 y 0 y 1 p conn x 2, y 2 x 1 y 2 15

Light sub-path PDFs connection instead of the last bounce p cam x 0 x 1 p brdf x 0 x 1 x 2 p brdf (x 1 x 2 y 2 ) p light y 0 y 1 p conn y 2, y 1 x 0 x 2 y 0 y 1 x 1 y 2 16

Light sub-path PDFs Next Event Estimation p cam x 0 x 1 p brdf x 0 x 1 x 2 p brdf x 1 x 2 y 2 p brdf (x 2 y 2 y 1 ) p conn y 0, y 1 x 0 x 2 y 0 y 1 x 1 y 2 17

Light sub-path PDFs Unidirectional Path Tracing p cam x 0 x 1 p brdf x 0 x 1 x 2 p brdf x 1 x 2 y 2 p brdf x 2 y 2 y 1 p brdf y 2 y 1 y 0 x 0 x 2 y 0 y 1 x 1 y 2 18

Combined MIS Denominator 1 + p cam x 0 x 1 p brdf x 0 x 1 x 2 p brdf x 1 x 2 y 2 p light y 0 y 1 p conn y 2,y 1 p cam x 0 x 1 p brdf x 0 x 1 x 2 p light y 0 y 1 p brdf y 0 y 1 y 2 p conn x 2,y 2 + p cam x 0 x 1 p brdf x 0 x 1 x 2 p brdf x 1 x 2 y 2 p brdf x 2 y 2 y 1 p conn y 0,y 1 p cam x 0 x 1 p brdf x 0 x 1 x 2 p light y 0 y 1 p brdf y 0 y 1 y 2 p conn x 2,y 2 + p cam x 0 x 1 p brdf x 0 x 1 x 2 p brdf x 1 x 2 y 2 p brdf x 2 y 2 y 1 p brdf y 2 y 1 y 0 p cam x 0 x 1 p brdf x 0 x 1 x 2 p light y 0 y 1 p brdf y 0 y 1 y 2 p conn x 2,y 2 + weight of techniques happening on the camera sub-path Nothing happening on the camera sub-path matters for the techniques on the light sub-path! (Except for the last vertex) 19

Combined MIS Denominator 1 + camera techniques + + p brdf x 1 x 2 y 2 p brdf y 0 y 1 y 2 connection instead last bounce x 0 x 2 y 0 + p brdf x 1 x 2 y 2 p brdf x 2 y 2 y 1 p light y 0 y 1 p brdf y 0 y 1 y 2 next event y 1 + p brdf x 1 x 2 y 2 p brdf x 2 y 2 y 1 p brdf y 2 y 1 y 0 p light y 0 y 1 p brdf y 0 y 1 y 2 hitting the light x 1 y 2 p conn is (usually) one 20

Incremental Update Scheme Weights for techniques in one sub-path (here the light) Stored in two float values: current partial sum, inverse pdf of last bounce Initially: p last = 1 p light w partial = 0 Whenever sampling a ray from y j to y j+1 : w partial = w partial p brdf y j y j 1 p brdf (y j y j+1 ) + p last p brdf y j y j+1 updates previous techniques connection instead of this bounce p last = 1 p brdf y j y j+1 21

Pseudocode All pdfs have to be w.r.t area measure! // At every bounce: partial *= bsdf_pdf_reverse; partial += 1.0f / last_bsdf_pdf partial *= cos_out / bsdf_pdf; // At every hit: finish converting solid angle -> area last_bsdf_pdf *= cos_in / dist_sqr; partial /= cos_in // For prev. connections: sampling in other direction // weight for connecting instead of the last bounce // pdf to continue in current direction // (solid angle -> area) To compute the weight: add partials from each sub-path, modify to account for current technique There are some special cases (Next Event Estimation, hitting light source, ) 22

BPT combines the benefits from Path Tracing and Light Tracing 23

Difficult specular-diffuse-specular (SDS) paths Cannot be captured by light tracing with pinhole camera Path tracing can handle them (poorly) if only area lights are used deterministic sampled Specular (Water, Glass,...) Diffuse hard to sample (in both directions)!

Difficult specular-diffuse-specular (SDS) paths 25

BPT properties + Better per-sample convergence rate than either PT or LT on its own - Also suffers from the issue of light paths in regions that are not relevant - Only technique for SDS paths: PT - More time for one pixel sample than only PT Performs worse than PT for SDS paths! 26

Photon Mapping Trace particle path from the light Store vertices Density Estimation Find vertices within a range, merge them (biased) Especially good at handling SDS paths Progressive Photon Mapping [Hachisuka et al 2008] reduces radius with every iteration makes algorithm consistent 27

Captures SDS paths through efficient path reuse! Prob. that photon falls into circle prob. to hit the light with path tracing But: every photon can be used by a lot of camera paths! deterministic sampled Specular (Water, Glass,...) Diffuse 28

Progressive PM captures SDS paths, but high variance on diffuse surfaces Structural Similarity (SSIM) BPT PPM BPT PPM 29

Photon Mapping properties + Very efficient for SDS paths - Performs poorly on glossy surfaces - Biased (but consistent, if progressive) - Photon density might be too low if many photons end up in non-visible regions! 30

Vertex Connection and Merging (VCM) [Georgiev et al 2012] also [Hachisuka et al 2012] Combine BPT with PPM using MIS 31

MIS weights for VCM Idea: Merging can be considered as using Russian Roulette and connect to the previous vertex. With a given merge radius r we can compute the Russian Roulette PDF: p acc = πr 2 When computing the MIS weights, we have to also consider merging at every vertex In our partial update scheme, this amounts to adding p acc to the partial sum at every bounce 32

Results after 30 seconds PT: no / noisy caustics BPT: only directly visible caustics VCM: all caustics, but still visible bias from the photon map 33

16000 RMSE over time in the Still Life scene 14000 12000 10000 8000 6000 1.8 FPS 4000 2000 0.5 FPS 0 0 50 100 150 200 250 300 350 pt bpt ppm vcm 34

Which Algorithm to Use in Practice? VCM is robust handles most types of scenes well BUT Memory Requirements Requires storing all light path vertices (millions) each at least 64 bytes -> do not fit in the cache anymore! Many light vertices are not even useful for the scene! Complexity Combines multiple sampling techniques, much more complicated than a path tracer Difficult to implement efficiently, esp. in parallel 35

What did Common Production Renderers Choose? Many pure path tracers, e.g. Cycles, Arnold, Disney Hyperion Some offer VCM (or variations thereof) in addition to path tracing, Meant to be used only for scenes with caustics e.g. Pixar RenderMan Some combine path tracing and light tracing, Allows directly visible caustics at little extra cost e.g. NVIDIA IRay 36