Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.

Slides:



Advertisements
Similar presentations
The Radiance Equation.
Advertisements

1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 16 Radiosity - continued.
SI31 Advanced Computer Graphics AGR
Computer Vision Radiometry. Bahadir K. Gunturk2 Radiometry Radiometry is the part of image formation concerned with the relation among the amounts of.
Computer graphics & visualization Global Illumination Effects.
Lecture 14 Illumination II – Global Models
Radiosity Mel Slater Department of Computer Science University College London
The Radiance Equation Mel Slater. Outline Introduction Light Simplifying Assumptions Radiance Reflectance The Radiance Equation Traditional Rendering.
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.
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.
Computer Graphics - Class 10
IMGD 1001: Illumination by Mark Claypool
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Radiosity A Fascinating Presentation by Alex Danilevky.
16.1 si31_01 SI31 Advanced Computer Graphics AGR Lecture 16 Radiosity - continued.
Everything on Global Illumination Xavier Granier - IMAGER/UBC.
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
The Radiosity Method Donald Fong February 10, 2004.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
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.
Fundamentals of Computer Graphics Part 6 Shading prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.
Today More raytracing stuff –Soft shadows and anti-aliasing More rendering methods –The text book is good on this –I’ll be using images from the CDROM.
-Global Illumination Techniques
01/29/03© 2003 University of Wisconsin Last Time Radiosity.
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.
02/16/05© 2005 University of Wisconsin Last Time Re-using paths –Irradiance Caching –Photon Mapping.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
02/18/05© 2005 University of Wisconsin Last Time Radiosity –Converting the LTE into the radiosity equation –Solving with Gauss-Seidel relaxation –Form.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
Introduction to Radiosity Geometry Group Discussion Session Jiajian (John) Chen 9/10/2007.
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
CPSC 641 Computer Graphics: Radiosity Jinxiang Chai.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
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.
Interactive Graphics Lecture 10: Slide 1 Interactive Computer Graphics Lecture 10 Introduction to Surface Construction.
Local Illumination and Shading
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
Computer Graphics (Fall 2003) COMS 4160, Lecture 20: Radiosity Ravi Ramamoorthi
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
Global Illumination (2) Radiosity (3). Classic Radiosity Algorithm Mesh Surfaces into Elements Compute Form Factors Between Elements Solve Linear System.
Global Illumination (2) Radiosity (2). The Radiosity Equation The "radiosity equation" describes the amount of energy which can be emitted from a surface,
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Radisoity Ed Angel Professor Emeritus of Computer Science
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Radiosity.
Computer Graphics (Spring 2003)
CSCE 441 Computer Graphics: Radiosity
© 2003 University of Wisconsin
Problems with Gauss-Seidel
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Lecture 25 Radiosity.
Illumination and Shading
OPTICS III, IV: Global Illumination
Radiosity Sung-Eui Yoon (윤성의) CS580: Course URL:
Advanced Computer Graphics: Radiosity
Presentation transcript:

Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues

Graphics Lecture 14: Slide 2

Graphics Lecture 14: Slide 3 The story so far Every polygon in a graphics scene radiates light. The light energy it radiates per unit area is called the RADIOSITY and denoted by letter B

Graphics Lecture 14: Slide 4 Lambertian Surfaces A lambertian surface is one that obeys Lambert’s Cosine law. Its reflected energy is the same in all directions. We can only calculate Radiosity for Lambertian Surfaces Incident Light Perfectly Matt surface The reflected intensity is the same in all directions

Graphics Lecture 14: Slide 5 The Radiosity Equation For patch i B i = E i + R i  B j F ij Ei is the light emitted by the patch (usually zero) R i  B j F ij is the Reflectance*Light energy arriving from all other patches F ij is the proportion of energy leaving patch j that reaches patch i

Graphics Lecture 14: Slide 6 Form Factors Fij F ij = cos  i cos  j Area(Aj) /  r 2 Big form factor perhaps 0.5 Further away thus smaller form factor perhaps 0.25 Not facing each other thus even smaller form factor perhaps 0.1

