Practical Product Importance Sampling for Direct Illumination

Similar documents
Importance Sampling Spherical Harmonics

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

Scalable many-light methods

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?

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

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 and Path Tracing

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

Fast, Realistic Lighting and Material Design using Nonlinear Cut Approximation

Towards Interactive Global Illumination Effects via Sequential Monte Carlo Adaptation. Carson Brownlee Peter S. Shirley Steven G.

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

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

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

LightSlice: Matrix Slice Sampling for the Many-Lights Problem

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

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

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Global Illumination and Monte Carlo

Global Illumination The Game of Light Transport. Jian Huang

Interactive Methods in Scientific Visualization

Shading 1: basics Christian Miller CS Fall 2011

Lightcuts: A Scalable Approach to Illumination

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

The Rendering Equation. Computer Graphics CMU /15-662

Precomputed Radiance Transfer: Theory and Practice

Importance Sampling of Area Lights in Participating Media

Lecture 7 - Path Tracing

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Motivation. My General Philosophy. Assumptions. Advanced Computer Graphics (Spring 2013) Precomputation-Based Relighting

Choosing the Right Algorithm & Guiding

Stochastic Path Tracing and Image-based lighting

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

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

Spherical Harmonic Lighting: The Gritty Details Robin Green

Ambien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary

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

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

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

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

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

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

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

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

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you

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

Voxel-Based Global-Illumination

Bidirectional Lightcuts

Computer Graphics. Sampling Theory & Anti-Aliasing. Philipp Slusallek

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

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

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

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

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

Monte Carlo Integration

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Lecture 7: Monte Carlo Rendering. MC Advantages

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

BioTechnology. An Indian Journal FULL PAPER. Trade Science Inc. A wavelet based real-time rendering technology for indoor mixed reality ABSTRACT

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

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

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

Lighting affects appearance

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

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Irradiance Gradients. Media & Occlusions

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017

BRDF Computer Graphics (Spring 2008)

Recent Advances in Monte Carlo Offline Rendering

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Sampling, Aliasing, & Mipmaps

SOME THEORY BEHIND REAL-TIME RENDERING

Photon Mapping. Kadi Bouatouch IRISA

Glossy Reflection. Objectives Modeling

Anti-aliasing and Monte Carlo Path Tracing

Assignment 3: Path tracing

Volume Illumination. Visualisation Lecture 11. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

We present a method to accelerate global illumination computation in pre-rendered animations

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

Advanced d Computer Graphics CS 563: Real Time Ocean Rendering

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

Photon Mapping. Michael Doggett Department of Computer Science Lund university

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

Volume Illumination & Vector Field Visualisation

Interactive Volumetric Shadows in Participating Media with Single-Scattering

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Real-Time Realism will require...

Sequential Monte Carlo Adaptation in Low-Anisotropy Participating Media. Vincent Pegoraro Ingo Wald Steven G. Parker

Precomputed & Hybrid Variants of Lightcuts

13 Distribution Ray Tracing

Monte Carlo Integration

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

GLOBAL ILLUMINATION IN UNITY 5

Queen s University CISC 454 Final Exam. April 19, :00pm Duration: 3 hours. One two sided aid sheet allowed. Initial of Family Name:

Exploiting Local Orientation Similarity for Efficient Ray Traversal of Hair and Fur

Path Tracing. Mikael Persson mpersson December 3, 2001

Introduction to Photon Mapping RADIANCE Workshop 2010 Course Advanced Fenestration

Transcription:

Eurographics 2008 Practical Product Importance Sampling for Direct Illumination Petrik Clarberg Tomas Akenine-Möller Lund University Sweden This work was presented by Petrik Clarberg at Eurographics 2008 in Crete, on April 18, 2008. Comments have been added afterwards. Please send any questions to: petrik@cs.lth.se. 1

Motivation Monte Carlo ray tracing of direct illumination Environment map (and/or distant area) lighting Realistic materials General, easy to use method 2 We focus on stochastic ray tracing of direct illumination, using importance sampling of the product of distant lighting and surface reflectance. Our goal is a method that is simple and easy to implement, and works for arbitrary BRDFs.

The Problem 3

Direct Illumination The rendering equation [Kajiya86] gives the outgoing radiance, L_o, as an integral over the incident lighting L, and reflectance B (BRDF x cosine-term). This can be split into indirect illumination (one or more bounces) and direct illumination (zero bounces). The integral for the direct illumination involves a binary visibility term V. 4

