Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.

Slides:



Advertisements
Similar presentations
The Radiance Equation.
Advertisements

SI31 Advanced Computer Graphics AGR
Computer graphics & visualization Global Illumination Effects.
Radiosity Mel Slater Department of Computer Science University College London
Advanced Computer Graphics
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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
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.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Radiosity A Fascinating Presentation by Alex Danilevky.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
1 7M836 Animation & Rendering Global illumination, radiosity Arjan Kok
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
Recent Advances in Radiosity Philippe Bekaert Department of Computer Science K.U.Leuven.
The Radiosity Method Donald Fong February 10, 2004.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity
Paper by Alexander Keller
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
Computer Graphics (Spring 2008) COMS 4160, Lecture 22: Global Illumination
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Global Illumination Jian Huang, CS 594, Fall 2002 This set of slides reference text book and the course note of Dutre et. al on SIGGRAPH 2001.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.
-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.
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.
Volume radiosity Michal Roušal University of West Bohemia, Plzeň Czech republic.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.
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
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Pure Path Tracing: the Good and the Bad Path tracing concentrates on important paths only –Those that hit the eye –Those from bright emitters/reflectors.
Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces ­Not real scenes Rendering equation describes general shading problem.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
The Computation of Higher-Order Radiosity Approximations with a Stochastic Jacobi Iterative Method Ph. Bekaert, M. Sbert, Y Willems Department of Computer.
Global Illumination (3) Photon Mapping (1). Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map.
Global Illumination (2) Radiosity (3). Classic Radiosity Algorithm Mesh Surfaces into Elements Compute Form Factors Between Elements Solve Linear System.
02/07/03© 2003 University of Wisconsin Last Time Finite element approach Two-pass approaches.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Distributed Ray Tracing. Can you get this with ray tracing?
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer graphics III – Rendering equation and its solution
Computer Graphics: Illumination
Advanced Computer Graphics
The Rendering Equation
(c) 2002 University of Wisconsin
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Radiosity.
CSCE 441 Computer Graphics: Radiosity
(c) 2002 University of Wisconsin
OPTICS III, IV: Global Illumination
Distributed Ray Tracing
Presentation transcript:

Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology

2 Introduction Ray-tracing algorithms directly compute the intensity of light passing through the pixels of the virtual screen. In contrast, there exist methods that compute a so-called world space representation of the illumination in a three-dimensional scene. The main advantage of computing the illumination in object space is that generating new views of a model takes less work, compared to rendering from scratch.  Graphics hardware can be used for real-time rendering of an illuminated model with colors derived from the precomputed average diffuse illumination. Also path tracing can be augmented to exploit precomputed illumination in object space, allowing very high image quality.  It is called a two-pass method.

3 Introduction The most well-known algorithm for computing an object space representation of illumination is the classic radiosity method. Three classes of radiosity algorithms are discussed.  Stochastic relaxation methods It is based on stochastic adaptations of classic iterative solution methods for linear systems such as the Jacobi, Gauss-Seidel, or Southwell iterative methods.

4 Introduction Three classes of radiosity algorithms are discussed.  The solution of linear systems is one of the earliest applications of the Monte Carlo method. They are based on the notion of a discrete random walk.  The third class of Monte Carlo radiosity methods is very similar to the random walk methods for linear systems but solves the radiosity or rendering integral equation directly, rather than the radiosity linear system. The random walks of these methods are nothing but simulated photon trajectories.  The density of surface hit points of such trajectories is proportional to radiosity.

5 Introduction Such three classes of Monte Carlo radiosity methods can be made more efficient by applying variance-reduction techniques and low- discrepancy sampling. Monte Carlo radiosity methods all share one very important feature:  Unlike other radiosity algorithms, they do not require the computation and storage of so-called form factors.  This is possible because form factors can be interpreted as probabilities that can be sampled efficiently. Because the problems of accurate form factor computation and their storage are avoided, Monte Carlo radiosity methods can handle much larger models in a reliable way.  They are also significantly easier to implement and use than other radiosity methods.  They provide visual feedback very early on and converge gracefully.  They are much faster.

6 Classic Radiosity The basic idea of the classic radiosity method is to compute the average radiosity B i on each surface element or patch i of a three-dimensional model.

7 Classic Radiosity The input of the classic radiosity method consists of a list of patches (triangles, for example) with their average self-emitted radiosity B i (left) and reflectivity ρ i (middle) given. These data suffice in order to compute the average total radiosities Bi (right), including the effect of light bouncing around. The computed radiosities are converted to display colors for each patch. The resulting illuminated model can be rendered from any viewpoint, at interactive rates using graphics hardware.

