111/17/ :21 Graphics II Global Rendering and Radiosity Session 9
211/17/ :21 A More Sophisticated View of The Nature of Light Ray Oriented View Used in Phong shading and in ray tracing Single direction Zero width Notion of intensity Flux intensity view Vector field represents energy flow per unit time per unit area Finite beam widths
311/17/ :21 Energy Flow across a Surface
411/17/ :21 Flux and Energy Conservation = Emission + in scattering = streaming + outscattering + absorption
511/17/ :21 Radiance:Energy emitted from a surface per unit projected area, per unit solid angle of direction Energy emitted per surface area, per steradian (solid angle) Therefore: p dd
611/17/ :21 Radiosity: Energy emitted from a surface per unit area Therefore: p
711/17/ :21 Irradiance: Energy arriving at a surface per unit area p
811/17/ :21 Reflectance: Bi-Directional Reflectance Function (BDRF) n
911/17/ :21 The Radiance Equation At any surface: radiance = emitted radiance + total reflected radiance For any incoming direction the reflected radiance in direction is the Irradiance multiplied by the BRDF: Integrating over the hemisphere of all incoming directions at p gives: The radiance equation for outgoing radiance is therefore:
1011/17/ :21 The Radiance Equation: All we really need to know for rendering? Material Surface Properties Light Sources Plenoptic Function
1111/17/ :21 Types of Solution to Radiance Equation LocalGlobal View Dependent OpenGL Phong Lighting Recursive Ray Tracing Monte Carlo Ray Tracing View Independent Flat or Smooth Defined Color (No Lighting) Radiosity Monte Carlo Photon Tracing
1211/17/ :21 The Radiance Equation: Defined Color: No Lighting Solved at Vertices All objects are “emitters” according to glColor*() No reflections considered
1311/17/ :21 The Radiance Equation: OpenGL Lighting Model Objects can be emitters Restricted to Point Light Sources Phong BDRF Solved at Vertices
1411/17/ :21 The Radiance Equation: Recursive Ray Tracing Objects can be emitters Restricted to Point Light Sources + Single Reflected & Refracted Ray Phong BDRF Solved for Rays Through Pixels
1511/17/ :21 The Radiance Equation: Monte Carlo Ray Tracing Objects can be emitters Rays cast recursively, chosen according to BDRF Actual BDRF Solved for Rays Through Pixels
1611/17/ :21 The Radiance Equation: Radiosity Objects can be emitters – emission assumed constant and independent of angle Constant reflectivity Assumed constant over surface “patches” independent of angle Assumed constant over surface “patches” independent of angle
1711/17/ :21 Perfectly Diffuse Reflectivity Energy is reflected uniformly in all directions
1811/17/ :21 Radiosity 0 Based on the theory of heat transfer (energy) between surfaces (Siegel 1984) 0 Adapted to computer graphics by Goral et al. (Goral 1984) 0 Based upon conservation of energy 0 Surfaces are assumed to be perfectly diffuse (lambertian) reflectors 0 Environment is divided into “patches” 0 Radiosity of a patch is the total rate of energy leaving the patch -Assumed constant over the patch -Equal to sum of emitted and reflected energy 0 Interaction among patches modeled by unitless form factors -F ij defined as the fraction of energy leaving dA i that arrives at dA j
1911/17/ :21 The Basic Radiosity Relationship Radiosity x area = emitted energy + reflected energy For an environment divided into n patches: (reciprocity)
2011/17/ :21 Resulting System of Equations
2111/17/ :21 Stages in Radiosity Solution Discretized environment Form factor calculations Full matrix solution Standard renderer Change scene geometry Change colors or lighting Change view Specific View
2211/17/ :21 Calculating the Form Factors: Energy reaching A j from A i Differential energy leaving Ai that reaches Aj is given by: Solid angle subtended by Aj at Ai can be expressed: Substituting gives:
2311/17/ :21 Calculating the Form Factors: Calculating the Energy Fraction
2411/17/ :21 The Nusselt Analogue (Siegel 1984) Patch Projection onto surface of hemisphere Projection onto base of circle
2511/17/ :21 Equivalent Projection Areas
2611/17/ :21 Hemicube Patch i Patch j Projection of patch j onto hemicube “pixels”
2711/17/ :21 Summing Delta Form Factors on Pixels onto which A j Projects Patch i Patch j
2811/17/ :21 Hemicube Algorithm Handling Occlusion Issue Patch i Patch j Patch k Hemicube
2911/17/ :21 Stages in Radiosity Solution Discretized environment Form factor calculations Full matrix solution Standard renderer Change scene geometry Change colors or lighting Change view Specific View N x N Computation Cost Storage N x N
3011/17/ :21 “Gathering”
3111/17/ :21 “Shooting”
3211/17/ :21 Progressive Refinement Radiosity Algorithm repeat for (each patch i) [Position a hemicube on patch I and calculate form factors Fij for the first iteration] for (each patch j ( j!=I )) do rad = j Bi Fij Ai/Aj Bj = Bj + rad Bj=Bj+ rad Bi=0 until convergence
3311/17/ :21 Number of Patches = 124
3411/17/ :21 Number of Patches = 829
3511/17/ :21 Number of Patches = 124 Number of Elements = 829
3611/17/ :21 Number of Patches = 58 Number of Elements = 1135
3711/17/ :21 Comparison of Images 124 Patches 5.36 min. 829 Patches min. 124 Patches, 829 Elements 32.6 min.58 Patches, 1135 elements min
3811/17/ :21 Rendering Caustics Arvo, 1986
3911/17/ :21 Combining Radiosity and Ray Tracing
4011/17/ :21 Combined Radiosity and Ray Tracing