Graphics Lecture 14: Slide 7 Computing the Form Factors Direct Computation - 60,000 polygons (or patches)‏ - 3,600,000,000 form factors Computation takes forever - most of the results will be zero. Hemicube method Pre-compute the form factors on a hemicube For each patch ray trace through the hemicube

Graphics Lecture 14: Slide 8 The whole solution All that remains to be done is to solve the matrix equation:

Graphics Lecture 14: Slide 9 Summary of the Radiosity Method 1. Divide the graphics world into discrete patches Meshing strategies, meshing errors 2. Compute form factors by the hemicube method Alias errors 3. Solve the matrix equation for the radiosity of each patch. Computational strategies 4. Average the radiosity values at the corners of each patch Interpolation approximations 5. Compute a texture map of each point or render directly Now read on...

Graphics Lecture 14: Slide 10 Alias Errors Computation of the form factors will involve alias errors. This is equivalent to errors in texture mapping, due to discrete sampling of a continuous environment. However, as the alias errors are averaged over a large number of pixels the errors will not be significant.

Graphics Lecture 14: Slide 11 Form Factor reciprocity Form factors have a reciprocal relationship: F ij = cos  i cos  j Area(Aj) /  r 2 F ji = cos  i cos  j Area(Ai) /  r 2 F ji = F ij *Area(Ai) /Area(Aj)‏ Thus form factors for only half the patches need be computed.

Graphics Lecture 14: Slide 12 The number of form factors There will be a large number of form factors: for 60,000 patches, there are 3,600,000,000 form factors. We only need store half of these (reciprocity), but we will need four bytes for each, hence 7 Gbytes are needed. As many of them are zero we can save space by using an indexing scheme. (eg use one bit per form factor, bit = 0 implies form factor zero and not stored)‏

Graphics Lecture 14: Slide 13 Inverting the matrix Inverting the matrix can be done by the Gauss Siedel method: Each row of the matrix provides an equation of the form B i = E i + R i  B j F ij

Graphics Lecture 14: Slide 14 Inverting the matrix Gauss Siedel formulates an iterative method using the equation of each row Given: B i = E i + R i  B j F ij We use the iteration: B i k = E i + R i  B j k-1 F ij The initial values B i 0 may be set to zero

Graphics Lecture 14: Slide 15 Gauss-Siedel method for solving equations Given a scene with three patches: B 0  E 0 + R 0 (F 01 B 1 + F 02 B 2 )‏ B 1  E 1 + R 1 (F 10 B 0 + F 12 B 2 )‏ B 2  E 2 + R 2 (F 20 B 0 + F 21 B 1 )‏ and suppose we have numeric values B' 0  (0.2 B B 2 ) = 0.1 B B 2 B' 1  (0.2 B B 2 ) = B B 2 B' 2  (0.1 B B 1 ) = 0.02 B B 1

Graphics Lecture 14: Slide 16 Gauss-Siedel example - continued B 0  0.1 B B 2 B 1  B B 2 B 2  0.02 B B 1 Substitute first estimate B 0 =0; B 1 =0; B 2 =0 in RHS Compute next estimate B 0 =0; B 1 =5; B 2 =0 Substitute estimate B 0 =0; B 1 =5; B 2 =0 in RHS Compute next estimate B 0 =0.5; B 1 =5; B 2 =0.3

Graphics Lecture 14: Slide 17 Gauss-Siedel example - concluded B 0 = 0.1 B B 2 B 1 = B B 2 B 2 = 0.02 B B 1 Substitute estimate B 0 =0.5; B 1 =5; B 2 =0.3 in RHS Compute next estimate B 0 =0.515; B 1 =5.095; B 2 =0.31 The process eventually converges in this case

Graphics Lecture 14: Slide 18 Inverting the Matrix The Gauss Siedel inversion is stable and converges fast since the Ei terms are constant and correct at every iteration, and all Bi values are positive. At the first iteration the emitted light energy is distributed to those patches that are illuminated, in the next cycle, those patches illuminate others and so on. The image will start dark and progressively illuminate as the iteration proceeds

Graphics Lecture 14: Slide 19 Progressive Refinement The nature of the Gauss Siedel allows a partial solution to be rendered as the computation proceeds. Without altering the method we could render the image after each iteration, allowing the designer to stop the process and make corrections quickly. This may be particularly important if the scene is so large that we need to re-calculate the form factors every time we need them.

