CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.

Slides:



Advertisements
Similar presentations
SI31 Advanced Computer Graphics AGR
Advertisements

CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 6.
Computer graphics & visualization Global Illumination Effects.
Lecture 14 Illumination II – Global Models
Radiosity Mel Slater Department of Computer Science University College London
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Modeling the Interaction of Light Between Diffuse Surfaces Cindy M. Goral, Keenth E. Torrance, Donald P. Greenberg and Bennett Battaile Presented by: Chris.
Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby.
Graphics Graphics Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Light Issues in Computer Graphics Presented by Saleema Amershi.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
IMGD 1001: Illumination by Mark Claypool
Rendering theory & practice. Introduction  We’ve looked at modelling, surfacing and animating.  The final stage is rendering.  This can be the most.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
7M836 Animation & Rendering
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
The Radiosity Method Donald Fong February 10, 2004.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
1 Dr. Scott Schaefer Radiosity. 2/38 Radiosity 3/38 Radiosity Physically based model for light interaction View independent lighting Accounts for indirect.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Radiosity What we can do with scan line conversion and ray tracing What we can’t do Radiosity.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
-Global Illumination Techniques
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Graphics.
David Luebke 1 10/12/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
CS 445 / 645: Introductory Computer Graphics Light.
Global Illumination Models THE WHITTED IMAGE - BASIC RECURSIVE RAY TRACING Copyright © 1997 A. Watt and L. Cooper.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
111/17/ :21 Graphics II Global Rendering and Radiosity Session 9.
Radisoity Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New.
Radiosity Jian Huang, CS594, Fall 2002 This set of slides reference the text book and slides used at Ohio State.
DPL11/27/2015 CS 551/651: Radiosity David Luebke
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Global Illumination: Radiosity, Photon Mapping & Path Tracing Rama Hoetzlein, 2009 Lecture Notes Cornell University.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces ­Not real scenes Rendering equation describes general shading problem.
CSCE 441: Computer Graphics Ray Tracing
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Lighting Lighting.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
Global Illumination (2) Radiosity (3). Classic Radiosity Algorithm Mesh Surfaces into Elements Compute Form Factors Between Elements Solve Linear System.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
Distributed Ray Tracing. Can you get this with ray tracing?
CS552: Computer Graphics Lecture 33: Illumination and Shading.
CS 376 Introduction to Computer Graphics 04 / 18 / 2007 Instructor: Michael Eckmann.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
CS552: Computer Graphics Lecture 36: Ray Tracing.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Radisoity Ed Angel Professor Emeritus of Computer Science
Radiosity Dr. Scott Schaefer.
CSCE 441 Computer Graphics: Radiosity
Illumination and Shading
Advanced Computer Graphics
CS 480/680 Computer Graphics Shading.
Presentation transcript:

CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity

Global Illumination Global Illumination (Angel Ch. 13) The notion that a point is illuminated by more than light from local lights; it is illuminated by all the emitters and reflectors in the global sceneThe notion that a point is illuminated by more than light from local lights; it is illuminated by all the emitters and reflectors in the global scene –Ray Tracing –Radiosity Global Illumination (Angel Ch. 13) The notion that a point is illuminated by more than light from local lights; it is illuminated by all the emitters and reflectors in the global sceneThe notion that a point is illuminated by more than light from local lights; it is illuminated by all the emitters and reflectors in the global scene –Ray Tracing –Radiosity

The ‘Rendering Equation’ Jim Kajiya (Current head of Microsoft Research) developed this in 1986 I(x, x’) is the total intensity from point x’ to x g(x, x’) = 0 when x/x’ are occluded and 1/d 2 otherwise (d = distance between x and x’)  (x, x’) is the intensity emitted by x’ to x  (x, x’,x’’) is the intensity of light reflected from x’’ to x through x’ S is all points on all surfaces Jim Kajiya (Current head of Microsoft Research) developed this in 1986 I(x, x’) is the total intensity from point x’ to x g(x, x’) = 0 when x/x’ are occluded and 1/d 2 otherwise (d = distance between x and x’)  (x, x’) is the intensity emitted by x’ to x  (x, x’,x’’) is the intensity of light reflected from x’’ to x through x’ S is all points on all surfaces

Recursive Ray Tracing Cast a ray from the viewer’s eye through each pixel Compute intersection of this ray with objects from scene Closest intersecting object determines color Cast a ray from the viewer’s eye through each pixel Compute intersection of this ray with objects from scene Closest intersecting object determines color

