Global Illumination and Radiosity

Similar documents
Global Illumination and Radiosity

Global Illumination and Radiosity

Global Illumination: Radiosity

Global Illumination and Radiosity

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

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

Real-time. Shading of Folded Surfaces

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

Introduction to Radiosity

Global Illumination. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/26/07 1

Color in OpenGL Polygonal Shading Light Source in OpenGL Material Properties Normal Vectors Phong model

Monte Carlo Rendering

Scan Conversion & Shading

Scan Conversion & Shading

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

Diffuse and specular interreflections with classical, deterministic ray tracing

Surface Mapping One. CS7GV3 Real-time Rendering

Form-factors Josef Pelikán CGG MFF UK Praha.

Comparison of calculation methods and models in software for computer graphics and radiative heat exchange

Plane Sampling for Light Paths from the Environment Map

Consistent Illumination within Optical See-Through Augmented Environments

Surface Integrators. Digital Image Synthesis Yung-Yu Chuang 12/20/2007

Physics 132 4/24/17. April 24, 2017 Physics 132 Prof. E. F. Redish. Outline

Monte Carlo 1: Integration

Some Tutorial about the Project. Computer Graphics

2.2 Photometric Image Formation

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

Monte Carlo 1: Integration

Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics

Interactive Rendering of Translucent Objects

Lighting. Dr. Scott Schaefer

An exhaustive error-bounding algorithm for hierarchical radiosity

Simplification of 3D Meshes

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces

Motivation. Motivation. Monte Carlo. Example: Soft Shadows. Outline. Monte Carlo Algorithms. Advanced Computer Graphics (Fall 2009)

Cluster Analysis of Electrical Behavior

Computer Sciences Department

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

Object Recognition Based on Photometric Alignment Using Random Sample Consensus

Electrical analysis of light-weight, triangular weave reflector antennas

Interactive Virtual Relighting of Real Scenes

Kiran Joy, International Journal of Advanced Engineering Technology E-ISSN

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

GSLM Operations Research II Fall 13/14

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005

Computer graphics III Light reflection, BRDF. Jaroslav Křivánek, MFF UK

Wavefront Reconstructor

Modeling, Manipulating, and Visualizing Continuous Volumetric Data: A Novel Spline-based Approach

Realistic Rendering. Traditional Computer Graphics. Traditional Computer Graphics. Production Pipeline. Appearance in the Real World

AMath 483/583 Lecture 21 May 13, Notes: Notes: Jacobi iteration. Notes: Jacobi with OpenMP coarse grain

S1 Note. Basis functions.

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

Robust Soft Shadow Mapping with Backprojection and Depth Peeling

DIFFRACTION SHADING MODELS FOR IRIDESCENT SURFACES

Robust Soft Shadow Mapping with Depth Peeling

An Optimal Algorithm for Prufer Codes *

Monte Carlo Integration

Topic 13: Radiometry. The Basic Light Transport Path

PBRT core. Announcements. pbrt. pbrt plug-ins

Light Factorization for Mixed-Frequency Shadows in Augmented Reality

Angle-Independent 3D Reconstruction. Ji Zhang Mireille Boutin Daniel Aliaga

Complex Filtering and Integration via Sampling

Short Papers. Toward Accurate Recovery of Shape from Shading Under Diffuse Lighting 1 INTRODUCTION 2 PROBLEM FORMULATION

Problem Set 3 Solutions

The Shortest Path of Touring Lines given in the Plane

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

Mathematics 256 a course in differential equations for engineering students

Circuit Analysis I (ENGR 2405) Chapter 3 Method of Analysis Nodal(KCL) and Mesh(KVL)

A Binarization Algorithm specialized on Document Images and Photos

Loop Transformations, Dependences, and Parallelization

Freeform Shading and Lighting Systems from Planar Quads

Collaboratively Regularized Nearest Points for Set Based Recognition

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.


Very simple computational domains can be discretized using boundary-fitted structured meshes (also called grids)

Solving two-person zero-sum game by Matlab

PHYS 219 Spring semester Lecture 20: Reflection of Electromagnetic Radiation: Mirrors and Images Formed by Mirrors

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints

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

Lecture 5: Multilayer Perceptrons

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Determining the Optimal Bandwidth Based on Multi-criterion Fusion

Smooth Probabilistic Ambient Occlusion for Volume Rendering

Stochastic Rendering of Density Fields. Jos Stam. Department of Computer Science. University of Toronto.

Feature Reduction and Selection

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory

S.P.H. : A SOLUTION TO AVOID USING EROSION CRITERION?

Dynamic Simulation of Optical MEM Switches

Programming in Fortran 90 : 2017/2018

High-Boost Mesh Filtering for 3-D Shape Enhancement

Inverse Kinematics (part 2) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Spring 2016

Rendering of Complex Materials for Driving Simulators