Graphics Lecture 14: Slide 20 Inverting the matrix The Gauss Siedel inversion can be modified to make it faster by making use of the fact that it is essentially distributing energy around the scene. The method is based on the idea of “shooting and gathering”, and also provides visual enhancement of the partial solution.

Graphics Lecture 14: Slide 21 Gathering Patches Evaluation of one B value using one line of the matrix: B i k = E i + R i  B j k-1 F ij is the process of gathering. Gathering patch

Graphics Lecture 14: Slide 22 Shooting Patches Suppose in an iteration Bi changes by  Bi. The change to every other patch can be found using: B j k = B j k-1 + R j F ji  B i k-1 This is the process of shooting, and is evaluating the matrix column wise. Shooting patch

Graphics Lecture 14: Slide 23 Evaluation Order The use of shooting allows us to choose an evaluation order that ensures fastest convergence. The patches with the largest change  B (called the unshot radiosiy) are evaluated first. The process starts by shooting the emitting patches, since at the first iteration  Bi = Ei

Graphics Lecture 14: Slide 24 Processing Unshot Radiosity Choose patch with largest unshot radiosity  Bi Shoot the radiosity, ie for all other patches calculate R j F ji  B i and add to the unshot radiosity Add  Bi to Bi, Set  Bi = 0 and iterate Unshot Radiosity Patch BnBn BnBn B2B2 B2B2 B1B1 B1B1 B0B0 B0B0

Graphics Lecture 14: Slide 25 Interpolation Strategies Visual artefacts do occur with interpolation strategies, but may not be significant for small patches Patch 1Patch 3Patch 2 True Radiosity Computed Radiosity Linear Interpolation (Gouraud)‏ Cubic Interpolation

Graphics Lecture 14: Slide 26 Meshing Meshing is the process of dividing the scene into patches. Meshing artifacts are scene dependent. The most obvious are called D 0 artifacts, caused by discontinuities in the radiosity function

Graphics Lecture 14: Slide 27 D o Artefacts Discontinuities in the radiosity are exacerbated by bad patching Polygon Patches Shadow Boundary Computed radiosity Patches incorrectly rendered (even after interpolation)‏

Graphics Lecture 14: Slide 28 Discontinuity Meshing (a priori)‏ The idea is to compute discontinuities in advance: eg Object Boundaries Albedo discontinuities (in texture)‏ Shadows (requires pre-processing by ray tracing)‏ etc

Graphics Lecture 14: Slide 29

Graphics Lecture 14: Slide 30 Adaptive Meshing (a posteriori)‏ The idea is to re-compute the mesh as part of the radiosity calculation: eg If two adjacent patches have a strong discontinuity in radiosity value, we: (i) put more patches (elements) into that area, or (ii) move the mesh boundary to coincide with the greatest change

Graphics Lecture 14: Slide 31 Subdivision of Patches (h refinement)‏ Compute the radiosity at the vertices of the coarse grid. Subdivide into elements if the discontinuities exceed a threshold Original coarse patches h-refinement elements

Graphics Lecture 14: Slide 32 Computational issues of h-refinement When a patch is divided into elements each element radiosity is computed using the original radiosity solution for all other patches. The assumptions are that (i) the radiosity of a patch is equal to the sum of the radiosity of its elements, and, (ii) the distribution of radiosities among elements of a patch do not affect the global solution significantly

Graphics Lecture 14: Slide 33 Patch Refinement (r refinement)‏ Compute the radiosity at the vertices of the coarse grid. Move the patch boundaries closer together if they have high radiosity changes Original patches Refined patches

Graphics Lecture 14: Slide 34 Patch refinement Unlike the other solution it would be necessary to re- compute the entire radiosity solution each refinement. However the method should make more efficient use of patches by shaping them correctly. Hence a smaller number of patches could be used.

Graphics Lecture 14: Slide 35 Adding Specularities We noted that specularities (being viewpoint dependent) cannot be calculated by the standard radiosity method. However, they could be added later by ray tracing. The complete ray tracing solution is not required, just the specular component in the viewpoint direction

Graphics Lecture 12: Slide 36