8 Classic Radiosity The input consists of a list of such patches.  Most often the patches are triangles or convex quadrilaterals.  Or quadratic surface patches have been explored as well. With each patch i, the self-emitted radiosity B i e (dimensions: [W/m 2 ]) and reflectivity ρ i (dimensionless) are given. The self-emitted radiosity is the radiosity that a patch emits on its own, even if there were no other patches in the model or all other patches were perfectly black. The reflectivity is a number between 0 and 1.  It indicates what fraction of the power incident on the patch gets reflected.  The rest gets absorbed.

9 Classic Radiosity Such data suffice in order to compute the total emitted radiosity B i (dfimensions:[W/m 2 ]) by each patch, containing the radiosity received via any number of bounces from other patches in the scene as well as the self-emitted radiosity. Visualization from an arbitrary viewpoint can be done using graphics hardware, allowing interactive walks through an illuminated model. The classic radiosity method is an instance of a larger class of numerical methods called finite element methods. There exist many advanced techniques based on the classic radiosity method but in this class only a concise derivation of the underlying equations are presented.

10 Classic Radiosity There are three different ways to describe the classic radiosity method.  By the general rendering equation.  By a simplification of it for purely diffuse environments  By a discretized version of the latter.

11 Classic Radiosity The General Rendering Equation  Light transport in a three-dimensional environment is described by the rendering equation.  The average radiosity B i emitted by a surface patch i with area A i is therefore given by where

12 Classic Radiosity The Radiosity Integral Equation  On purely diffuse surfaces, self-emitted radiance L e (x) and the BRDF f r (x) do not depend on directions Θ and Θ’. The rendering equation then becomes  The incident radiance L(x<-Θ’) still depends on incident direction.

13 Classic Radiosity The Radiosity Integral Equation  The integral over the hemisphere can be transformed into an integral over all surfaces S in the scene.  The result is an integral equation in which no directions appear anymore.

14 Classic Radiosity The Radiosity Integral Equation  In a diffuse environment, radiosity and radiance are related as B(x) = πL e (x).  Multiplication by π of the left-and right-hand sides of the equation yields the radiosity integral equation:

15 Classic Radiosity The Radiosity Integral Equation  The kernel of the integral equation is  Θ xy is the direction pointing from x to y.  R 2 xy is the square distance between x and y.  V(x,y) is the visibility predicate.

16 Classic Radiosity The Radiosity Integral Equation  B i becomes

17 Classic Radiosity The Radiosity System of Linear Equations  Often, integral equations are solved by reducing them to an approximate system of linear equations by means of a procedure known as Galerkin discretization.  Let’s assume the radiosity B(x) is constant on each patch i, B(x) = B’ i, x ∈ S i.

18 Classic Radiosity The Radiosity System of Linear Equations  The equation B(x) can be converted into a linear system

19 Classic Radiosity The Radiosity System of Linear Equations  If we now also assume that the reflectivity is constant over each patch, ρ(x) = ρ i, x ∈ S i, the following classical radiosity system of equations results:

20 Classic Radiosity The Radiosity System of Linear Equations  The radiosities B’I that result after solving the system of linear equations are only an approximation for the average radiosities.  The true radiosity B(y), which was replaced by B’j in the equation is in practice only very rarely piecewise constant. For this reason, we will denote both the average radiosity and the radiosity coefficients by B i.

21 Classic Radiosity The steps of the classic radiosity method.  Discretization of the input geometry into patches i. For each resulting patch I, a radiosity value (per considered wavelength) B i will be computed.  Computation of form factors F ij for every pair of patches i and j.  Numerical solution of the radiosity system of linear equations.  Display of the solution, including the transformation of the resulting radiosity values Bi (one for each patch and considered wavelength) to display colors.  This involves tone mapping and gamma correction.

22 Classic Radiosity In practice these steps are interwined.  Form factors are only computed when they are needed.  Intermediate results are displayed during system solution.  In adaptive and hierarchical radiosity, discretization is performed during system solution.

23 Classic Radiosity Each step of the classic radiosity method is nontrivial. Problems  Solving the linear systems It could be very large. However, the radiosity system of linear equations is very well-behaved. So simple iterative methods such as Jacobi or Gauss- Seidel iterations converge after relatively few iterations.

24 Classic Radiosity Problems  Scene discretization The patches should be small enough to capture illumination variations such as near shadow boundaries.  The radiosity B(x) across each patch needs to be approximately constant. The number of patches shouldn’t be too large.  This would result in exaggerated storage requirements and computation times.

25 Classic Radiosity Problems  Scene discretization The image artifacts that may result from an improper discretization.

