400 likes | 535 Views
Graphics II 91.547 Global Rendering and Radiosity. Session 9. A More Sophisticated View of The Nature of Light. Ray Oriented View. Flux intensity view. Vector field represents energy flow per unit time per unit area Finite beam widths. Used in Phong shading
E N D
A More Sophisticated View ofThe Nature of Light Ray Oriented View Flux intensity view • Vector field represents energy flow per unit time per unit area • Finite beam widths • Used in Phong shading • and in ray tracing • Single direction • Zero width • Notion of intensity
Flux and Energy Conservation + + + = Emission + in scattering = streaming + outscattering + absorption
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: dw p
Radiosity: Energy emitted from a surface per unit area Therefore: p
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:
The Radiance Equation:All we really need to know for rendering? Material Surface Properties Light Sources Plenoptic Function
The Radiance Equation:Defined Color: No Lighting No reflections considered Solved at Vertices All objects are “emitters” according to glColor*()
The Radiance Equation:OpenGL Lighting Model Restricted to Point Light Sources Phong BDRF Solved at Vertices Objects can be emitters
The Radiance Equation:Recursive Ray Tracing Restricted to Point Light Sources + Single Reflected & Refracted Ray Phong BDRF Solved for Rays Through Pixels Objects can be emitters
The Radiance Equation:Monte Carlo Ray Tracing Rays cast recursively, chosen according to BDRF Actual BDRF Solved for Rays Through Pixels Objects can be emitters
The Radiance Equation:Radiosity Constant reflectivity Assumed constant over surface “patches” independent of angle Assumed constant over surface “patches” independent of angle Objects can be emitters – emission assumed constant and independent of angle
Perfectly Diffuse Reflectivity Energy is reflected uniformly in all directions
Radiosity • Based on the theory of heat transfer (energy) between surfaces (Siegel 1984) • Adapted to computer graphics by Goral et al. (Goral 1984) • Based upon conservation of energy • Surfaces are assumed to be perfectly diffuse (lambertian) reflectors • Environment is divided into “patches” • 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 • Interaction among patches modeled by unitless form factors • Fijdefined as the fraction of energy leaving dAi that arrives at dAj
The Basic Radiosity Relationship Radiosity x area = emitted energy + reflected energy For an environment divided into n patches: (reciprocity)
Stages in Radiosity Solution Discretized environment Change scene geometry Form factor calculations Change colors or lighting Full matrix solution Change view Standard renderer Specific View
Calculating the Form Factors:Energy reaching Aj from Ai Differential energy leaving Ai that reaches Aj is given by: Solid angle subtended by Aj at Ai can be expressed: Substituting gives:
Calculating the Form Factors:Calculating the Energy Fraction
The Nusselt Analogue (Siegel 1984) Patch Projection onto surface of hemisphere Projection onto base of circle
Hemicube Patch j Projection of patch j onto hemicube “pixels” Patch i
Summing Delta Form Factors onPixels onto which Aj Projects Patch j Patch i
Hemicube Algorithm HandlingOcclusion Issue Patch k Patch j Hemicube Patch i
Stages in Radiosity Solution Computation Cost Discretized environment Storage Change scene geometry Form factor calculations N x N N x N Change colors or lighting Full matrix solution N x N Change view Standard renderer Specific View
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 Drad = rj DBi Fij Ai/Aj DBj = DBj + Drad Bj=Bj+ Drad DBi=0 until convergence
Comparison of Images 124 Patches 5.36 min. 829 Patches 96.46 min. 124 Patches, 829 Elements 32.6 min. 58 Patches, 1135 elements 23.59 min