Recursive Ray Tracing For each ray cast from eyepoint If surface is struckIf surface is struck –Cast ray to each light source (shadow ray) –Cast reflected ray (feeler ray) –Cast transmitted ray (feeler ray) –Perform Phong lighting on all incoming light Note diffuse component of Phong lighting is not pushed through the systemNote diffuse component of Phong lighting is not pushed through the system For each ray cast from eyepoint If surface is struckIf surface is struck –Cast ray to each light source (shadow ray) –Cast reflected ray (feeler ray) –Cast transmitted ray (feeler ray) –Perform Phong lighting on all incoming light Note diffuse component of Phong lighting is not pushed through the systemNote diffuse component of Phong lighting is not pushed through the system

Recursive Ray Tracing Computing all shadow and feeler rays is slow Stop after fixed number of iterationsStop after fixed number of iterations Stop when energy contributed is below thresholdStop when energy contributed is below threshold Most work is spent testing ray/plane intersections Use bounding boxes to reduce comparisonsUse bounding boxes to reduce comparisons Use bounding volumes to group objectsUse bounding volumes to group objects Parallel computation (on shared-memory machines)Parallel computation (on shared-memory machines) Computing all shadow and feeler rays is slow Stop after fixed number of iterationsStop after fixed number of iterations Stop when energy contributed is below thresholdStop when energy contributed is below threshold Most work is spent testing ray/plane intersections Use bounding boxes to reduce comparisonsUse bounding boxes to reduce comparisons Use bounding volumes to group objectsUse bounding volumes to group objects Parallel computation (on shared-memory machines)Parallel computation (on shared-memory machines)

Recursive Ray Tracing Just a Sampling Method We’d like to cast infinite rays and combine illumination results to generate pixel valuesWe’d like to cast infinite rays and combine illumination results to generate pixel values Instead, we use pixel locations to guide ray castingInstead, we use pixel locations to guide ray castingProblems? Just a Sampling Method We’d like to cast infinite rays and combine illumination results to generate pixel valuesWe’d like to cast infinite rays and combine illumination results to generate pixel values Instead, we use pixel locations to guide ray castingInstead, we use pixel locations to guide ray castingProblems?

Problems With Ray Tracing AliasingAliasing –Supersampling –Stochastic Sampling –Examples on board Works best on specular surfaces (not diffuse)Works best on specular surfaces (not diffuse) –For perfectly specular surfaces  Ray tracing == rendering equation (subject to aliasing) AliasingAliasing –Supersampling –Stochastic Sampling –Examples on board Works best on specular surfaces (not diffuse)Works best on specular surfaces (not diffuse) –For perfectly specular surfaces  Ray tracing == rendering equation (subject to aliasing)

Radiosity Ray tracing models specular reflection and refractive transparency, but still uses an ambient term to account for other lighting effects Radiosity is the rate at which energy is emitted or reflected by a surface By conserving light energy in a volume, these radiosity effects can be traced Ray tracing models specular reflection and refractive transparency, but still uses an ambient term to account for other lighting effects Radiosity is the rate at which energy is emitted or reflected by a surface By conserving light energy in a volume, these radiosity effects can be traced

Radiosity All surfaces are assumed perfectly diffuse What does that mean about property of lighting in scene?What does that mean about property of lighting in scene? All surfaces are assumed perfectly diffuse What does that mean about property of lighting in scene?What does that mean about property of lighting in scene? –Light is reflected equally in all directions Same lighting independent of viewing angle / locationSame lighting independent of viewing angle / location –Only a subset of the Rendering Equation Diffuse-diffuse surface lighting effects possible Same lighting independent of viewing angle / locationSame lighting independent of viewing angle / location –Only a subset of the Rendering Equation Diffuse-diffuse surface lighting effects possible

Radiosity Equation Radiosity of patch ‘i’ is  i is the rate at which light is emitted (watts/m 2 )  i is patch i’s reflectivity F j,i is the form factor fraction of patch j that reaches patch i as determined by orientation of both patches and obstructionsfraction of patch j that reaches patch i as determined by orientation of both patches and obstructions Use A j /A i (Area of patch j / Area of patch I) to scale units to total light emitted by j as received per unit area by i Radiosity of patch ‘i’ is  i is the rate at which light is emitted (watts/m 2 )  i is patch i’s reflectivity F j,i is the form factor fraction of patch j that reaches patch i as determined by orientation of both patches and obstructionsfraction of patch j that reaches patch i as determined by orientation of both patches and obstructions Use A j /A i (Area of patch j / Area of patch I) to scale units to total light emitted by j as received per unit area by i

