Global Illumination and Radiosity

Similar documents
Global Illumination and Radiosity

Global Illumination and Radiosity

Global Illumination: Radiosity

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

Global Illumination and Radiosity

Introduction to Radiosity

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

Real-time. Shading of Folded Surfaces

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

Scan Conversion & Shading

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

Scan Conversion & Shading

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

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

Monte Carlo 1: Integration

Monte Carlo Rendering

Monte Carlo 1: Integration

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

Surface Mapping One. CS7GV3 Real-time Rendering

Some Tutorial about the Project. Computer Graphics

Diffuse and specular interreflections with classical, deterministic ray tracing

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

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

Consistent Illumination within Optical See-Through Augmented Environments

Simplification of 3D Meshes

An exhaustive error-bounding algorithm for hierarchical radiosity

Mathematics 256 a course in differential equations for engineering students

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

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

Lighting. Dr. Scott Schaefer

Monte Carlo Integration

Cluster Analysis of Electrical Behavior

A Binarization Algorithm specialized on Document Images and Photos

Plane Sampling for Light Paths from the Environment Map

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

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

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

Fast and accurate view factor generation

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

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

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

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

Accounting for the Use of Different Length Scale Factors in x, y and z Directions

Electrical analysis of light-weight, triangular weave reflector antennas

Interactive Virtual Relighting of Real Scenes

Programming in Fortran 90 : 2017/2018

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

Robust Soft Shadow Mapping with Depth Peeling

Complex Filtering and Integration via Sampling

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

Computer Sciences Department

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


Robust Soft Shadow Mapping with Backprojection and Depth Peeling

An Accurate Evaluation of Integrals in Convex and Non convex Polygonal Domain by Twelve Node Quadrilateral Finite Element Method

An Optimal Algorithm for Prufer Codes *

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Machine Learning: Algorithms and Applications

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

Computer models of motion: Iterative calculations

PBRT core. Announcements. pbrt. pbrt plug-ins

Lecture 5: Multilayer Perceptrons

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

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization

Feature Reduction and Selection

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

Dependence of the Color Rendering Index on the Luminance of Light Sources and Munsell Samples

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

AVO Modeling of Monochromatic Spherical Waves: Comparison to Band-Limited Waves

DIFFRACTION SHADING MODELS FOR IRIDESCENT SURFACES

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

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

2.2 Photometric Image Formation

Radiosity. Early Radiosity. Page 1

Problem Set 3 Solutions

Parallelism for Nested Loops with Non-uniform and Flow Dependences

AP PHYSICS B 2008 SCORING GUIDELINES

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

Topic 13: Radiometry. The Basic Light Transport Path

Object Recognition Based on Photometric Alignment Using Random Sample Consensus

Interactive Rendering of Translucent Objects

The Shortest Path of Touring Lines given in the Plane

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.

Fast Computation of Shortest Path for Visiting Segments in the Plane

Simulation and Animation of Fire

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

CMPS 10 Introduction to Computer Science Lecture Notes

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

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

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide

S1 Note. Basis functions.

Loop Transformations, Dependences, and Parallelization

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching

Module 6: FEM for Plates and Shells Lecture 6: Finite Element Analysis of Shell

Recognizing Faces. Outline

Outline. Self-Organizing Maps (SOM) US Hebbian Learning, Cntd. The learning rule is Hebbian like:

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

Motivation. EE 457 Unit 4. Throughput vs. Latency. Performance Depends on View Point?! Computer System Performance. An individual user wants to:

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

A Facet Generation Procedure. for solving 0/1 integer programs

Transcription:

Global Illumnaton and Radosty CS535 Danel lg. 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 tlght 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

Global Illumnaton Consder drect llumnaton as well as ndrect llumnaton; e.g. Reflectons, refractons, shadows, etc. Dffuse nter reflecton wth global llumnaton only dffuse nter-reflecton drect llumnaton

Global Illumnaton Consder drect llumnaton as well as ndrect llumnaton; e.g. Reflectons, refractons, shadows, etc. Dffuse nter reflecton, specular nter reflecton, 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 Equaton: (more detals dtl on the board )

Radosty Rest of Sldes Courtesy: 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 dray 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.

