SI31 Advanced Computer Graphics AGR

Slides:



Advertisements
Similar presentations
The Radiance Equation.
Advertisements

1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 17 Radiosity - Conclusion Non-PhotoRealistic Rendering.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...
GR2 Advanced Computer Graphics AGR
GR2 Advanced Computer Graphics AGR
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model.
15.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 15 – Visible Surfaces and Shadows.
GR2 Advanced Computer Graphics AGR
SI23 Introduction to Computer Graphics
SI23 Introduction to Computer Graphics
GR2 Advanced Computer Graphics AGR
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 16 Radiosity - continued.
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
7.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 7 Polygon Shading Techniques.
5.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 5 A Simple Reflection Model.
9.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
8.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 8 Polygon Rendering.
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
1 05/10/2014 Computer Graphics Lecture 10 Global Illumination 1: Ray Tracing and Radiosity Taku Komura.
25 seconds left…...
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
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.
Lighting and Illumination Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling Consider.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
Computer Graphics - Class 10
IMGD 1001: Illumination by Mark Claypool
16.1 si31_01 SI31 Advanced Computer Graphics AGR Lecture 16 Radiosity - continued.
7M836 Animation & Rendering
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.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
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.
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.:
-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.
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.
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
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.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Global Illumination (2) Radiosity (3). Classic Radiosity Algorithm Mesh Surfaces into Elements Compute Form Factors Between Elements Solve Linear System.
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics: Illumination
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
CSCE 441 Computer Graphics: Radiosity
Illumination and Shading
GR2 Advanced Computer Graphics AGR
Advanced Computer Graphics: Radiosity
Presentation transcript:

SI31 Advanced Computer Graphics AGR Lecture 15 Radiosity

Review First a review of the two rendering approaches we have studied: Phong reflection model ray tracing

Phong Reflection Model This is the most common approach to rendering objects represented as polygonal faces intensity of faces calculated by Phong local illumination model polygons projected to viewplane Gouraud shading applied with Z buffer to determine visibility I() = Ka()Ia() + ( Kd()( L . N ) + Ks( R . V )n ) I*() / dist

