1 / 22

K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology

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. Discrete Random Walk Methods for Radiosity.

Télécharger la présentation

K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Discrete Random Walk Methods for Radiosity • The methods belonging to this class are based on the concept of a random walk in a so-called discrete state space. • It turns out that these algorithms are not better than the stochastic Jacobi algorithm.

  3. Random Walks in a Discrete State Space • Consider one experiment, involving a set of n urns, labeled i, i=1,…,n. • One of the urns contains a ball, subject to the following “game of chance”: • They ball is initially inserted in a randomly chosen urn. The probability that the ball is stored in urn i, I = 1, …, n, is πi. These probabilities are properly normalized: Σπi = 1. They are called source or birth probabilities. • The ball is randomly moved from one urn to another. The probability pij of moving the ball from urn i to urn j is called the transition probability. The transition probabilities from a fixed urn i need not sum to one. If the ball is in urn i, then the game will be terminated with probability αi=1-Σj=1pij. αi is called the termination or absorption probability at urn i. The sum of the transition probabilities and the termination probability for any given urn is equal to unity. • The previous step is repeated until termination is sampled.

  4. Random Walks in a Discrete State Space • Suppose the game is played N times. • During the games, a tally is kept of how many times each urn i is visited by the ball. • The expected number of times Ci that the ball will be observed in each urn i becomes

  5. Random Walks in a Discrete State Space • The first term on the right-hand side of the equation indicates the expected number of times that a ball is initially inserted in urn i. • The second term indicates the expected number of times that a ball is moved to urn i from another urn j.

  6. Random Walks in a Discrete State Space • The urns are called states and the ball is called a particle. • The game of chance outlined before is an example of a discrete random walk process. • Discrete: because the set of states is countable. • The expected number of visits Ci per random walk is called the collision density χi. • The collision density of a discrete random walk process with source probabilities πi and transition probabilities pij is the solution of a linear system of equations:

  7. Random Walks in a Discrete State Space • Note that χi can be larger than unity. • χi is called the collision density rather than a probability. • In summary, at least a certain class of linear systems of equations can be solved by simulating random walks and keeping count of how often each state is being visited. • The states of the random walk correspond to the unknowns of the system.

  8. Shooting Random Walk Methods for Radiosity • The power system is similar to the equation

  9. Shooting Random Walk Methods for Radiosity • However, the source terms Pei in the system do not sum to one. • The remedy is to divide both sides of the equations by the total self-emitted power PeT = Σi Pei:

  10. Shooting Random Walk Methods for Radiosity • This system of equations suggests a discrete random walk process with: • Birth probabilities πi = Pei/PeT: particles are generated randomly on light sources, with a probability proportional to the self-emitted power of each light source. • Transition probabilities pij = Fijρj: first, a candidate transition is sampled by tracing, for instance, a local line. After candidate transition, the particle is subjected to an acceptance/rejection test with survival probability equal to the reflectivity ρj. If the particle does not survive the test, it is said to be absorbed.

  11. Shooting Random Walk Methods for Radiosity • By simulating N random walks in this way, and keeping a count Ci of random walk visits to each patch i, the light power Pi can be estimated as • Because the simulated particles originate at the light sources, this random walk method for radiosity is called a shooting random walk method. • It is called a survival random walk estimator because particles are only counted if they survive the rejection test.

  12. Shooting Random Walk Methods for Radiosity

  13. Shooting Random Walk Methods for Radiosity • Collision Estimation • Transition sampling is suboptimal. • Candidate transition sampling involves an expensive ray-shooting operation. • If the candidate transition is not accepted, this expensive operation has been performed in vain. • This will often be the case if a dark surface is hit. • It will always be more efficient to count the particles visiting a patch, whether they survive or not. • The collision random walk estimates are C’i denotes the total number of particles hitting patch i. The expected number of particles that survive on i is ρiC’i≈Ci.

  14. Shooting Random Walk Methods for Radiosity • Absorption Estimation • A third random walk estimator only counts particles if they are absorbed. • The resulting absorption random walks estimates are • C’’i : the number of particles that are absorbed on i. • C’i = Ci + C’’i • The expected number of particles being absorbed on i is (1-ρi)C’i ≈C”i.

  15. Gathering Random Walk Methods for Radiosity • It is possible to estimate the radiosity on a given patch i, by means of particles that originate at i and that are counted when they hit a light source. • Gathering random walk estimators • A gathering random walk estimator corresponds to a shooting random walk estimator for solving an adjoint system of equations.

  16. Gathering Random Walk Methods for Radiosity • Adjoint Systems of Equations • Consider a linear system of equations Cx=e. • C is the coefficient matrix of the system with elements cij. • e is the source vector. • x is the vector of unknowns. • A well-known result from algebra states that each scalar product <x,w>=Σni=1xiwi of the solution x of the linear system, with an arbitrary weight vector w can also be obtained as a scalar product <e,y> of the source term e with the solution of the adjoint system of linear equations CTy = w. • <w,x> = <CTy,x> = <y,Cx> = <y,e>

  17. Gathering Random Walk Methods for Radiosity • Adjoint of the radiosity system • Adjoint systems corresponding to the radiosity system of equations look like • Consider the power Pk emitted by a patch k. • Pk can be written as a scalar product Pk = AkBk = <B,W> with Wi=Aiδik. • All components of the direct importance vector W are 0, except the kth component, which is equal to Wk = Ak. • Then, Pk can also be obtained as Pk = <Y,E> = ΣiYiBei. • It is a weighted sum of the self-emitted radiosities at the light sources in the scene. • The solution Y of the adjoint system indicates to what extent each light source contributes to the radiosity at k. • Y is called the importance or potential in the literature.

  18. Gathering Random Walk Methods for Radiosity • Gathering random walk estimators • The adjoints of the radiosity system also have the indices of the form factors in the right order. • They can be solved using a random walk simulation with transitions sampled with local or global lines. • The particles are now shot from the patch of interest, instead of from the light sources. • The Transition probabilities are pji = ρjFji. • First, an absorption/survival test is performed. • If the particle survives, it is propagated to a new patch with probabilities corresponding to the form factors. • A nonzero contribution to the radiosity of patch k results whenever the imaginary particle hits a light source. • Its physical interpretation is that of gathering. • The gathering random walk estimator is a collision estimator.

  19. Discussion • Discrete random walk estimators for radiosity can be classified according to the following criteria: • Whether they are shooting or gathering. • According to where they generate a contribution: at absorption, survival, at every collision. • Comparison of the variants can be made by considering the variance of each method.

  20. Discussion • Shooting versus Gathering • The shooting estimators have lower variance, except on small patches which have low probability of being hit by rays shot from light sources. • Unlike shooting estimators, the variance of gathering estimators does not depend on the patch area Ak. • For sufficiently small patches, gathering will be more efficient. • Gathering could be used in order to “clean” noisy artifacts on small patches after shooting.

  21. Discussion • Absorption, Survival or Collision • The survival estimators are always worse than the corresponding collision estimators. • The reflectivity ρk (shooting) or ρs (gathering) is always smaller than 1. • As a rule, the collision estimators also have lower variance than the absorption estimators. • When the transition probabilities are modulated, to shoot more rays into important directions, an absorption estimation can be better than a collision estimator. • It can be shown that a collision estimator can never be perfect, because random walks can contribute a variable number of scores. • An absorption estimator always yields a single score, so it does not suffer from this source of variance. • In theory, absorption estimators can be made perfect.

  22. Discussion • Discrete Collision Shooting Random Walks versus Stochastic Jacobi Relaxation • For the same number of rays, discrete collision shooting random walks and incremental power-shooting Jacobi iterations are approximately equally efficient. • However, this conclusion is no longer true when higher-order approximations are used, or with low-discrepancy sampling or in combination with variance reduction techniques. • Many variance-reduction techniques and low-discrepancy samplings are easier to implement and appear more effective for stochastic relaxation than with random walks.

More Related