Download presentation
Presentation is loading. Please wait.
Published byGerald Bryan Modified over 9 years ago
1
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
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
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 p ij 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=1 p ij. α 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
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 C i that the ball will be observed in each urn i becomes
5
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
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 C i 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 p ij is the solution of a linear system of equations:
7
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
8 Shooting Random Walk Methods for Radiosity The power system is similar to the equation
9
9 Shooting Random Walk Methods for Radiosity However, the source terms P ei in the system do not sum to one. The remedy is to divide both sides of the equations by the total self-emitted power P eT = Σ i P ei :
10
10 Shooting Random Walk Methods for Radiosity This system of equations suggests a discrete random walk process with: Birth probabilities π i = P ei /P eT : particles are generated randomly on light sources, with a probability proportional to the self-emitted power of each light source. Transition probabilities p ij = F ij ρ 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
11 Shooting Random Walk Methods for Radiosity By simulating N random walks in this way, and keeping a count C i of random walk visits to each patch i, the light power P i 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
12 Shooting Random Walk Methods for Radiosity
13
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 ρ i C’ i ≈C i.
14
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 = C i + C’’ i The expected number of particles being absorbed on i is (1- ρ i )C’ i ≈C” i.
15
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
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 =Σ n i=1 x i w i of the solution x of the linear system, with an arbitrary weight vector w can also be obtained as a scalar product of the source term e with the solution of the adjoint system of linear equations C T y = w. = = =
17
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 P k emitted by a patch k. P k can be written as a scalar product P k = A k B k = with W i =A i δ ik. All components of the direct importance vector W are 0, except the kth component, which is equal to W k = A k. Then, P k can also be obtained as P k = = Σ i Y i B ei. 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
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 p ji = ρ j F ji. 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
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
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 A k. 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
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
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.