26 Classic Radiosity Meshing artifacts in radiosity with constant approximations (left) include undesired shading discontinuities along patch edges. Gouraud shading can be used to blur these discontinuities. Wherever the radiosity varies smoothly, a higher-order approximation of radiosity on each patch results in a more accurate image on the same mesh.  However, artifacts remain near discontinuities such as shadow boundaries.

27 Classic Radiosity Problems  Form factor computation Even simple objects in a scene may have to be tessellated into thousands of small patches each, on which the radiosity can be assumed to be constant.  For this reason, scenes with hundreds of thousands of patches are quite normal. Between each pair of patches, a form factor needs to be computed.  The number of form factors can thus be huge so that the mere storage of form factors in computer memory is a major problem.

28 Classic Radiosity Problems  Form factor computation Each form factor requires the solution of a nontrivial, four-dimensional integral.  The integral will be singular for abutting patches, where the distance r xy in the denominator vanishes.  The integrand can also exhibit discontinuities of various degrees due to changing visibility.

29 Classic Radiosity The form factor integral contains the square distance between points in the denominator.  This causes a singularity for abutting patches (left).  Changing visibility introduces discontinuities of various degrees in the form factor integrand (right). Due to this problem, reliable form factor integration is a difficult task.

30 Classic Radiosity To handle such problems,  Custom algorithms form factor integration: hemicube algorithm, shaft culling ray- tracing acceleration, etc.  Discontinuity meshing  Adaptive and hierarchical subdivision,  Clustering  Form factor caching strategies  Use of view importance  Higher-order radiosity approximations

31 The Form Factors The robust and efficient computation of the form factors F ij, between each pair of input patches is a major problem with the classic radiosity method.  The form factors can be viewed as probabilities. The fact that form factors are probabilities that can be sampled efficiently leads to algorithms that allow us to solve the radiosity system of equations without the need to ever compute the value of a form factor.

32 The Form Factors The form factor F ij is given by the following four-dimensional integral:

33 The Form Factors Properties  The form factors are all positive or zero in a scene consisting of closed, opaque objects. They cannot be negative because the integrand is positive or zero. They will be equal to zero for a pair of patches i and j that are mutually invisible.

34 The Form Factors Properties  The form factors F ij between a patch i and all other patches j in a scene sum to at most one. If the scene is closed, then

35 The Form Factors Properties  The form factors F ij between a patch i and all other patches j in a scene sum to at most one. If the scene is not closed, the sum of the form factors is less than 1.

36 The Form Factors Properties  The form factors satisfy the following reciprocity relation:

37 The Form Factors  The second contribution is the fraction of the irradiance Σ j F ij B j at i that gets reflected. The form factor F ij indicates what fraction of the irradiance on i originates at j. Radiosities and fluxes are related as P i = A i B i and P ei = A i B ei.

38 The Form Factors By multiplying both sides by A i and using the reciprocity relation for the form factors, we get a system of linear equations relating the power P i emitted by the patches in a scene.

39 The Form Factors This system states that the power P i emitted by patch i also consists of two parts:  The self-emitted power P ei  The power received and reflected from other patches j. The form factor F ji indicates the fraction of power emitted by j that lands on i, or conversely, F ij indicates the fraction of power emitted by i that lands on j.

40 The Form Factors Since there is conservation of radiance, the total amount of power emitted by i and received on other patches j must equal P i in a closed scene. In a nonclosed scene, some part of the power P i will disappear into the background, explaining why the sum of the form factors F ij will be less than 1 in that case.

41 The Form Factors Form Factor Sampling Using Local Lines  Let i be the source of a number of N i of virtual particles that behave like photons originating on a diffuse surface.  The number N ij of these particles that land on the second patch j yields an estimate for the form factor: N ij /N i ≈F ij.

42 The Form Factors Form Factor Sampling Using Local Lines  Consider a particle originating at a uniformly chosen location x on S i and being shot into a cosine-distributed direction Θ with regard to the surface normal N x at x. The probability density p(x,Θ) associated with such a particle is

43 The Form Factors Form Factor Sampling Using Local Lines  The PDF is properly normalized:

44 The Form Factors Form Factor Sampling Using Local Lines  Let χ j (x,Θ) be a predicate taking value 1 or 0 depending on whether or not the ray shot from x into Θ hits a second patch j.  The probability P ij that such a ray lands on a second patch j then is 

45 The Form Factors Form Factor Sampling Using Local Lines  When shooting N i such particles from i, the expected number of this on patch j will be N i F ij.  The more particles shot from i (greater N i ), the better the ratio N ij /N i will approximate F ij.  We will not need to compute form factors explicitly. The important thing for us is that the probability that a single such particle hits a patch j equals the form factor F ij. If we are given a patch i, we can select a subsequent patch j among all patches in the scene, with probability equal to the form factor F ij by shooting a ray from i.