Ray Tracng

Radosty

Dffuse Interreflecton (radosty method)

Dffuse Interreflecton Surface = "dffuse reflector" of lght energy, means: any lght energy whch strkes the surface wll be reflected n all drectons, dependent only on the angle between the surface's normal and the ncomng lght vector (Lambert's law).

Dffuse Interreflecton The reflected lght energy often s colored, to some small extent, by the color of the surface from whch t was reflected. Ths reflecton of lght energy n an envronment produces a phenomenon known as "color bleedng," where a brghtly colored surface's color wll "bleed" onto adjacent surfaces.

Dffuse Interreflecton The reflected lght energy often s colored, to some small extent, by the color of the surface from whch t was reflected. C l bl d Color bleedng, as both the red and blue walls "bleed" ther color onto the whte walls, celng and floor.

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

Ths encompasses both surfaces whch are basc emtters of energy, as wth lght sources, and surfaces whch receve energy from other surfaces and thus have energy to transfer. Ths "thermal radaton" theory can be used to descrbe the transfer of many knds of energy between surfaces, ncludng lght energy.

Radosty (Computer Graphcs) Assumpton #1: surfaces are dffuse emtters and reflectors of energy, emttngand 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 hcan 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 someother other surface. The energy whch leaves a surface (surface "j") and strkes anothers rface(surface "") satten attenuated ated by two ofactors: 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 F j j Radosty of surface Emssvty of surface Form Factor of surface j relatve to surface Radosty of surface j Reflectvty of surface wll absorb a certan percentage of lght energy whch strkes Surface Surface j accounts for the physcal relatonshp between the two surfaces

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

The Radosty Equaton B = E + ρ B F j j Energy reachng surface from other surfaces Form Factor of surface j relatve to surface Radosty of surface j accounts for the physcal Surface j relatonshp between the two surfaces Surface

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

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

The Radosty Equaton Energy reflected by surface B = E + ρ B F j j Form Factor of Reflectvty of surface surface j relatve to surface Energy reflected by Radosty of surface j surface = Reflectvty of surface Form * Factor Reflectvty Energy reachng accounts for surface wll absorb a from other surfaces Surface j the physcal certan relatonshp percentage of between the lght energy two Surface whch strkes surfaces

Radosty Classc radosty = fnte element e e method Assumptons Dffuse reflectance Usually polygonal surfaces Advantages Softshadows and ndrect lghtng Vew ndependent soluton Precompute for a set of lght sources Useful for walkthroughs

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

Classc Radosty Algorthm Mesh Surfaces nto Elements Compute Form Factors Between B t 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 l area of surface I, j FdA da j j = cos θ cos θ π r 2 j angle between Normal and r angle g between Normal j and r Surface j θ j da j θ r vector from da to da j da Surface

Between dfferental areas, the form factor equals: FdA da j j = cosθ cosθ π r 2 j F j The overall form factor between and j s found by ntegratng 1 cosθ cosθ = 2 A A A π r j 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 F j 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 cos cos = A 2 π r 1 θ θ A A j j da da j F j 1 cosθ cosθ j A π r = 2 A A j π V j da da j where V j s the vsblty (0 or 1)

We have two ntegrals to compute: F j = 1 cos θ cos θ j 2 A πr A A j V j da j da Area ntegral Area ntegral over surface over surface j Surface j θ j da j θ r da Surface

The Nusselt Analog Dfferentaton of the basc form factor equaton s dffcult even for smple surfaces! Nusselt developed a geometrc analog whch allows the smple and accurate calculaton of the form factor between a surface and a pont on a second surface.

The Nusselt Analog The "Nusselt analog" nvolves placng a hemsphercal projecton body, wth unt radus, at a pont on a surface. The second surface s sphercally projected onto the projecton body, then cylndrcally projected onto the base of the hemsphere. h The form factor s then the area projected on the The form factor s, then, the area projected on the base of the hemsphere dvded by the area of the base of the hemsphere.

Numercal Integraton: The Nusselt Analog Ths gves the form factor F daaj A j da