Phong Reflection Model Strengths simple and efficient models ambient, diffuse and specular reflection Limitations only considers light incident from a light source, and not inter-object reflections - ie it is a local illumination method (ambient term is approximation to global illumination empirical rather than theoretical base objects typically have plastic appearance

Ray Tracing Ray traced from viewpoint through pixel until first object intersected Colour calculated as summation of: local Phong reflection at that point specularly reflected light from direction of reflection transmitted light from refraction direction if transparent

Ray Tracing This is done recursively Colour of light incoming along reflection direction found by: tracing ray back until it hits an object colour of light emitted by object is itself summation of local component, reflected component and transmitted component and so on

Ray Tracing - Strengths and Weaknesses Advantages increased realism through ability to handle inter-object reflection Disadvantages much more expensive than local reflection still empirical only handles specular inter-object reflection entire calculation is view-dependent

Radiosity Based on the physics of heat transfer between surfaces Developed in 1980s at Cornell University in US (Cohen, Greenberg) Determine energy balance of light transfer between all surfaces in an enclosed space equilibrium reached between emission of light and partial absorption of light Assume surfaces are opaque, are perfect diffuse reflectors and are represented as sets of patches Ai

Radiosity Examples

Radiosity - Definition Radiosity defined as: energy (Bi ) per unit area leaving a surface patch (Ai ) per unit time Bi Ai = Ei Ai + Ri  ( Fj-i Bj Aj) i=1,2,..N j light leaving light emitted light reflected Ei is the light energy emitted by Ai per unit area Ri is the fraction of incident light reflected in all directions Fj-i is the fraction of energy leaving Aj that reaches Ai N is the number of patches

Radiosity - Pictorial Definition Form factor Fj-i is fraction of energy leaving Aj that reaches Ai. It is determined by the relative orientation of the patches and distance r between them Aj j r Nj Ni Form factors are hard to calculate! Let’s assume for now we can do it. i Ai Bi Ai = Ei Ai + Ri  (Fj-i Bj Aj) j

Simplifying the Equation Bi Ai = Ei Ai + Ri  (Fj-i Bj Aj) ie Bi Ai = Ei Ai + Ri  (Bj Fj-i Aj) j j There is a reciprocity relationship: Fj-i Aj = Fi-jAi Hence: Bi Ai = Ei Ai + Ri  (Bj Fi-j Ai) j So the radiosity of patch Ai is given by: Bi = Ei + Ri  ( Bj Fi-j ) j

Creating a System of Equations We get one equation for each patch assume we can calculate form factors then N equations for N unknowns B1,B2,..BN First equation is: (1-R1F1-1)B1 - (R1F1-2)B2 - (R1F1-3)B3 - .. - (R1F1-N)BN = E1 ..and we get in all N equations like this. Generally Fi-i will be zero - why? Most of the Ei will be zero - why? B1 = E1 + R1  ( Bj F1-j ) j

Solving the Equations Equations are solved iteratively - ie a first guess chosen, then repeatedly refined until deemed to converge Suppose we guess solution as: B1(0), B2(0), .. BN(0) Rewrite first equation as: B1 = E1 + (R1F1-2)B2 + .. + (R1F1-N)BN Then we can ‘improve’ estimate of B1 by: B1(1) = E1 + (R1F1-2)B2(0) + .. + (R1F1-N)BN(0) .. and so on for other Bi

Solving the Equations This gives an improved estimate: B1(1), B2(1), .. BN(1) and we can continue until the iteration converges. This is known as the Jacobi iterative method An improved method is Gauss-Seidel iteration this always uses best available values eg B1(1) (rather than B1(0) ) used to calculate B2(1), etc

Rendering What have we calculated? The Bi are the intensities of light emanating from each patch the form factors do not depend on wavelength , but the Ri do thus Bi depend on , so we need to calculate BiRED, BiGREEN, BiBLUE We get vertex intensities by averaging the intensities of surrounding faces Then we can pass to Gouraud renderer code for interpolated shading

Pause at this stage Number of equations can be very large Calculation is not view dependent Only diffuse reflection We still have not seen how to calculate the form factors! Their calculation dominates

Form Factors The calculation of the form factors is unfortunately quite hard We begin by looking at the form factor between two infinitesimal areas on the patches

Form Factors - Notation Form factor Fdi-dj gives the fraction of energy reaching dAj from dAi. Aj dAj Nj j Ni r i Ai r is distance between elements Ni, Nj are the normals i, j are angles made with normals by line joining elements dAi

Form Factor Calculation : 2D Cross Section View Draw in 2D but imagine this in 3D: * create unit hemisphere with dAi at centre * light emits/reflects equally in all directions from dAi * form factor Fdi-dj is fraction of energy reaching dAj from dAi dAi Aj dAj Ai

Form Factor Calculation : 2D Cross Section View We begin calculation by * projecting dAj onto the surface of the hemisphere (blue) * this resulting area is (cos j / r2 ) dAj dAi Aj dAj Nj j r This gives us the relative area of light energy reaching dAj from dAi

Form Factor Calculation : 2D Cross Section View But we need a measure per unit area of Ai so need to adjust for orientation of Ai This gives a ‘corrected’ area as: ( cos i cos j / r2 ) dAj dAi Aj dAj i

Form Factor Calculation : 2D Cross Section View Total energy comes from integrating over whole hemisphere - this comes to  Hence form factor is given by: Fdi-dj = ( cos i cos j ) / (  r2 )dAj dAi

Form Factor Calculation : 2D Cross Section View Finally we need to sum up for ALL dAj. This means integrating over the whole of the patch: Fdi-j =  (cos i cos j ) /(  r2 ) dAj dAi Aj Ai

Form Factor Calculation Strictly speaking, we should now integrate over all dAi. In practice, we take Fdi-j as representative of Fi-j and this assumption: Fi-j = Fdi-j works OK in practice. dAi Aj Ai However the calculation of the integral  (cos i cos j ) /(  r2 ) dAj is extremely difficult. Next lecture will discuss an approximation.