Photon Mapping. Michael Doggett Department of Computer Science Lund university

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

Stochastic Path Tracing and Image-based lighting

EDAN30 Photorealistic Computer Graphics

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

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

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

Biased Monte Carlo Ray Tracing

The Rendering Equation and Path Tracing

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

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

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

Choosing the Right Algorithm & Guiding

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

Illumination Algorithms

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

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

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

Biased Monte Carlo Ray Tracing:

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

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

Recent Advances in Monte Carlo Offline Rendering

Stochastic Progressive Photon Mapping

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

Global Illumination. COMP 575/770 Spring 2013

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

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

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

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

The Rendering Equation. Computer Graphics CMU /15-662

EDAN30 Photorealistic Computer Graphics. Ray tracing. Michael Doggett Department of Computer Science Lund university. Copyright 2011 Michael Doggett

REAL-TIME GPU PHOTON MAPPING. 1. Introduction

Global Illumination using Photon Maps

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

Lecture 12: Photon Mapping. Biased Methods

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

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

Bioluminescence Chris Fontas & Forrest Browning

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

Introduction to Photon Mapping RADIANCE Workshop 2010 Course Advanced Fenestration

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

Assignment 3: Path tracing

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

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

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

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

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

Global Illumination and Monte Carlo

The Rendering Equation & Monte Carlo Ray Tracing

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

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

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

Monte Carlo Ray-tracing and Rendering

Lecture 7 - Path Tracing

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

Interactive Methods in Scientific Visualization

Mixing Monte Carlo and Progressive Rendering for Improved Global Illumination

Probabilistic PPM. Claude Knaus Matthias Zwicker University of Bern. State of the Art in Photon Density Estimation

COMP371 COMPUTER GRAPHICS

MIT Ray Tracing Ray Tracing

Low Memory Spectral Photon Mapping

Realistic Image Synthesis

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

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

Metropolis Light Transport

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Ray Tracing. Kjetil Babington

rendering equation camera all

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Global Illumination The Game of Light Transport. Jian Huang

SOME THEORY BEHIND REAL-TIME RENDERING

Chapter 11. Caustics and Global Illumination

CS-184: Computer Graphics. Administrative

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

Indirect Illumination

Rendering Light Reflection Models

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

Radiometry and reflectance

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

Computer Graphics I. Fall 2018

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Raytracing CS148 AS3. Due :59pm PDT

782 Schedule & Notes

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

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

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

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

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

RASTERISED RENDERING

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

Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong

Local vs. Global Illumination & Radiosity

CSCI-6962 Advanced Computer Graphics

Announcements. Light. Properties of light. Light. Project status reports on Wednesday. Readings. Today. Readings Szeliski, 2.2, 2.3.

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

Indirect Illumination

Photon Mapping. Kadi Bouatouch IRISA

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

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I

Transcription:

Photon Mapping Michael Doggett Department of Computer Science Lund university

Outline Photon Mapping (ch. 14 in textbook) Progressive Stochastic 2011 Michael Doggett

How to make light sampling faster? Path tracing converges slowly Shot rays from the light Bidirectional path tracing Metropolis Light Transport Find a path to the light Photon Mapping... then reuse a modified version 2011 Michael Doggett

Photon mapping State-of-the-art in GI! Developed by Henrik Wann Jensen (started 1993)! A clever two-pass algorithm: 1: Shoot photons from light sources, and let them bounce around in the scene, and store them where they land 2: Ray tracing -like pass from the eye, but gather the photons from the previous pass! Advantages:! Fast! Handles arbitrary geometry (as does path tracing)! All global illumination effects can be seen! Little noise 2008 Tomas Akenine-Möller 4

The first pass: Photon tracing Store illumination as points (photons) in a photon map data structure In the first pass: photon tracing Emit photons from light sources Trace them through scene Store them in photon map data structure More details: Then use Russian roulette to find out whether the photon is absorbed or reflected If a photon is absorbed, by a surface (that has a diffuse component), store the photon in photon map If reflected, then shoot photon in new random direction 2008 Tomas Akenine-Möller 5

Photon tracing This type of marker is a stored photon light Specular sphere diffuse floor and wall Should not store photon at specular surfaces, because these effects are view dependent only diffuse effect is view independent Some diffuse photons are absorbed, some are scattered further A photon = the incoming illumination at a point 2008 Tomas Akenine-Möller 6

The photon map data structure Keep them in a separate (from geometry) structure Store all photons in kd-tree Essentially an axis-aligned BSP tree, but we must alter splitting axis: x,y,z,x,y,z,x,y,z, etc. Each node stores a photon Needed because the algorithm needs to locate the n closest photons to a point A photon: float x,y,z; char power[4]; // RGBE, with more accuracy using shared Exponent char phi,theta; // compact representation of incoming direction short flag; // used by KD-tree (stores which plane to split) Create balanced KD-tree simple, done once. Photons are stored linearly in memory: Parent node at index: p, left child at: 2p, right child: 2p+1 2008 Tomas Akenine-Möller 7

What does it look like? Stored photons displayed: 2008 Tomas Akenine-Möller 8

Density estimation The density of the photons indicate how much light that point receives Radiance is the term for what we display at a pixel Rather complex derivation skipped (see Jensen s book) Reflected radiance at point x:! L is radiance at x in the direction of ω! r is radius of expanded sphere! ω p is the direction of the stored photon! Φ p is the stored power of the photon (flux)! f r is the BRDF 2008 Tomas Akenine-Möller 9