The Nusselt Analog q r 1. Project A j along ts normal: A cos q A j cos q j 2. Project result on sphere: A j cos q j / r 2 3. Project result on unt crcle: A j cos q j cos q /r 2 area A j 4. Dvde by unt crcle area: A j cos q j cos q / pr 2 q j 5. Integrate for all ponts on A j : F da A A j cos θ cos θ πr j 2 sphere projecton A j cos q j /r 2 = j V j da j unt crcle area p second projecton A j cos q j cos q /r 2

Method 1: Hemcube Approxmaton of Nusselt ss analog between a pont da and a polygon A j Polygonal Area (A j ) Infntesmal Area (da )

Hemcube For convenence, a cube 1 unt hgh wth a top face 2 x 2 s used. Sde faces are 2 wde by 1 hgh. D d l f h b Decde on a resoluton for the cube. Say 512 by 512 for the top.

The Hemcube In Acton

The Hemcube In Acton

The Hemcube In Acton Ths llustraton demonstrates the calculaton of form factors between a partcular surface on the wall of a room and several surfaces of objects n the room.

Compute the form factors from a pont on a surface to all other surfaces by: Projectng allother surfaces onto the hemcube Storng, at each dscrete area, the dentfyng ndex of the surface that s closest to the pont.

Dscrete areas wth the ndces of the surfaces whch are ultmately vsble to the pont. From there the form factors between the pont and the surfaces are calculated. For greater accuracy, a large surface would typcally be broken nto a set of small surfaces before any form factor calculaton s performed.

Hemcube Method 1. Scan convert all scene objects onto hemcube s 5 faces 2. Use Z buffer to determne vsblty term 3. Sum up the delta form factors of the hemcube cells covered by scanned objects 4. Gvesform factors from hemcube s base to all elements, e.e. F daaj for gven and all j

Hemcube Algorthms Advantages + Frst practcal method + Use exstng renderng systems; Hardware + Computes row of form factors n O(n) Dsadvantages Computes dfferental fnte form factor Alasng errors due to samplng Randomly rotate/shear tt/h hemcube Proxmty errors Vsblty errors Expensve to compute a sngle form factor

Hemcube Problem: Alasng

Method 2: Area Samplng 1. Subdvde de A j nto small peces da j A j 2. For all da j cast ray daj-daj to determne V j f vsble compute F dadaj cosθ cosθ j FdA da = VjdA j 2 πr sum up F daaj += F dadaj j da ray da j 3. We have now F daaj

Summary Several ways to fnd form factors Hemcube was orgnal method + Hardware acceleraton +GvesF daaj for all j n one pass Alasng Area samplng methods now preferred Slower than hemcube As accurate as desred snce adaptve

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

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

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

Radosty Matrx E + = n j j j A B F A E A B ρ B j= j j j 1 n j j j F A F A = = + = n j j j B F E B 1 ρ n E B F F F 1 ρ ρ ρ j j j E B F B = =1 ρ = n n E E B B F F F F F F M M M O M M L L 2 1 2 1 2 2 22 2 21 2 1 1 12 1 11 1 1 1 ρ ρ ρ ρ ρ ρ n n nn n n n n n E B F F F M M L M O M M 2 1 1 ρ ρ ρ

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. n n E E B B F F F F F F L L 2 1 2 1 2 2 22 2 21 2 1 1 12 1 11 1 1 1 ρ ρ ρ ρ ρ ρ = n n nn n n n n n n E B F F F M M L M O M M 2 2 2 1 2 2 22 2 21 2 1 ρ ρ ρ Ths matrx equaton s solved for the "B" values, whch can be used as the fnal ntensty (or color) value of each surface.

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. Each of these steps can be qute expensve f the number of surfaces s large: complex envronments typcally have upwards of ten thousand surfaces, and envronments wth one mllon surfaces are not uncommon. 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

Solve [F][B] = [E] Drect methods: O(n 3 ) Gaussan elmnaton Goral, Torrance, Greenberg, Battale, 1984 Iteratve t 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 Ina 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 j= 1 B j = ρ B F j j F j B = E + n ( ρ ) Fj j= 1 B j

Gatherng Gatherng lght through a hem cube allows one patch radosty to be updated. B = E + n ( ρ ) Fj j= 1 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 whereh 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

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

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 bffl baffles b 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.