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

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

Photon Mapping. Michael Doggett Department of Computer Science Lund university

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

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

Lecture 12: Photon Mapping. Biased Methods

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

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

Choosing the Right Algorithm & Guiding

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

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

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

The Rendering Equation. Computer Graphics CMU /15-662

Photon Mapping. Kadi Bouatouch IRISA

The Rendering Equation and Path Tracing

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

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

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

Assignment 3: Path tracing

Introduction to Photon Mapping RADIANCE Workshop 2010 Course Advanced Fenestration

Biased Monte Carlo Ray Tracing

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

Stochastic Path Tracing and Image-based lighting

Lecture 7 - Path Tracing

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

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

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

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

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

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

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

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

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

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

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

Image Synthesis. Global Illumination. Why Global Illumination? Achieve more photorealistic images

Lecture 7: Monte Carlo Rendering. MC Advantages

Global Illumination. COMP 575/770 Spring 2013

COMP371 COMPUTER GRAPHICS

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

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

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

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

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

Biased Monte Carlo Ray Tracing:

Photo Studio Optimizer

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

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

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

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

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

Low Memory Spectral Photon Mapping

The Rendering Equation & Monte Carlo Ray Tracing

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

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

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

Chapter 11. Caustics and Global Illumination

Optical Models of Direct Volume Rendering by Nelson Max

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

Lighting and Materials

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Global Illumination The Game of Light Transport. Jian Huang

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

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

Rendering Equation & Monte Carlo Path Tracing I

SOME THEORY BEHIND REAL-TIME RENDERING

Local vs. Global Illumination & Radiosity

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

Lecture 18: Primer on Ray Tracing Techniques

Monte Carlo Ray-tracing and Rendering

Recent Advances in Monte Carlo Offline Rendering

CS5620 Intro to Computer Graphics

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

Global Illumination with Glossy Surfaces

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

Lecture 15: Shading-I. CITS3003 Graphics & Animation

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

Realistic Image Synthesis

Anti-aliasing. Images and Aliasing

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

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

Global Illumination with Photon Map Compensation

6. Illumination, Lighting

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

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

Visualisatie BMT. Rendering. Arjan Kok

Photon Differentials

NAME mkpmap - generate RADIANCE photon map. SYNOPSIS mkpmap apg apc apv apd app apc file nphotons [bwidth]... [options] octree

Assignment #2. (Due date: 11/6/2012)

Simple Lighting/Illumination Models

Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.

w Foley, Section16.1 Reading

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

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

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

MONTE-CARLO PATH TRACING

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

Transcription:

Part I The Basic Algorithm 1 Principles of A two-pass global illumination method Pass I Computing the photon map A rough representation of the lighting in the scene Pass II rendering Regular (distributed) raytracing, optimized with the information in the photon map Solves the rendering equation! Every part of the equation (diffuse, specular, caustics etc.) is solved by different means. 2 From http://www.okino.com/conv/features/caustics Computer Science Dept. Technion Page 1

Pros: Easy to understand and implement Optimizes i rendering and produces most photorealistic ti effects View (Pass I) and geometry independent Cons: Memory consumption Computationally cumbersome (photon tracing) Some optimization techniques can speed up the algorithm significantly. 3 Photon Emission A light source has a given flux (power) P light Number of emitted photons: n e Plight Pphoton = n The distribution of directions depends on the shape of the light Point light sources distribute photons in an isotropic manner. e 4 Computer Science Dept. Technion Page 2