TN348: Openlab Module - Colocalization

Model-Based Bundle Adjustment to Face Modeling

A Range Image Refinement Technique for Multi-view 3D Model Reconstruction

Fast Computation of Shortest Path for Visiting Segments in the Plane

Transcription:

Global Illumnaton and Radosty CS535 Danel G. Alaga Department of Computer Scence Purdue Unversty

Recall: Lghtng and Shadng Lght sources Pont lght Models an omndrectonal lght source (e.g., a bulb) Drectonal lght Models an omndrectonal lght source at nfnty Spot lght Models a pont lght wth drecton Lght model Ambent lght Dffuse reflecton Specular reflecton

Recall: Lghtng and Shadng Dffuse reflecton Lambertan model

Recall: Lghtng and Shadng Specular reflecton Phong model

Recall: Lghtng and Shadng Well.there s much more

For example Reflecton -> Bdrectonal Reflectance Dstrbuton Functons (BRDF) Dffuse, Specular -> Dffuse Interreflecton, Specular Interreflecton Color bleedng Transparency, Refracton Scatterng Subsurface scatterng Through partcpatng meda And more!

Illumnaton Models So far, you consdered mostly local (drect) llumnaton Lght drectly from lght sources to surface No shadows (actually s a global effect) Global (ndrect) llumnaton: multple bounces of lght Hard and soft shadows Reflectons/refractons (you knda saw already) Dffuse and specular nterreflectons

Welcome to Global Illumnaton Drect llumnaton + ndrect llumnaton; e.g. Drect = reflectons, refractons, shadows, Indrect = dffuse and specular nter-reflecton, wth global llumnaton only dffuse nter-reflecton drect llumnaton

Global Illumnaton Drect llumnaton + ndrect llumnaton; e.g. Drect = reflectons, refractons, shadows, Indrect = dffuse and specular nter-reflecton,

Reflectance Equaton x r L ( x, ) L ( x, ) L ( x, ) f ( x,, )( n) r r e r r Reflected Lght Emsson Incdent BRDF Cosne of (Output Image) Lght (from Incdent angle [Sldes wth help from Pat Hanrahan and Henrk Jensen] lght source)

Reflectance Equaton x r Sum over all lght sources L ( x, ) L ( x, ) L ( x, ) f ( x,, )( n) r r e r r Reflected Lght Emsson Incdent BRDF (Output Image) Lght (from lght source) Cosne of Incdent angle

Reflectance Equaton d x r L ( x, ) L ( x, ) L ( x, ) f( x,, ) cos d r r e r r Reflected Lght (Output Image) Emsson Replace sum wth ntegral Incdent Lght (from lght source) BRDF Cosne of Incdent angle

Reflectance Equaton d x r L ( x, ) L ( x, ) L ( x, ) f( x,, ) cos d r r e r r

The Challenge L ( x, ) L ( x, ) L ( x, ) f ( x,, ) cos d r r e r r Computng reflectance equaton requres knowng the ncomng radance from surfaces But determnng ncomng radance requres knowng the reflected radance from surfaces

Surfaces (nterreflecton) x da Global Illumnaton d x r Lr ( x, r ) Le ( x, r ) Lr ( x, ) f ( x,, r ) cosd Reflected Lght (Output Image) Emsson Reflected Lght (from prev surface) BRDF Cosne of Incdent angle

Renderng Equaton Surfaces (nterreflecton) x da d x r Lr ( x, r ) Le ( x, r ) Lr ( x, ) f ( x,, r ) cosd Reflected Lght (Output Image) UNKNOWN Emsson Reflected BRDF Cosne of Lght Incdent angle KNOWN UNKNOWN KNOWN KNOWN

Renderng Equaton (Kajya 1986)

Renderng Equaton as Integral Equaton Lr ( x, r ) Le ( x, r ) Lr ( x, ) f ( x,, r ) cosd Reflected Lght (Output Image) UNKNOWN Emsson Reflected BRDF Cosne of Lght Incdent angle KNOWN UNKNOWN KNOWN KNOWN Is a Fredholm Integral Equaton of second knd [extensvely studed numercally] wth canoncal form lu ( ) e( u) lv ( ) K( u, v ) dv Kernel of equaton

Lnear Operator Equaton lu ( ) e( u) lv ( ) K( u, v ) dv Kernel of equaton L EKL whch s effectvely a smple matrx equaton (or system of smultaneous lnear equatons) where L, E are vectors, K s the lght transport matrx (more on ths later!)

Solvng the Renderng Equaton (=how to compute L?) In general, too hard for analytc soluton But there are approxmatons and some nce observatons

Solvng the Renderng Equaton (=how to compute L?) L EKL IL KL E ( I K) L E L ( I K) 1 E (usng Bnomal Theorem) 2 3 L ( I K K K...) E 2 3 L E KE K E K E... where term n corresponds to n-th bounces of lght