Direct Illumination Point lights: Area lights N random samples per light Environment map lighting Divide into pre-integrated strata: e.g., [Agarwal et al. 2003, Ben-Artzi et al. 2006] B A Lightcuts [Walter et al. 2005, 2006] Monte Carlo simulation Image courtesy of Ben-Artzi et al. Depending on what type of light sources are used, there are different ways of computing the direct illumination. We focus on Monte Carlo methods, which rely on stochastic point sampling of the integral. 5

Monte Carlo Integration Random sampling: Importance sampling: Zero variance if Random sampling gives noisy results as the samples have a low probability of finding the peaks in the function. With importance sampling, more samples are placed in regions of high contribution, thereby reducing the variance. The optimal case is sampling with a PDF proportional to the function f(x), but this is impossible to achieve in practice. 6

Product Sampling Problem with sampling only L, B, or V? strong light weak light BRDF peak Product sampling: Find samples with both strong light and BRDF peak 7 With BRDF sampling (blue), the samples are placed in the direction of the BRDF peak, which in this case means they miss all important lighting. Similarly, sampling according to the lighting only (red) may give bad results since we BRDF is not taken into account. Product sampling (green) solves the problem.

Problem? x? Lighting BRDF BRDF typically changes per pixel Lighting (local frame) also changes per pixel How to compute and sample the product? The probability density function (pdf) changes per-pixel, so cannot easily be precomputed. The BRDF is a 4D function in the local frame (and typically spatially varying), and distant lighting is a 2D function in world space (5D in local frame). This makes efficient computation and sampling of the product a difficult problem. 8

Wavelet Imp. Sampling (WIS) [Clarberg et al. 2005] A v A v B n A n B Rendering of pixel B B Rendering of pixel A initial point distribution wavelet multiplication wavelet multiplication points distributed according to importance of product Limitations Precomputation, low-res lighting (4D pre-rotation) Adding dimensions Exploding memory & time WIS solves the problem by precomputing and storing L and B as Haar wavelets. These are then multiplied (see: wavelet triple products [Ng et al. 2004]) and sampled using sample warping. However, the large amounts of data limits the method to low-res lighting and simple BRDFs (i.e., it is hard to use procedural shaders of spatially-varying BRDFs). 9

Two Stage Imp. Sampling [Cline et al. 2006] Summed area table (SAT) of Env. map Quick to find integral over arbitrary region Piecewise linear BRDF approx. Initial splits based on BRDF peaks: Heuristics control further splits: Relies on heuristics Relatively inaccurate Cline et al. solved many of the problems by using a SAT for the environment map in world space, and building a BRDF approximation on-the-fly per-pixel. The main drawback is that the construction of the BRDF approximation relies on heuristics and requires a rather large number of splits. 10

Our Solution 11

Lighting Do we need full-res environment map? Subsampling / approx. would simplify the problem Image courtesy of Rump et al. 2008 12 These renderings of realistic car paint represent a case where the BRDFs have both a wide diffuse lobe, and a very sharp specular peak. For these types of materials, any kind of subsampling of approximation of the lighting yields significantly increased noise, as the BRDF peak can point towards any region of the environment map.

Lighting Do we need full-res environment map? Yes 4K HDR map = 192 MB (uncompressed) Pre-rotation (4K x 4K directions): 3072 TB Conclusion Single map in world space Mip-map hierarchy (+33% memory) Which format? So, yes, it is in many cases desirable to use full-res environment maps. The industry often uses maps of 4Kx4K pixels, so pre-rotating (as in WIS) is clearly impractical (>3000TB memory!). Hence, we must store a single map in world space. 13

Equal-Area Mapping Properties (a) (b) (c) Equal-area, Low distortion, Boundary symmetry Speed Scalar SSE 120 clocks/transform 20 clocks/transform We have constructing an equal-area mapping of the sphere by combining the concentric map [Shirley and Chiu 97] with the octahedral map [Praun and Hoppe 2003]. We have written a fast SSE-optimized version of the mapping, which will be described in a separate paper or technical report. (For the EG 08 paper, we used the slower scalar version). 14