Radiosity Equation As n becomes large, summation becomes integral Radiosity equation then == Rendering equation All surfaces are perfectly diffuseAll surfaces are perfectly diffuse As n becomes large, summation becomes integral Radiosity equation then == Rendering equation All surfaces are perfectly diffuseAll surfaces are perfectly diffuse

Solving for all Patches One patch defined by: Symmetry: A i F i,j = A j F j,I Therefore: One patch defined by: Symmetry: A i F i,j = A j F j,I Therefore:

Solving for all Patches Putting into matrix form b = e – RFbb = e – RFb b = [I – RF] -1 eb = [I – RF] -1 e Use matrix algebra to solve for B i ’s Putting into matrix form b = e – RFbb = e – RFb b = [I – RF] -1 eb = [I – RF] -1 e Use matrix algebra to solve for B i ’s

Solving for all Patches Difficult to perform Gaussian Illumination and solve for b (size of F is large but sparse – why?) Instead, iterate: b k+1 = e – RFb k Multiplication of sparse matrix is O(n), not O(n 2 )Multiplication of sparse matrix is O(n), not O(n 2 ) Stop when b k+1 = b kStop when b k+1 = b k Difficult to perform Gaussian Illumination and solve for b (size of F is large but sparse – why?) Instead, iterate: b k+1 = e – RFb k Multiplication of sparse matrix is O(n), not O(n 2 )Multiplication of sparse matrix is O(n), not O(n 2 ) Stop when b k+1 = b kStop when b k+1 = b k

Solving for all Patches Alternative solution We know:We know: Therfore:Therfore: And solution for b is:And solution for b is: Alternative solution We know:We know: Therfore:Therfore: And solution for b is:And solution for b is:

Form Factors Compute n-by-n matrix of form factors to store radiosity relationships between each light patch and every other light patch H ij = 1 or 0 depending on occlusion

Form Factor – Another example Spherical projections to model form factor project polygon A j on unit hemisphere centered at (and tangent to) A iproject polygon A j on unit hemisphere centered at (and tangent to) A i –Contributes cos  j / r 2 Project this projection to base of hemisphereProject this projection to base of hemisphere –Contributes cos  i Divide this area by area of circle baseDivide this area by area of circle base –Contributes    Spherical projections to model form factor project polygon A j on unit hemisphere centered at (and tangent to) A iproject polygon A j on unit hemisphere centered at (and tangent to) A i –Contributes cos  j / r 2 Project this projection to base of hemisphereProject this projection to base of hemisphere –Contributes cos  i Divide this area by area of circle baseDivide this area by area of circle base –Contributes   

Form Factor – Another Model Hemicube allows faster computations Analytic solution of hemisphere is expensiveAnalytic solution of hemisphere is expensive Use rectangular approximation, hemicubeUse rectangular approximation, hemicube cosine terms for top and sides are simplifiedcosine terms for top and sides are simplified Dimension of 50 – 200 squares is goodDimension of 50 – 200 squares is good Hemicube allows faster computations Analytic solution of hemisphere is expensiveAnalytic solution of hemisphere is expensive Use rectangular approximation, hemicubeUse rectangular approximation, hemicube cosine terms for top and sides are simplifiedcosine terms for top and sides are simplified Dimension of 50 – 200 squares is goodDimension of 50 – 200 squares is good

Radiosity Radiosity is expensive to compute Get your PhD by improving itGet your PhD by improving it Some parts of illuminated world can change Emitted lightEmitted light ViewpointViewpoint Other things cannot Light anglesLight angles Object positions and occlusionsObject positions and occlusions Computing form factors is expensiveComputing form factors is expensive Specular reflection information is not modeled Radiosity is expensive to compute Get your PhD by improving itGet your PhD by improving it Some parts of illuminated world can change Emitted lightEmitted light ViewpointViewpoint Other things cannot Light anglesLight angles Object positions and occlusionsObject positions and occlusions Computing form factors is expensiveComputing form factors is expensive Specular reflection information is not modeled

View-dependent vs View-independent Ray-tracing models specular reflection well, but diffuse reflection is approximated Radiosity models diffuse reflection accurately, but specular reflection is ignored Advanced algorithms combine the two Ray-tracing models specular reflection well, but diffuse reflection is approximated Radiosity models diffuse reflection accurately, but specular reflection is ignored Advanced algorithms combine the two