Ray Tracng 2 3 L E KE K E K E... Emsson drectly From lght sources Drect Illumnaton on surfaces Global Illumnaton (One bounce ndrect) [Mrrors, Refracton] (Two bounce ndrect) [Caustcs, etc ]

Ray Tracng 2 3 L E KE KEKE... Emsson drectly From lght sources OpenGL Shadng Drect Illumnaton on surfaces Global Illumnaton (One bounce ndrect) [Mrrors, Refracton] (Two bounce ndrect) [Caustcs, etc ]

Radosty Radosty, nspred by deas from heat transfer, s an applcaton of a fnte element method to solvng the renderng equaton for scenes wth purely dffuse surfaces (renderng equaton) [Radosty sldes heavly based on Dr. Maro Costa Sousa, Dept. of of CS, U. Of Calgary]

Radosty Calculatng the overall lght propagaton wthn a scene, for short global llumnaton s a very dffcult problem. Wth a standard ray tracng algorthm, ths s a very tme consumng task, snce a huge number of rays have to be shot.

Radosty For ths reason, the radosty method was nvented. The man dea of the method s to store llumnaton values on the surfaces of the objects, as the lght s propagated startng at the lght sources.

Equaton: Radosty

Ray Tracng

Radosty

Dffuse Interreflecton (radosty method)

Radosty (Thermal Heat Transfer) The "radosty" method has ts bass n the feld of thermal heat transfer. Heat transfer theory descrbes radaton as the transfer of energy from a surface when that surface has been thermally excted.

Radosty (Computer Graphcs) Assumpton #1: surfaces are dffuse emtters and reflectors of energy, emttng and reflectng energy unformly over ther entre area. Assumpton #2: an equlbrum soluton can be reached; that all of the energy n an envronment s accounted for, through absorpton and reflecton. Also vewpont ndependent: the soluton wll be the same regardless of the vewpont of the mage.

The Radosty Equaton The "radosty equaton" descrbes the amount of energy whch can be emtted from a surface, as the sum of the energy nherent n the surface (a lght source, for example) and the energy whch strkes the surface, beng emtted from some other surface. The energy whch leaves a surface (surface "j") and strkes another surface (surface "") s attenuated by two factors: the "form factor" between surfaces "" and "j", whch accounts for the physcal relatonshp between the two surfaces the reflectvty of surface ", whch wll absorb a certan percentage of lght energy whch strkes the surface.

The Radosty Equaton B E B j F j Radosty of surface Emssvty of surface Radosty of surface j Form Factor of surface j relatve to surface Reflectvty of surface wll absorb a certan percentage of lght energy whch strkes the surface Surface Surface j accounts for the physcal relatonshp between the two surfaces

The Radosty Equaton B E B j F j Energy emtted by surface Surface j Surface

The Radosty Equaton B E B j F j Energy reachng surface from other surfaces Surface j Surface

The Radosty Equaton B E B j F j Energy reflected by surface Surface j Surface

Classc Radosty Algorthm Mesh Surfaces nto Elements Compute Form Factors Between Elements Solve Lnear System for Radostes Reconstruct and Dsplay Soluton

Classc Radosty Algorthm Mesh Surfaces nto Elements Compute Form Factors Between Elements Solve Lnear System for Radostes Reconstruct and Dsplay Soluton

The Form Factor: The fracton of energy leavng one surface that reaches another surface It s a purely geometrc relatonshp, ndependent of vewpont or surface attrbutes Surface j Surface

Between dfferental areas, the form factor equals: dfferental area of surface, j angle between Normal and r angle between Normal j and r FdA da j cos cos r 2 j Surface j j da j r vector from da to da j da Surface

Between dfferental areas, the form factor equals: The overall form factor between and j s found by ntegratng FdA da j j cos cos r 2 j F j 1 A 2 A A j cos cos r j da da j Surface j j da j r da Surface

Next Step: Learn ways of computng form factors Recall the Radosty Equaton: B E B j F j The F j are the form factors Form factors ndependent of radostes (depend only on scene geometry)

Form Factors n (More) Detal F j 1 2 A A A j cos cos r j da da j F j 1 A 2 A A j cos cos r j V j da da j where V j s the vsblty (0 or 1)

Form Factors n (More) Detal Several ways to fnd form factors Hemcube was orgnal method + Hardware acceleraton + Gves F daaj for all j n one pass - Alasng Area samplng methods now preferred Slower than hemcube but GPU-able As accurate as desred snce adaptve

Area Samplng Subdvde A j nto small peces da j For all da j cast ray daj-daj to determne V j f vsble compute F dadaj cos cos j FdAdA V j 2 r sum up F daaj += F dadaj j da j da ray da j A j We have now F daaj