Photon Emission Algorithm Using simple rejection sampling emit photons from diffuse point light() { ne = 0 //number of emitted photons while (not enough photons) { do { x = random number between -1 and 1 y = random number between -1 and 1 z = random number between -1 and 1 } while ( x2 + y2 + z2 > 1 ) d = < x, y, z > p = light source position trace photon from p in direction d ne = ne + 1 } scale power of stored photons with 1/ne } 5 Photon Emission Cont d More photons should be emitted from brighter lights in a multiply-lighted scene Power of photons should be as close to even as possible. May use less photons because each light source contributes less illumination effects. Most photons are typically wasted! Using projection maps: projecting the scene unto each light source and determining the directions in which objects exist. Shooting photons only at these directions. Resulting in less photons on the scene. 6 Computer Science Dept. Technion Page 3

Photon Tracing A light-direction ray-tracing process Algorithm: Shoot photons from lights source When surface is hit, decide whether photon is absorbed\reflected\transmitted. If surface is diffuse, store photon in photon map. 7 Absorbed, Transmitted or Reflected? A surface with diffuse coefficient d and specular coefficient s is hit by a photon with power P s+d<=1, for energy conservation. Make a decision according to Russian Roulette : Randomize a uniform variable x x [0, d] Diffuse x ( d, s + d ] Specular x ( s + d,1] Absorption 8 Computer Science Dept. Technion Page 4

Photon Tracing with Color Bands Deciding using the maximum energy of any color band (RGB) For instance, the probability p d for diffuse reflection is now: p d = max{ dp, dp, dp} r r g g b b max{ P, P, P} r g b Where ( Pr, Pg, P) color bands. is the powers of the photon in the 9 Color Bands cont d The power of the photons need to be re-adjusted to ensure that low-power photons do not waste our time. P refl, c = P inc, c i( s/ d) p ( sd / ) c Why Use Russian Roulette? Photons of even power Controlling the amount of photons Caveat Increasing variance. 10 Computer Science Dept. Technion Page 5

The photon Map Photon is stored in the photon map when hitting a diffuse surface Why not on specular surfaces? Every time a surface is hit, the photon is stored A photon is stored as the number of times it bounces. 11 A Photon Data Structure The data structure for a stored photon contains Incoming direction Incoming power Position in space The photon map, in the most simple representation, is a list of all stored photons. 12 Computer Science Dept. Technion Page 6

Required Photon Maps In order for the rendering to be efficient and correct, we usually require the usage of three photon maps: Caustics photon map Contains photons of the type LS+D Global photon map Contains all types of photons L{S D V }*D Volume photon map Contains photon which participate in indirect illumination of participating media (another topic). 13 Querying the Photon Map Most queries on the photon map (usually to estimate the radiance on a surface) requires an efficient query of which are the nearest neighbors. Using A balanced Kd-Tree Queries are O(logN), where N is the size of the tree. 14 Computer Science Dept. Technion Page 7

Seen in the lecture: Radiance Estimation (, ) ( ) L x f x f x 2 n d Φ p x ω p Pi ω p r(, ω) = r(, ωp, ω) r(, ωp, ω) dap p= 1 A Ω x Algorithm: Search for n closest photons Sum up the contribution according to power Pi with surface BRDF Fr. 15 Density of Closest Photons Assuming the surface is locally flat, using a widening circle until n photons are within it. 2 If radius is r then A = π r Low density photons, edges, and corners make this approximation wrong! 16 Computer Science Dept. Technion Page 8

Filtering If number of photons is too low, edges and corners will become blurry. Solution: Assign weights to photons according to distance from x. Possibilities: d p Cone filter: wpc = 1, k 1 kr i Gaussian filter: w pg 1 e = 1 1 e β α β 2 d p 2 2r 17 Rendering A Scene A scene is composed of the following components Direct illumination Rendered using regular ray-casting Can be approximated using the radiance estimate t Specular and glossy reflection Rendering using standard monte-carlo ray tracing. Cannot be handled with the photon map. Caustics Radiance estimate from the caustics map. Diffuse interreflection (color bleeding) Approximate just using the radiance estimate Accurate tracing rays with the information about the flux as an optimizer. 18 Computer Science Dept. Technion Page 9

Examples Radiance estimates (number of photons in the estimate) 100 Photons 500 photons 19 Multiple Lights Example 100,000 photons from each light source, 100 photons in the estimate 20 Computer Science Dept. Technion Page 10

Subsurface Scattering 100,000 photons 21 Computer Science Dept. Technion Page 11