COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2003 1 Global illumination algorithms Graphics.

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
Advertisements

SI31 Advanced Computer Graphics AGR
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
Computer graphics & visualization Global Illumination Effects.
Lecture 14 Illumination II – Global Models
3D Graphics Rendering and Terrain Modeling
Radiosity Mel Slater Department of Computer Science University College London
CLASS 9 ADVANCE RENDERING RAY TRACING RADIOSITY LIGHT FIELD CS770/870.
Shadow Rendering Techniques A point is in the shadow of a light source if it can not be “seen” by the light source, i.e. the line segment that connects.
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.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
May Visible Surface Detection Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
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.
Illumination Model & Surface-rendering Method 박 경 와.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
IMGD 1001: Illumination by Mark Claypool
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
16.1 si31_01 SI31 Advanced Computer Graphics AGR Lecture 16 Radiosity - continued.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
7M836 Animation & Rendering
1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
The Radiosity Method Donald Fong February 10, 2004.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
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.:
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
-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.
02/16/05© 2005 University of Wisconsin Last Time Re-using paths –Irradiance Caching –Photon Mapping.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
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.
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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Visual Appearance K. H. Ko Department of Mechatronics Gwangju Institute.
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
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
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 Radiosity Radiosity.
1. Ray Casting Surface intersection Visible surface detection Ray Tracing Bounce the ray Collecting intensity Technique for global reflection and transmission.
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,
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
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)
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.
3D Graphics Rendering PPT By Ricardo Veguilla.
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Radiosity.
CSCE 441 Computer Graphics: Radiosity
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Lecture 25 Radiosity.
Illumination and Shading
GR2 Advanced Computer Graphics AGR
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Graphics Systems / Computer Graphics and Interfaces

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Objective: calculating the color of each point from the direct illumination of a light source, plus the sum of all reflections from nearby surfaces. In models local lightingAs seen above, the color of each point is defined by the light intensity that reaches directly by one or more light sources. Global illumination with respect to Equation Rendering: Global illumination algorithms to study: Ray Tracing Radiosity I (x, x ') Lighting x 'over x g (x, x ') Geometric term: = 0 If x and x ' not mutually come = 1 / r 2 If x and x ' have come ( r : Dist. between them) Ɛ (x, x ') Light emission from x 'to x ρ(X, x ', x'') Perc. Lighting coming from x'' and that is reflected in x ' toward x

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray Tracing Ray Tracing The algorithm is an extension to the Algorithm Ray-Casting previously seen. The algorithm depends on the position of the observer (view dependent algorithm). The viewing plane is discretized at sampling points (pixels or...); It is passed by each sampling point, a light ray that the observer toward the inside of the scene. The track (tracing) each beam will allow to consider the contributions of reflection between nearby faces. R 1 is the vector of maximum reflection: R 1 = V - 2 (V.N) N The initial light intensity is: I = I local K = the I the + K d (N.L) pixels observer R1R1 Light Shadow ray V

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray Tracing The interception of the reflected beam with the remaining objects are registered for the contributions of these in spot lighting. The attenuation due to the distance of the face may be considered. The process is recursive. pixels observer light The light intensity is now: I = I local + K r * I reflection I reflection is recursively calculated k r is a coefficient of reflection (similar to k s ) Note: In each interception is necessary to determine what the closest object.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray Tracing If objects are transparent or semitransparent is necessary to consider the rays transmitted into the interior of the object (or outside). For example, the radius T 1 and T 2. pixels observer light T2T2 The calculation of the intensity is now: I = I local + K r * I reflected + K t * I transmitted I reflected and R transmitted are calculated recursively T1T1

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray Tracing For each pixel builds up a tree of intersections. The final pixel color is determined by traversing the tree from the leaves to the root and calculating the contributions of each branch according to the model of reflection. In opaque objects there is the transmitted beam. The branch of the tree ends when the beam hits a reflector or not the branch object reaches a certain predetermined depth

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray Tracing The Ray Tracing algorithm is advantageous because: shadows, reflections and refractions are easily incorporated simulates reasonably well the specular effects The Ray Tracing algorithm has high computational costs because: the cost of calculating the intersections is high does not simulate well the effects of diffuse lighting (Need for other variants, more complex) The optimization is done in two areas: 1.Decreased number of rays to be processed. 2.Decreased number of intersections testing Software Freeware Ray-Tracing:

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray Tracing Decreased number of rays to be processed –"Item Buffers" - Are determined which areas of the screen where are the objects (pre-process /, ZBuffer) –"Adaptive Tree-Depth Control" - No need to carry all the branches of the tree shading to its maximum depth (importance of a light beam on a pixel belonging, diminishing reflection or transmission) –"Light-Buffers" - Each light source lists are associated with the objects that surround it (in each direction and order of removal); processing an intersection rays are generated by reflection, and transmission for the light sources; the latter, since its direction defined, have limited the chances of intersection with the objects that are in the respective list.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray Tracing Decreased number of intersections testing –Volumes Surrounds - Before making the intersection of a ray with an object test, tries to its intersection with a simple volume (usually a box) surrounding the object. This pretest is very fast (the box is lined faces with three axles) and immediately excludes many complex intersection tests. –Hierarchical Organization of Volumes Surrounds - The use of encircling volumes of other surrounding volumes saves many tests of intersection: if a ray does not intersect a volume, then also does not intersect the packages therein. –Space division dimensional Grids - Each cell resulting from this division knows the objects it contains, wholly or partially. According to the position and direction of the ray in question, only certain cells are visited and thus only the objects contained therein are tested. Because the order of progression in cells is defined by the direction of the ray, the first cell where an intersection Sense ends the process of visiting the radius to the cells.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Ray-Tracing

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity The algorithm is independent of the observation point. The algorithm performs only really calculate lighting; works in the object space. It is complemented by an algorithm of visibility for the production of the final image. Processing phases: 1. Modelling the interactions between objects and light sources, without considering the position of the observer. 2. Creates the image considering the observer performs the calculation of visibility (eg Z- buffering) polygons and shading (Gouraud). In previous models, the light sources were treated differently from surfaces illuminating way. On the contrary, radiosity methods consider that all surfaces are (self-) emit light. Thus, the light sources are modeled as normal surfaces to a given area. The method assumes that the processes of emission and reflection are ideal diffuse. Need the discretized faces patches to ensure that the area corresponding to a Patch the radiosity is constant.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity The radiosity (B i ) Is defined as the energy expelled per unit of time and area by a PatchAnd consists of two parts: B i The i = E i The i + ρ i  j (F j-i B j The j ) B i = E i + ρ i  j (F j-i B j The j / A i ) energy expelled energy issued energy reflected Per unit area: B i - radiosity expelled energy Patch in watts / m 2 E i - light emission (self-issued) by Patch i ρ i - reflectivity percentage of incident energy that is reflected by Patch i F j-i - form factor, percentage of energy that leaves the patch j and reaches i

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity In pervasive environments, there is the following relationship of reciprocity between form factors: The i. F i-j = A j. F j-i Thus, the interaction of light between patches can be represented by a linear system of equations: That applied in the previous expression of radiosity results in: B i = E i + ρ i  j B j F i-j Or: B i - ρ i  j B j F i-j = E i

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity Image creation: 1.Solving the system of equations for Gaussian elimination is obtained for each radiosity Patch. 2.Set the position of the observer. 3.Applying an algorithm for visibility, for example, Z-buffer. 4.Calculate the radiosity of the vertices of each polygon. 5.Apply color interpolation (Gouraud). The same solution of the system is used for any position of the observer. It is necessary to solve the system of equations again if there is a change of relative positions of objects, because it alters the form factors, or if we change the value E each Patch. Factors Shape? The complexity of the method is the calculation of radiosity form factors.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity Form Factors The form factor Fij represents the fraction (percentage) of the total energy expelled by patch "i" that reaches the patch "j"Taking into account the shape, orientation and relative distance between the two patches, as well as obstacles that obstruct the path. The form factor of the differential area dA i for the differential area dA j is given by: H ij is 1 or 0, depending on dA j be visible or not from dA i.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity To determine F di-j, The form factor of differential area dA i for the finite area The j,integrated area of patch j: Finally the form factor of area The i for the area The j is given by: It is found that the calculation of the Form Factor F di-j corresponds to design the parts of The j visible from dA i a hemisphere centered dA i,designing then this projection orthographic form the base of the hemisphere and dividing by the area of ​​ the circle. (Analogy Nusselt) The calculation is complex.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity Simplification of Cohen and Greenberg: Method hemicube Instead of using the projection in a hemisphere projected on top of a cube centered at dA i, With the top of the cube parallel to the surface. Each face of the hemicube is divided into a number of square cells of equal size (ie 50 by 50)

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity The i NiNi The j Project The j in hemicube, noting the square (mini-patch) that are covered. To register which every square patches The j and its distance. Saving only the closest since they will be invisible other: an algorithm for visibility in the image space, eventually (usually...) Z-Buffer!

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Radiosity The i NiNi The j Are calculated form factors for each elementary cell of hemicube, F q for square q. The form factor F i-j is then obtained by summing all contributions from squares covered by the patch j. F i-j =  F q Problems radiosity algorithm: - Algorithm computationally heavy processing and memory utilization. - For precisely the division of objects is required patches small (N> 1000). Implies N 2 form factors to calculate.

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Radiosity

COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Radiosity Progressive Refinement Radiosity –Solving the system of linear equations... Iterative methods with convergence to the final solution Use of the intermediate results as "provisional" –Image is displayed from the beginning of the calculations Quality of the results will improve with processing time Binding Ray-tracing radiosity + –Exploration of what each better processes... Ray-Tracing: specular reflection Radiosity: diffuse reflection