Next We have the form factors How do we fnd the radosty soluton for the scene? The "Full Matrx" Radosty Algorthm Gatherng & Shootng Progressve Radosty Meshng

Radosty Matrx n j j j B F E B 1 n n nn n n n n n n n E E E B B B F F F F F F F F F 2 1 2 1 2 1 2 2 22 2 21 2 1 1 12 1 11 1 1 1 1 n j j j E B F B 1 E B

Radosty Matrx The "full matrx" radosty soluton calculates the form factors between each par of surfaces n the envronment, then forms a seres of smultaneous lnear equatons. Ths matrx equaton s solved for the "B" values, whch can be used as the fnal ntensty (or color) value of each surface. n n nn n n n n n n n E E E B B B F F F F F F F F F 2 1 2 1 2 1 2 2 22 2 21 2 1 1 12 1 11 1 1 1 1

Radosty Matrx Ths method produces a complete soluton, at the substantal cost of frst calculatng form factors between each par of surfaces and then the soluton of the matrx equaton. Ths leads to substantal costs not only n computaton tme but n storage.

Next We have the form factors How do we fnd the radosty soluton for the scene? The "Full Matrx" Radosty Algorthm Gatherng & Shootng Progressve Radosty Meshng

Drect methods: O(n 3 ) Solve [F][B] = [E] Gaussan elmnaton Goral, Torrance, Greenberg, Battale, 1984 Iteratve methods: O(n 2 ) Energy conservaton dagonally domnant teraton converges Gauss-Sedel, Jacob: Gatherng Nshta, Nakamae, 1985 Cohen, Greenberg, 1985 Southwell: Shootng Cohen, Chen, Wallace, Greenberg, 1988

Gatherng In a sense, the lght leavng patch s determned by gatherng n the lght from the rest of the envronment B B due E to B j n j1 B j F B j j F j B E n Fj j1 B j

Gatherng Gatherng lght through a hem-cube allows one patch radosty to be updated. B E n Fj j1 B j

Gatherng

Successve Approxmaton

Shootng Shootng lght through a sngle hem-cube allows the whole envronment's radosty values to be updated smultaneously. For all j B j B j B E j j where F j F j A A j

Shootng

Progressve Radosty

Next We have the form factors How do we fnd the radosty soluton for the scene? The "Full Matrx" Radosty Algorthm Gatherng & Shootng Progressve Radosty Meshng

Accuracy

Artfacts

Increasng Resoluton

Adaptve Meshng

Some Radosty Results

The Cornell Box Ths s the orgnal Cornell box, as smulated by Cndy M. Goral, Kenneth E. Torrance, and Donald P. Greenberg for the 1984 paper Modelng the nteracton of Lght Between Dffuse Surfaces, Computer Graphcs (SIGGRAPH '84 Proceedngs), Vol. 18, No. 3, July 1984, pp. 213-222. Because form factors were computed analytcally, no occludng objects were ncluded nsde the box.

The Cornell Box Ths smulaton of the Cornell box was done by Mchael F. Cohen and Donald P. Greenberg for the 1985 paper The Hem-Cube, A Radosty Soluton for Complex Envronments, Vol. 19, No. 3, July 1985, pp. 31-40. The hem-cube allowed form factors to be calculated usng scan converson algorthms (whch were avalable n hardware), and made t possble to calculate shadows from occludng objects.

Dscontnuty Meshng Dan Lschnsk, Flppo Tamper and Donald P. Greenberg created ths mage for the 1992 paper Dscontnuty Meshng for Accurate Radosty. It depcts a scene that represents a pathologcal case for tradtonal radosty mages, many small shadow castng detals. Notce, n partcular, the shadows cast by the wndows, and the slats n the char.

Opera Lghtng Ths scene from La Boheme demonstrates the use of focused lghtng and angular projecton of predstorted mages for the background. It was rendered by Jule O'B. Dorsey, Francos X. Sllon, and Donald P. Greenberg for the 1991 paper Desgn and Smulaton of Opera Lghtng and Projecton Effects.

Radosty Factory These two mages were rendered by Mchael F. Cohen, Shenchang Erc Chen, John R. Wallace and Donald P. Greenberg for the 1988 paper A Progressve Refnement Approach to Fast Radosty Image Generaton. The factory model contans 30,000 patches, and was the most complex radosty soluton computed at that tme. The radosty soluton took approxmately 5 hours for 2,000 shots, and the mage generaton requred 190 hours; each on a VAX8700.

Museum Most of the llumnaton that comes nto ths smulated museum arrves va the baffles on the celng. As the progressve radosty soluton executed, users could wtness each of the baffles beng llumnated from above, and then reflectng some of ths lght to the bottom of an adjacent baffle. A porton of ths reflected lght was eventually bounced down nto the room. The mage appeared on the proceedngs cover of SIGGRAPH 1988.