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
Computer graphics & visualization Global Illumination Effects.
Advertisements

Photorealistic Rendering. Ray tracing v. photorealistic rendering What illumination effects are not captured by ray tracing? What illumination effects.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Photon Tracing with Arbitrary Materials Patrick Yau.
Function Optimization Newton’s Method. Conjugate Gradients
Radiosity A Fascinating Presentation by Alex Danilevky.
16.1 si31_01 SI31 Advanced Computer Graphics AGR Lecture 16 Radiosity - continued.
Ensemble Learning: An Introduction
Everything on Global Illumination Xavier Granier - IMAGER/UBC.
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.
1 Monte Carlo Global Illumination Brandon Lloyd COMP 238 December 16, 2002.
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.
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.
Lecture 12 Monte Carlo Simulations Useful web sites:
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.
Curve Modeling Bézier Curves
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Global Illumination. Direct Illumination vs. Global Illumination reflected, scattered and focused light (not discreet). physical-based light transport.
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.
David Luebke 1 10/12/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
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.
Module 1: Statistical Issues in Micro simulation Paul Sousa.
1 Lesson 8: Basic Monte Carlo integration We begin the 2 nd phase of our course: Study of general mathematics of MC We begin the 2 nd phase of our course:
Volume radiosity Michal Roušal University of West Bohemia, Plzeň Czech republic.
Simulated Annealing.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
111/17/ :21 Graphics II Global Rendering and Radiosity Session 9.
Radiosity Jian Huang, CS594, Fall 2002 This set of slides reference the text book and slides used at Ohio State.
Iteration Solution of the Global Illumination Problem László Szirmay-Kalos.
Monte-Carlo Ray Tracing and
Sampling and estimation Petter Mostad
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.
1 1 Slide © 2004 Thomson/South-Western Simulation n Simulation is one of the most frequently employed management science techniques. n It is typically.
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.
Monte Carlo Linear Algebra Techniques and Their Parallelization Ashok Srinivasan Computer Science Florida State University
Computer Graphics (Fall 2003) COMS 4160, Lecture 20: Radiosity Ravi Ramamoorthi
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity 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 (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.
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.
Analysis of Solutions of 2 nd Order Stochastic Parabolic Equations. Erik Schmidt. University of Wyoming Department of Mathematics. WY NASA Space Grant.
Computer graphics III – Rendering equation and its solution
Monte Carlo Linear Algebra Techniques and Their Parallelization Ashok Srinivasan Computer Science Florida State University
Lesson 8: Basic Monte Carlo integration
Path Tracing (some material from University of Wisconsin)
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Radiosity.
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
CSCE 441 Computer Graphics: Radiosity
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Lecture 25 Radiosity.
Monte Carlo I Previous lecture Analytical illumination formula
OPTICS III, IV: Global Illumination
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 The Form Factors Form Factor Sampling Using Global Lines  The previous algorithm requires us to shoot local lines, lines with an origin and direction selected with regard to a particular patch i in the scene.  There are, however, a number of algorithms for form factor sampling based on uniformly distributed global lines. The origin and direction of global lines is chosen irrespective of any particular surface in the scene by connecting uniformly distributed sample points on a bounding sphere for the scene. The probability of finding an intersection of such lines at any given surface location is uniform regardless of actual scene geometry.

3 The Form Factors Form Factor Sampling Using Global Lines  Lines constructed like that will cross several surfaces in the scene.  The intersection points with the intersected surfaces define spans of mutually visible patches along the line.

4 The Form Factors

5 Form Factor Sampling Using Global Lines  Each such line span corresponds to two local cosine-distributed lines-one in both directions along the line. The global uniformly distributed lines are uniformly distributed with regard to every patch in the scene. This is unlike local lines, which are uniformly distributed only with regard to the patch on which the origin was sampled.  The probability that a global uniform line, generated with the algorithms, intersects a given patch i is proportional to the surface Area A i.

6 The Form Factors Form Factor Sampling Using Global Lines  If N global lines are generated, the number N i of lines crossing a patch i will be N i ≈N A i /A T.  It can be shown that if N ij is the number of lines that have successive intersections with the surfaces in the scene on patch i and j, then N ij /N i ≈F ij.  The main advantage of global lines over local lines is that geometric scene coherence can be exploited in order to generate global lines more efficiently. For the same computation cost, more global line spans can be generated than local lines.

7 The Form Factors Form Factor Sampling Using Global Lines  The main limitation of global lines with regard to local lines is that their construction cannot easily be adapted in order to increase or decrease the line density on a given patch. In particular, when used for form factor calculation, it can be shown that the form factor variance is approximately inversely proportional to the area A i of the source patch i.

8 Stochastic Relaxation Radiosity The algorithms using form factor sampling solve the radiosity system of equations.  By doing so, the form factor will appear in the numerator and denominator of the mathematical expressions to be evaluated.  So their numerical value will never be needed. The difficult problems of accurately computing form factors and their storage are simply avoided.  They do not only require less storage, but for all but the simplest models, they also finish in less computation time. These algorithms allow much larger models to be rendered with a fraction of the storage cost of other radiosity algorithms. In addition, Monte Carlo radiosity algorithms have a much better time complexity.

9 Stochastic Relaxation Radiosity There are basically two approaches to solve the radiosity system of linear equations by means of Monte Carlo methods.  Stochastic relaxation methods. The radiosity system is solved using an iterative solution method such as Jacobi, Gauss-Seidel, or South well iterations.  Discrete random walk methods.

10 Stochastic Relaxation Radiosity The Jacobi Iterative Method for Radiosity  Jacobi Iterative method Explanation!!!

11 Stochastic Relaxation Radiosity The Jacobi Iterative Method for Radiosity  The vectors x and e correspond to a distribution of light power over the surfaces of a scene. x = e + Ax A: contraction x: fixed point  The radiosity or power system matrix models a single bounce of light interreflection in the scene. Multiplication with the self-emitted radiosity or power vector results in direct illumination. When applied to direct illumination, one-bounce indirect illumination is obtained. Each Jacobi iteration consists of computing a single bounce of light interreflection, followed by re-adding self-emitted power. The equilibrium illumination distribution in a scene is the fixed point of this process.

12 Stochastic Relaxation Radiosity The Jacobi Iterative Method for Radiosity  Simulating a single bounce of light interreflection is an easier problem than simulating any number of bounces at once.

13 Stochastic Relaxation Radiosity Regular Gathering of Radiosity  Given the radiosity equation  As the starting radiosity distribution B (0) i =B ei, self- emitted radiosity can be taken.  A next approximation B (k+1) i is then obtained by filling in the previous approximation B (k) in the right-hand side of the equation.

14 Stochastic Relaxation Radiosity Regular Gathering of Radiosity  A hemicube algorithm allows us to compute all form factors F ij for fixed patch i simultaneously. Iteration steps according to the above scheme can be interpreted as gathering steps. In each step, the previous radiosity approximations B (k) j for all patches j are “gathered” in order to obtain a new approximation for the radiosity B (k+1) at i.

15 Stochastic Relaxation Radiosity Regular shooting of Power  When applied to the power system, a shooting variant of the above iteration algorithm follows:  Using a hemicube-like algorithm one can compute all form factors F ji for fixed j and variable i at a time.  In each step of the resulting algorithm, the power estimate P (k+1) i of all patches i, visible from j, will be updated based on P (k) j : j “shoots” its power towards all other patches i.

16 Stochastic Relaxation Radiosity Incremental Shooting of Power  Each regular power-shooting iteration replaces the previous approximation of power P (k) by a new approximation P (k+1).  It is possible to construct iterations in which unshot power is propagated rather than total power.  An approximation for the total power is then obtained as the sum of increments ΔP (k) computed in each iteration step:

17 Stochastic Relaxation Radiosity With deterministic summation, there is no difference between the results after complete iterations with the three iteration schemes. The computation cost of each iteration is quadratic in the number of patches.

18 Stochastic Relaxation Radiosity Stochastic Jacobi Radiosity  What happens if the sums in the iteration formulae are estimated using a Monte Carlo method?  Sums can be estimated stochastically by randomly picking terms from the sum according to some probability. The average ratio of the value of the picked terms, over the probability by which they have been picked, yields an unbiased estimate for the sum.  When applied to the iteration formulae for radiosity, this procedure corresponds to a straightforward simulation of single bounce light interreflection by tracing one-bounce photon paths.

19 Stochastic Relaxation Radiosity Stochastic Incremental Shooting of Power  Consider the incremental power shooting iterations.  We write the sum Σ j ΔP (k) j F ji ρ i. As a double sum, by introducing Kronecker’s delta function δ li = 1 if l = i and 0 if l≠i.

20 Stochastic Relaxation Radiosity Stochastic Incremental Shooting of Power  The double sum can be estimated stochastically using any of the form factor sampling algorithms.

21 Stochastic Relaxation Radiosity Stochastic Incremental Shooting of Power

22 Stochastic Relaxation Radiosity Stochastic Incremental Shooting of Power

23 An explanation on this figure is required.

24 Stochastic Relaxation Radiosity Stochastic Incremental Shooting of Power  The procedure can be used to estimate ΔP (k+1) i for all patches i simultaneously.

25 Stochastic Relaxation Radiosity Stochastic Regular Shooting of Power  The sums in regular power-shooting iterations can be estimated using a very similar Monte Carlo method for incremental power shooting.  The first stochastic Jacobi radiosity algorithms consisted entirely of such iterations. Unlike its deterministic counterpart, the resulting radiosity solutions of each iteration are averaged, rather than having the result of a new iteration replace the previous solution.  The main disadvantage of using only regular iterations is that higher-order interreflections appeared in the result only at a slow pace, especially in bright environments. The warming-up or burn-in problem

26 Stochastic Relaxation Radiosity Stochastic Regular Shooting of Power  The warming-up problem can be avoided by first performing a sequence of incremental power-shooting iterations until convergence is obtained. This results in a first complete radiosity solution, including higher- order interrflections. Especially when the number of samples N is rather low, this first complete solution will exhibit noisy artifacts.  Stochastic regular power-shooting iterations can then be used in order to reduce these artifacts.  A regular power-shooting iteration can be viewed as a transformation, transforming a first complete radiosity solution into a new complete one.  The average of the two radiosity distributions obtained subsequently is to good approximation the same as the result of one iteration with twice the number of samples.

27 Stochastic Relaxation Radiosity Stochastic Rgular Gathering of Radiosity  Regular radiosity gathering iterations can be converted into a stochastic variant using the procedure.  The main difference with power-shooting iterations is that a new radiosity estimate is obtained as the average score associated with rays that are shot from each patch i, rather than from rays that land on i.  Gathering iterations are mainly useful to clean up noisy artifacts from small patches, which have a small chance of being hit by rays in a shooting iteration and therefore exhibit a high variance.

28 Stochastic Relaxation Radiosity Several questions remain to be answered.  How shall the number of samples N be chosen?  When will the presented algorithms perform well?  When will they be suboptimal?  How do they compare?

29 Stochastic Relaxation Radiosity The most expensive operation in the algorithms is ray shooting.  The number of rays that needs to be shot in order to compute the radiosities in the scene to given accuracy with given confidence is determined by the variance of the involved estimators.

30 Stochastic Relaxation Radiosity Incremental Shooting  The variance on the resulting radiosity estimates Bi for each patch i is, to good approximation, given by In particular, it is inversely proportional to the surface area A i, meaning that incremental shooting will not be the optimal solution for small patches.

31 Stochastic Relaxation Radiosity Incremental Shooting  The number of samples N shall be chosen proportional to the amount of power ΔP (k) T to be propagated in each iteration, so that rays always carry the same amount of power. A heuristic for the total number of rays in a sequence of iterations until convergence is

32 Stochastic Relaxation Radiosity Incremental Shooting In practice, it makes a lot of sense to skip the 10% of patches in a scene with the largest ratio ρ i /A i. Note that a rough heuristic for N suffices:  A higher accuracy can always be obtained by averaging the result of several independent runs of the algorithm.

33 Stochastic Relaxation Radiosity Incremental Shooting  The ime complexity of the stochastic Jacobi iterative algorithms for radiosity is roughly log-linear. This is much lower than the quadratic time complexity of deterministic Jacobi iterations.

34 Explanation is required.

35 Stochastic Relaxation Radiosity Regular Shooting  The variance of a regular shooting iteration, when used with a “complete” radiosity solution as its input, is the same as for a whole sequence of incremental iterations to convergence when the total number of rays being shot is the same. The complete radiosity results obtained by a sequence of incremental iterations to convergence, and of subsequent regular iterations, are optimally combined by simple averaging.

36 Stochastic Relaxation Radiosity Regular Gathering  The variance of regular gathering is in practice most often higher than that of shooting.  But it does not depend on the patch area.  Gathering can therefore be useful in order to clean noisy artifacts from small patches which have a small chance of being hit by shooting rays from elsewhere and can suffer from a large variance with shooting.