BRDF Approximation x? Lighting BRDF Need BRDF slice in world space 4D BRDF 6D BTF 7D function 9D function Precomputation impractical Create approximation on-the-fly 15 Now when the lighting has been defined, how do we find the BRDF slice? Pre-rotation is impractical (7D or even 9D function), so we must create an approximation on-the-fly per pixel.

BRDF Approximation Draw point samples Evaluate BRDF x cosine for each sample Use BRDF importance sampling to find important features Hierarchically subdivide samples into quadtree One sample per node Piecewise constant approx. High resolution around peak(s) The core idea is to build an approximation out of a small set of point samples of the BRDF. We use BRDF importance sampling to direct the samples to important regions. Based on the point samples, a piecewise constant approximation is built by subdividing the sample set in a quad-tree structure. Pseudo-code for this can be found in the paper. 16

Quadtree Product See paper for Fast Wavelet Product Env. mipmap tree Product tree 3.25 2.4 2.75 3.75 2.2 2.6 2.0 3.5 1.5 6.0 2.2 3.0 1 3 2 5 1 2 3 9 1.2 3.2 BRDF samples: 0.8 1.2 1.6 0.5 The quadtree product is obtained by hierarchically subdividing the sample set until only one sample per node remains. These leaf nodes are assigned the product of the sample value and the corresponding node in the environment map hierarchy. The leaf values are averaged and propagated up towards the root, in a single tree traversal. Pseudo-code can be found in the paper. 17

Product Sampling 2.4 2.2 2.6 1 3 4 Poisson disk points Sample warping [Clarberg et al. 2005] 2 1 2 3 4 2.2 3.0 1.2 3.2 Product Samples Once the quadtree product has been computed, it is sampled using sample warping [Clarberg et al. 2005]. A uniform point set (Poisson disk points) is fed through the tree, and the result is a set of points with the correct product distribution. Pseudo-code and more details can be found in the paper. 18

Sources of Noise Our importance function: Exact lighting Approx. reflectance (BRDF x cosine) MC estimator: Noise Visibility BRDF approx. inaccuracy Tradeoff between #samples for BRDF and visibility 19 Since we use the exact full-res lighting, L is removed from the Monte Carlo estimator. Hence, all noise comes from the visibility (evaluated through ray tracing) and the inaccuracy of the BRDF approximation. L_ns represent the unoccluded lighting and is given by the root node of the product quadtree.

Results 20

BRDF vs. Visibility Samples (equal time) 180 x 10!3 Number of Visibility Samples 160 140 120 100 80 60 40 Noise level 1.4 1.2 1 0.8 0.6 0.4 Variance (MSE) 20 0.2 0 0 200 400 600 800 1000 1200 0 Number of BRDF samples First we analyze the tradeoff between the number of visibility samples vs. number of BRDF samples. The variance is low over a quite large range (100-500 BRDF samples), which shows that this is not a critical parameter for our method. A default value of, e.g., 256 BRDF samples works well in most cases. 21

Test Scene Our test scene rendered with an environment map featuring both a single small strong light source (the sun) and larger bright regions (the clouds and sky). 22

10 samples/pixel [Clarberg et al. 2005] 23

10 samples/pixel [Cline et al. 2006] 24

10 samples/pixel Our algorithm 25

Rendering Time (seconds) 1 200 Two stage WIS Our 1 000 800 Seconds 600 400 200 0 10 30 100 300 Number of visibility samples Two stage importance sampling [Cline et al. 2006] is fast at low sample rates, but gets slower with many samples. Between our method and WIS [Clarberg et al. 2005], there is a constant small speedup, which comes from the simpler evaluation of the product (quadtree vs. wavelets). Note that our method also performs BRDF sampling on-the-fly, while WIS used precomputed BRDFs. 26

Equal-time Comparison [Cline et al. 2006] Our algorithm 27 Side-by-side comparison between Two stage importance sampling and our method. Equalrendering time and about 30 samples/pixel.

Equal-time Comparison [Cline et al. 2006] 28

Equal-time Comparison Our algorithm 29

Contributions Picked the best from previous algorithms: No precomputation Little memory use Flexible BRDF support High resolution lighting Simple implementation Fast quadtree product and wavelet product 30

Acknowledgements Funding Swedish Foundation for Strategic Research Intel Corporation Lund University Graphics Group Jacob Munkberg, Jon Hasselgren, and the rest 31

The End 32