Radiosity Indirect Illumination Effects Color Bleeding Soft Shadows Image Synthesis, and Realistic Cohen and Wallace, Radiosity Academic Press Professional 1993

Radiosity Indirect Illumination Effects Color Bleeding Soft Shadows Image Synthesis, and Realistic Cohen and Wallace, Radiosity Academic Press Professional 1993

Radiosity Radiosity Motivation: what is missing in ray-traced images? Indirect illumination effects Color bleeding Soft shadows Radiosity is a physically-based illumination algorithm capable of simulating the above phenomena in a scene made of ideal diffuse surfaces. Books: Cohen and Wallace, Radiosity and Realistic Image Synthesis, Academic Press Professional 1993. Sillion and Puech, Radiosity and Global Illumination, Morgan- Kaufmann, 1994. Radiosity in a Nutshell Radiometric quantities Break surfaces into many small elements Radiant energy [J] Formulate and solve a linear system of equations Radiant power (flux): radiant energy per second [W] that models the equilibrium of inter-reflected Irradiance (flux density): incident radiant power per light in a scene. unit area [W/m2] The solution gives us the amount of light leaving Radiosity (flux density): outgoing radiant power per each point on each surface in the scene. unit area [W/m2] Radiance (angular flux density): radiant power per Once solution is computed, the shaded elements 2 can be quickly rendered from any viewpoint. unit projected area per unit solid angle [W/(m sr)] Solid Angles (1) Solid Angles (2) When defining various radiometric quantities, we Consider the spherical coordinates (r,θ,φ) of a point on the need to be able to quantify sets of directions. sphere. What is the area of a differential surface element at this point? 2 In 2D: dA = (r dθ )(rsinθ dφ) = r sinθ dθ dφ directions are points on the unit circle; dA Differential solid angle: dω = = sinθ dθ dφ a simply connected set of directions is an arc, whose size r2 corresponds to an angle [radians]; In 3D: directions are points on the unit sphere; a simply connected set of directions is an area on the sphere, whose size corresponds to a solid angle; solid angles are measured in steradians. The Radiosity Equation (1) The Radiosity Equation (2) Assume that surfaces in the scene have been Total flux leaving element i: Bi Ai discretized into n small elements. Total flux emitted by element i: Ei Ai Assume that each element emits/reflects light Total reflected flux: uniformly across its surface. (reflectance of element i)*(the total incoming flux) Define the radiosity B as the total hemispherical total incoming flux = sum of contributions from all other flux density (W/m2) leaving a surface. elements in the scene ρi ∑ B j Aj Fji Let’s write down an expression describing the j total flux (light power) leaving element i in the The full radiosity equation is then: scene: n Bi Ai = Ei Ai + ρi ∑ B j Aj Fji total flux = emitted flux + reflected flux j=1 The Form Factor Properties of Form Factors The form factor Fji tells us how much of the flux Reciprocity: Ai Fij = Aj Fji leaving element j actually reaches element i. 1 cosθ cosθ Additivity: Fi( j∪k ) = Fij + Fik F = x y V (x, y)dA dA ij A ∫∫ π x − y 2 x y i xA∈∈Aijy Conservation of energy in a closed environment: n ∑ Fij = 1 j=1 The Radiosity Equation (3) Finally... n The radiosity equation Bi Ai = Ei Ai + ρi ∑ B j Aj Fji A linear system of n equations in n unknowns: j=1 n ⎡1− ρ1F11 − ρ1F12 − ρ1F1n ⎤⎡B1 ⎤ ⎡E1 ⎤ Aj L Divide equation by A : Bi = Ei + ρi B j A Fji ⎢ ⎥⎢ ⎥ ⎢ ⎥ i ∑ i − ρ F 1− ρ F B E j=1 ⎢ 2 21 2 22 M ⎥⎢ 2 ⎥ = ⎢ 2 ⎥ n ⎢ M O M ⎥⎢ M ⎥ ⎢ M ⎥ B = E + ρ B F Apply form-factor reciprocity: i i i ∑ j ij ⎢ F 1 F ⎥⎢B ⎥ ⎢E ⎥ j=1 ⎣ − ρn n1 L L − ρn nn ⎦⎣ n ⎦ ⎣ n ⎦ We can write this using matrix notation: ⎡B1 ⎤ ⎡E1 ⎤ ⎡ ⎤⎡B1 ⎤ ⎢ ⎥ = ⎢ ⎥ + ⎢ ⎥⎢ ⎥ ⎢ M ⎥ ⎢ M ⎥ ⎢ ⎥⎢ M ⎥ ⎣⎢Bn ⎦⎥ ⎣⎢En ⎦⎥ ⎣⎢ ⎦⎥⎣⎢Bn ⎦⎥ The Radiosity Method Examples: Take as input a geometric model of the scene, with emission and reflection properties of each surface Step 1 - Meshing: Discretize input surfaces into a mesh of small elements Step 2 - Setup: Compute the form factors Fij Step 3 - Solution: Solve the resulting linear system of equations Step 4 - Display: Render shaded elements from any desired view point. These steps are often interleaved in practice. Examples: Examples: Solving the Equation Gauss-Seidel Iteration (0) The naive approach - Gaussian elimination Start with an initial guess: for all i Bi = Ei Requires O(n2) memory to store the matrix Repeatedly compute the radiosities according to the Requires O(n3) time to solve the equation following formula: i−1 N (k ) 1 ⎛ (k ) (k−1) ⎞ A better approach - iterative solution ⎜ ⎟ Bi = ⎜ Ei − ∑∑M ij B j − M ij B j ⎟ Jacobi iteration M ii ⎝ j=+11j=i ⎠ Gauss-Seidel iteration Southwell relaxation (known as Progressive Radiosity) The physical analogy: Each element is “gathering”, in turn, light from all other elements. Due to special properties of the radiosity matrix, it is This iteration is guaranteed to converge from any initial possible to prove that these iterative methods are guess, because the matrix is strictly diagonally dominant. guaranteed to converge to the correct solution. Progressive Radiosity (1) Progressive Radiosity (2) B[i] = Unshot[i] = E[i] While not converged: while (not converged) { Select one element in the scene as the current light source Choose i with largest Unshot[i]*A[i] “Shoot” radiosity from the light source to the rest of the scene Shoot(i) The solution process mimics the physical process of light } propagation in the scene. Must take care not to shoot the same light more than once Shoot(i): (keep track of “unshot radiosity”) for j = 1..n { Compute the form factor FF[i,j] B[i] = Unshot[i] = E[i] Delta[j] = ρ[j] FF[i,j] Unshot[i] A[i]/A[j] while (not converged) { B[j] += Delta[j] Choose i with largest Unshot[i]*A[i] Unshot[j] += Delta[j] Shoot(i) } } Unshot[i] = 0 Progressive Radiosity Example: Progressive Radiosity (3) 0, 8, 16, 25, 50, 100 iterations In each iteration the algorithm computes n form factors on the fly, removing the O(n2) storage complexity. Choosing the “brightest” shooter at each iteration makes the solution to converge rapidly during the first iterations. It is possible to display the solution after each iteration, resulting in a progressive sequence of images. Typically, there is no need to run until complete convergence. The process can be stopped after relatively few iterations. Progressive Radiosity + Ambient The Ambient Correction 0, 8, 16, 25, 50, 100 iterations In order to avoid too dark an image during the first PR iterations, an ambient correction term is used. Compute the average reflectivity in the scene: ρave = ∑ ρi Ai ∑ Ai Define the “overall reflection factor” as: 2 3 1 R =1+ ρave + ρave + ρave +K = 1− ρave At each iteration the ambient term is set to: Ambient = R (∑Unshoti Ai ) ∑ Ai Progressive Radiosity with Adaptive Adaptive Mesh Refinement Meshing (0,8,16,50,100) Start with a coarse mesh of elements. During the solution process, subdivide regions in which the radiosity gradient is above a certain threshold. Advantage: creates more elements only where necessary. Disadvantage: might miss important features altogether. Form-Factor Computation (1) Form-Factor Computation (2) Analytic as well as approximate formulas exist for various The remaining integral is approximated as a finite sum: configurations. cosθ x cosθ y A closed form expression for a form factor between two F ≈ V (x, y)dA ij ∫ π r2 y polygons (Schroeder 93): y∈Aj extremely complicated formula cosθ x cosθ y does not take into account occlusion ≈ V (x, y)∆A ∑ π r2 y A common approximation is to assume that the inner integral is constant for all locations x in element i: This approximation works well so long as the elements i and j 1 cosθ x cosθ y F = V (x, y)dA dA are well-separated from each other (the distance between ij A ∫∫ π r2 x y i xA∈∈Aijy them is large relative to their sizes) cosθ cosθ ≈ x y V (x, y)dA ∫ π r2 y y∈Aj Nusselt’s Analogue The Hemi-Cube Algorithm (Cohen - Greenberg 85).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us