
Rendering III : Radiosity July 20, 1999 Motivational Film ✔More Bells and Whistles – Computer Graphics’ first music video July 20, 1999 Logistics ✔Paper summaries on Radiosity – Any takers? ✔Projects – Updates due today – Sign up for presentations now open July 20, 1999 Logistics ✔Many thanks to Max and Rob for taking over for me last week. July 20, 1999 Photography and Light pho•tog•ra•phy, n., the process or art of producing images of objects by the action of light on a sensitized surface, esp, a film in a camera. Sure, we know, it’s all about light… July 20, 1999 Computer Graphics as Virtual Photography real camera photo Photographic Photography: scene (captures processing print light) processing Computer 3D camera tone synthetic Graphics: models model reproduction image (focuses simulated lighting) July 20, 1999 Today’s Class ✔Radiosity – Basics – The Radiosity Equation – Form Factors • What they are • The hemicube solution – Solving the Radiosity Equation – Rendering July 20, 1999 Radiosity - Basics ✔The problem with ray tracing – Great for specular type reflections – Awful for diffuse reflections. July 20, 1999 Radiosity - Basics ✔Based on the theory of heat transfer ✔Calculate lighting in a steady state ✔Assumes that all surfaces are perfectly diffuse ✔Formulates a large systems of linear equations ✔Solution of these equations give you radiant exitance at each point July 20, 1999 Radiosity - Basics ✔Radiant exitance - radiant flux out dΦ M = dA dA July 20, 1999 Radiosity - Basics ✔Image is created by using calcuated radiant existance values in standard rendering process. – In essence, radiosity defines a “made to fit” texture mapping July 20, 1999 Radiosity - Basics ✔Program Flow July 20, 1999 Radiosity - Basics ✔View dependence vs view independence – Radiosity provides a view independent solution – Scene needs to be further rendered from a given view point. July 20, 1999 Radiosity - Basics ✔Not points -- But patches – Scene is subdivided into patches – Radiant exitance will be calculated for each patch July 20, 1999 Radiosity - Basics ✔Patches July 20, 1999 Radiosity - Basics ✔Basic idea – Each patch will receive a certain amount of light from the environment – It will reflect fraction back into the environment – Keep track of amount of light reflected back – Continue till all light has been exhasted. July 20, 1999 Radiosity - Basics ✔Key idea – Since all objects are perfectly diffuse, we can determine where light is coming from (and going) by simply considering the geometry of the scene. – Calculation of radiant exitance per patch is given by the radiosity equation. July 20, 1999 The Radiosity Equation ✔For each patch i, the RE gives you the radiant exitance of that patch. ✔All surfaces are perfectly diffuse (I.e. reflectivity is equal in all directions) ρ – Reflectance for each patch is a constant I ✔ Geometry term Fi,j indicates the fraction of flux leaving patch i and arriving at patch j. July 20, 1999 Radiosity Equation n = + ρ {M i M{oi {i ∑ M j Fij = exitance init flux out reflectance 1j 421 43 light from other surface July 20, 1999 Radiosity Equation ✔Radiosity vs Rendering Equation I(x, x′) = g(x, x′)[ε(x, x′) + ∫ ρ(x, x′, x′′)I(x′, x′′)dx′′] S n = + ρ M i M oi i ∑ M j Fij j=1 July 20, 1999 Radiosity System of Equations ✔Rearrange terms a bit n = + ρ M i M oi i ∑ M j Fij j=1 n = − ρ M oi M i i ∑ M j Fij j=1 July 20, 1999 Radiosity System of Equations ✔Expand this out = − ρ + ρ +L+ ρ M o1 M1 ( 1M1F11 1M 2F12 nM n F1n ) = − ρ + ρ +L+ ρ M o2 M 2 ( 2M 2 F21 2M 2 F22 nM n F2n ) K = − ρ + ρ +L+ ρ M on M n ( n1M1Fn1 n M 2Fn2 n M n Fnn ) July 20, 1999 Radiosity System of Equations ✔Put into matrix form M 1− ρ F − ρ F L − ρ F M o1 1 11 1 12 1 1n 1 M − ρ F 1− ρ F L − ρ F M o2 = 2 21 2 22 2 2n 2 L L L L L L − ρ − ρ L − ρ M on n Fn1 n Fn2 1 n Fnn M n July 20, 1999 Radiosity System of Equations ✔Put in matrix notation = − M o (I T )M Mo = initial n x 1 exitance vector I = n x n identity matrix M = final n x 1 exitance vector ρ T = n x n matrix whose i,j element is iFij July 20, 1999 Radiosity System of Equations ✔ We have Mo ✔We have I ✔ ρ We have I ✔We’re solving for M ✔ We need this Fij -- Form Factor ✔Any questions? July 20, 1999 Radiosity - Form Factors ✔Form factors are a geometric term: – Given the radiant exitance of a patch Ei, what fraction of its flux is received by another patch Ej. – Remember: All patches are Lambertian surfaces and distribute flux equally in all directions. July 20, 1999 Radiosity - Form Factors ✔ Flux emitted by Ei: = Ei M i Ai ✔ Flux arriving at Ej Φ = Φ ij Fij i Φ F = ij ij Φ i July 20, 1999 Radiosity - Form Factors ✔Physically based geometry – Points are actually areas – Rays are actually solid angles. July 20, 1999 Radiosity - Form Factors ✔Solid angles ω = A r 2 July 20, 1999 Radiosity -- Form Factors ✔Radiance d 2Φ L = dωdAcosθ July 20, 1999 Radiosity -- Form Factor ✔ Flux leaving Ei in direction of Ej Φ = θ θ ω ij 1L2(3i )cos idAid radiance July 20, 1999 Radiosity - Form Factors ✔ Solid angle of ray as seen by Ei ω = θ 2 d cos j dAj / r July 20, 1999 Radiosity - Form Factor ✔ Flux leaving Ei towards Ej L cosθ cosθ dA dA Φ = i i j i j ij 2 July 20, 1999 r Radiosity - Form Factor ✔Recall: Form Factor is the fraction of total flux given off by one patch that arrives at another. ✔We have the amount of flux from i to j Φ ( ij) ✔What we need is total amount of flux Φ emitted by i ( i) July 20, 1999 Radiosity - Form Factor ✔Recall: Patch i is Lambertian Φ = = π i M idAi LidAi Note: it can be shown by integration of L over a hemisphere that M = πL for a Lambertian surface July 20, 1999 Radiosity - Form Factor ✔Calculating the fraction Φ L cosθ cosθ dA dA F = ij = i i j i j ij Φ π 2 LidAir cosθ cosθ dA F = i j j ij πr 2 July 20, 1999 Radiosity - Form Factor ✔Calculating the fraction cosθ cosθ dA Depends ONLY on geometry! F = i j j ij πr 2 July 20, 1999 Radiosity - Form Factor ✔But wait, there’s more…. – Patches are not points nor are they differential areas – Must integrate over each patch. July 20, 1999 Radiosity - Form Factor ✔Integration over patches July 20, 1999 Radiosity - Form Factors ✔The final expression! 1 cosθ cosθ F = ∫∫ i j dA dA ij A πr 2 i j i AAij July 20, 1999 Radiosity - Form Factors ✔Fun Facts about form factors – Solution first developed in 1760 by Lambert – AiFij = AjFji – Form Factor assumes a nonparticipating medium (like air or vacuum) July 20, 1999 Radiosity - Form Factors ✔So how do we solve this thing? – There is an analytic solution. But it is very ugly and impractical (note: discovered in 1993) – Classic solution: The Hemicube method – Any questions before we move on? July 20, 1999 Radiosity - Form Factors ✔Nusselt’s Analogy July 20, 1999 Radiosity - Form Factors ✔Nusselt’s Analogy – Project Ej onto plane of surface – Form factor is fraction of projected surface area with respect to projected area of a hemisphere. July 20, 1999 Radiosity - Form Factors ✔Result from Nusselt’s Analogy July 20, 1999 Radiosity - Form Factors ✔Hemicube – Replace hemisphere with hemicube. – Hemicube is divided into cells. – Can determine form factor for each cell (delta form factors). – Form factor for a patch is the sum of delta form factors for cells that the projection of the patch covers. July 20, 1999 Radiosity - Form Factors ✔Hemicube July 20, 1999 Radiosity - Form Factors ✔Hemicube - Delta Form Factors – Gives an approximation of form factor for a cell on the hemicube. θ θ cos i cos j F − ≈ ∆A dEi E j πr 2 j July 20, 1999 Radiosity - Form Factors ✔Hemicube - delta form factor (top side) July 20, 1999 Radiosity - Form Factors ✔Hemicube - Delta Form Factors – If we conveniently choose r to be 1 then r = u 2 + v2 +1 – and 1 cosθ = cosθ = i j r July 20, 1999 Radiosity - Form Factors ✔So... cosθ cosθ ∆A ∆F ≈ i j ∆A = top top πr 2 top π (u 2 + v2 +1)2 July 20, 1999 Radiosity - Form Factors ✔Similarly, it can be shown cosθ cosθ n∆A ∆F ≈ i j ∆A = side side πr 2 side π (u 2 + n2 +1)2 July 20, 1999 Radiosity - Form Factors ✔Fun Facts about Hemicube – Delta Form Factors can be precomputed once then applied to each patch – Accuracy depends on hemicube resolution. – Most popular means of calculating form factors July 20, 1999 Radiosity ✔Let’s recap – Divided our scene into n patches – Set up this system of n equations: M 1− ρ F − ρ F L − ρ F M o1 1 11 1 12 1 1n 1 M − ρ F 1− ρ F L − ρ F M o2 = 2 21 21 22 21 2n 2 L L L L L L − ρ − ρ L − ρ M on n Fn1 n2 Fn2 1 n1Fnn M n July 20, 1999 Radiosity ✔Recap continued – For each i,j combination, calculate the form factor Fij – Now need to solve the radiosity equation July 20, 1999 Radiosity ✔Recap July 20, 1999 Radiosity ✔Solving the Radiosity Equation – Use Numerical Techniques (Jacobi / Gauss-Sidel method) • Calculates full radiosity solution • O (n2) – Progressive Refinement • Approximate solution • Better solution with each iteration.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages72 Page
-
File Size-