Two-pass algorithm Already said: 1) Photon tracing, to build photon maps 2) Rendering from the eye using photon maps Pass 1: Use two photon maps A caustics photon map (for caustics) Reflected or refracted via a surface to a diffuse surface Light transport notation: LS+D A global photon map (for all illumination) All photons that landed on diffuse surfaces L(S D)*D 2008 Tomas Akenine-Möller 10

Caustic map and global map Caustic map Global map Caustic map: send photons only towards reflective and refractive surfaces Caustics is a high frequency component of illumination Therefore, need many photons to represent accurately Global map - assumption: illumination varies more slowly 2008 Tomas Akenine-Möller 11

Pass 2: Rendering using the photon map Render from the eye using a modified ray tracer A number of rays are sent per pixel Break up into fastest way to compute different terms For each ray evaluate four terms Direct illumination (light reaches a surface directly from light source) may need to send many rays to area lights. Done using standard ray tracing. Specular reflection (also evaluated using ray tracing, possibly, with many rays sent around the reflection direction) Caustics: use caustics photon map Indirect illumination (sample multiple diffuse reflections) (gives color bleeding): use the photon map for reflected rays. 2008 Tomas Akenine-Möller 12

Image scanned from Henrik Wann Jensen s book Images of the four components These together solves the entire rendering equation! 2008 Tomas Akenine-Möller 13 =

Indirect illumination: Use the photon map light eye p photon diffuse floor and wall To evaluate indirect illumination at point p: Send several random rays out from p, and grow spheres at contacts May need several hundreds of rays to get good results. 2008 Tomas Akenine-Möller 14

Locate n nearest photons 2012 Michael Doggett from Fig4.10, photon mapping tutorial, Advanced Global Illumination Using Photon Mapping, SIGGRAPH 2008

More literature Photon Mapping Tutorial, Advanced Global Illumination Using Photon Mapping, SIGGRAPH 2008 course notes Great book on global illumination and photon mapping: Henrik Wann Jensen, Realistic Image Synthesis using Photon Mapping, AK Peters, 2001. Check Henrik s website: http://graphics.ucsd.edu/~henrik/ "Global Illumination using Photon Maps" Henrik Wann Jensen In "Rendering Techniques '96". Eds. X. Pueyo and P. Schröder. Springer-Verlag, pages 21-30, 1996 2008 Tomas Akenine-Möller 16

Progressive Photon Mapping LAB4 Photon mapping limited by Photon Map Rearrange algorithm to remove limitation Progressively refine final image by tracing more photons image approaches correct solution "Progressive Photon Mapping", T. Hachisuka, S. Ogaki and H. W. Jensen, ACM Transactions on Graphics (SIGGRAPH Asia 2008) 2011 Michael Doggett

Progressive Photon Mapping LAB4 1st pass - find eye intersection positions 2nd pass - collect photons at intersection positions View hit points Reduce radius of gathered photons as more photons are added Photons image from Progressive Photon Mapping, T. Hachisuka, S. Ogaki and H. W. Jensen, ACM TOG 2008 2011 Michael Doggett

Progressive Photon Mapping LAB4 1st pass - find eye intersection positions 2nd pass - collect photons at intersection positions Reduce radius of gathered photons as more photons are added image from Progressive Photon Mapping, T. Hachisuka, S. Ogaki and H. W. Jensen, ACM TOG 2008 2011 Michael Doggett

Progressive Photon Mapping LAB4 Equal time image : 22 hours PM : 20 million photons, shorter runtime due to memory limit PPM :165 million photons image from Progressive Photon Mapping, T. Hachisuka, S. Ogaki and H. W. Jensen, ACM TOG 2008 2011 Michael Doggett

Stochastic Progressive Photon Mapping Add extra pass Randomly generate hit points image from Stochastic Progressive Photon Mapping, T. Hachisuka, and H. W. Jensen, ACM TOG 2009 2011 Michael Doggett

Stochastic Progressive Photon Mapping BDPT (left), PPM (middle), and SPPM (right) Same rendering time with Depth-of-field and caustics image from Stochastic Progressive Photon Mapping, T. Hachisuka, and H. W. Jensen, ACM TOG 2009 2011 Michael Doggett

Stochastic Progressive Photon Mapping image courtesy Toshiya Hachisuka 2011 Michael Doggett

Elective Create a photorealistic image with an interesting effect AKA Assignment 5 Choose your own topic Present an image at last lecture 2 weeks Describe what is interesting and how you did it 2011 Michael Doggett

Electives from 2011 2011 Michael Doggett

mmxiii mcd Elective from 2012

mmxiv mcd Elective from 2013

BRDFs Need more accurate physically correct model than Phong Measurement and analytical models Schlick Cook-Torrance 81 Ward 92 many others from A Data-Driven Reflectance Model", Wojciech Matusik, Hanspeter Pfister, Matt Brand and Leonard McMillan, ACM Transactions on Graphics 22, 3(2003) 2011 Michael Doggett

Diffraction CDs, prisms Need to compute refraction for different wavelengths 2011 Michael Doggett

Inspiration... Subsurface scattering Participating media Images courtesy of Henrik Wann Jensen 2008 Tomas Akenine-Möller 30

Even more inspiration Have a look at Stanford University Rendering Competition for more ideas http://www-graphics.stanford.edu/courses/cs348b-competition/cs348b-09/ mmxiii mcd

Next Friday Lab 3: Path Tracing In 4 weeks Monday Seminar: Progressive Photon Mapping Wednesday Lecture: Advanced Topics 2011 Michael Doggett