Last Tme? Global Illumnaton: Radosty Planar Shadows Shadow Maps An early applcaton of radatve heat transfer n stables. Projectve Texture Shadows (Texture Mappng) Shadow Volumes (Stencl Buffer) Schedule No class Tuesday November 11 th, Veterans Day Revew Sesson: Tuesday November 18 th, 7:30 pm, Room 2-136 brng lots of questons! Quz 2: Thursday November 20 th, n class (two weeks from today) The Cornell Box Radosty vs. Ray Tracng Why Radosty? Radosty vs. Ray Tracng Sculpture by John Ferren Dffuse panels photograph: dagram from above: Orgnal sculpture by John Ferren lt by daylght from behnd. Ray traced mage. A standard Image rendered wth radosty. ray tracer cannot smulate the note color bleedng effects. nterreflecton of lght between dffuse surfaces. eye
The Cornell Box The Cornell Box photograph drect llumnaton (0 bounces) 1 bounce 2 bounces smulaton Goral, Torrance, Greenberg & Battale Modelng the Interacton of Lght Between Dffuse Surfaces MIT EECS 6.837, Durand and SIGGRAPH Cutler '84 mages by Mcheal Callahan http://www.cs.utah.edu/~shrley/classes/cs684_98/students/callahan/bounce/ The Cornell Box Careful calbraton and measurement allows for comparson between physcal scene & smulaton photograph smulaton Lght Measurement Laboratory Cornell Unversty, Program for Computer Graphcs Radosty vs. Ray Tracng Ray tracng s an mage-space algorthm If the camera s moved, we have to start over Radosty s computed n object-space Vew-ndependent (just don't move the lght) Can pre-compute complex lghtng to allow nteractve walkthroughs The Cornell Box Radosty vs. Ray Tracng Lghtscape MIT http://www.lghtscape.com EECS 6.837, Durand and Cutler
L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da L (,) s the radance from a pont on a surface n a gven drecton E(,) s the emtted radance from a pont: E s non-zero only f s emssve (a lght source) x ω L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da Sum the contrbuton from all of the other surfaces n the scene For each x, compute L(x, ω), the radance at pont x n the drecton ω (from x to ) x ω x ω L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da scale the contrbuton by ρ (ω,), the reflectvty (BRDF) of the surface at For each x, compute V(x,), the vsblty between x and : 1 when the surfaces are unobstructed along the drecton ω, 0 otherwse L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da
Intuton about G(x,)? x ω Whch arrangement of two surfaces wll yeld the greatest transfer of lght energy? Why? L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da For each x, compute G(x, ), whch descrbes the on the geometrc relatonshp between the two surfaces at x and x The Cornell Box Radosty vs. Ray Tracng Museum smulaton. Program of Computer Graphcs, Cornell Unversty. 50,000 patches. MIT EECS Note 6.837, ndrect Durand lghtng and Cutlerfrom celng. Radosty Overvew Radosty Equaton Surfaces are assumed to be perfectly Lambertan (dffuse) reflect ncdent lght n all drectons wth equal ntensty The scene s dvded nto a set of small areas, or patches. The radosty, B, of patch s the total rate of energy leavng a surface. The radosty over a patch s constant. Unts for radosty: Watts / steradan * meter 2 L(,) = E(,) + ρ x '(ω,)l(x,ω)g(x,)v(x,) da Radosty assumpton: perfectly dffuse surfaces (not drectonal) B = E + ρ B x G(x,)V(x,)
Contnuous Radosty Equaton Dscrete Radosty Equaton x reflectvty B = E + ρ G(x,) V(x,) B x form factor Dscretze the scene nto n patches, over whch the radosty s constant reflectvty A j B = E + ρ n j=1 F j B j x G: geometry term V: vsblty term No analytcal soluton, even for smple confguratons A form factor dscrete representaton teratve soluton costly geometrc/vsblty calculatons The Radosty Matrx Solvng the Radosty Matrx B = E + ρ n j=1 F B j j The radosty of a sngle patch s updated for each teraton by gatherng radostes from all other patches: n smultaneous equatons wth n unknown B values can be wrtten n matrx form: 1 ρ1f11 ρ1f12 L ρ1f1 n ρ2f21 1 ρ2f 22 M O ρnfn 1 L L 1 ρnfnn A soluton yelds a sngle radosty value B for each patch n the envronment, a vew-ndependent soluton. B1 B 2 M B n = E1 E 2 M E n B1 E1 B1 B2 E2 B2 M M M = + B E ρf1 ρf 1 L ρfnb M M M B E B n n n Ths method s fundamentally a Gauss-Sedel relaxaton Computng Vertex Radostes B radosty values are constant over the extent of a patch. How are they mapped to the vertex radostes (ntenstes) needed by the renderer? Average the radostes of patches that contrbute to the vertex Vertces on the edge of a surface are assgned values extrapolaton Factory smulaton. Program of Computer Graphcs, Cornell Unversty. MIT EECS 30,000 6.837, Durand patches. and Cutler
The Cornell Box Radosty vs. Ray Tracng Radosty Patches are Fnte Elements We are tryng to solve an the renderng equaton over the nfnte-dmensonal space of radosty functons over the scene. We project the problem onto a fnte bass of functons: pecewse constant over patches A Aj Pont-to-area form factor A Aj Area-to-area form factor Calculatng the Form Factor F j F j = fracton of lght energy leavng patch j that arrves at patch Takes account of both: geometry (sze, orentaton & poston) vsblty (are there any occluders?) patch j Form Factor Determnaton The Nusselt analog: the form factor of a patch s equvalent to the fracton of the the unt crcle that s formed by takng the projecton of the patch onto the hemsphere surface and projectng t down onto the crcle. A j A j patch j patch j r = 1 da F da,a j patch patch patch Remember Dffuse Lghtng? Calculatng the Form Factor F j F j = fracton of lght energy leavng patch j that arrves at patch Φ L( ωr ) = kd ( n l) 4π d s 2 n θ db patch j θ j r db = dacosθ da Surface θ patch 1 cos θ cos θ j F j = V j da j da π r 2 A A A j
Hemcube Algorthm A hemcube s constructed around the center of each patch Faces of the hemcube are dvded nto "pxels" Each patch s projected (rasterzed) onto the faces of the hemcube Each pxel stores ts pre-computed form factor The form factor for a partcular patch s just the sum of the pxels t overlaps Patch occlusons are handled smlar to z-buffer rasterzaton Form Factor from Ray Castng Cast n rays between the two patches n s typcally between 4 and 32 Compute vsblty Integrate the pont-to-pont form factor Permts the computaton of the patch-to-patch form factor, as opposed to pont-to-patch A Aj The Cornell Box Radosty vs. Ray Tracng Lghtscape MIT http://www.lghtscape.com EECS 6.837, Durand and Cutler Stages n a Radosty Soluton Progressve Refnement Input Geometry Reflectance Propertes Camera Poston & Orentaton Form Factor Calculaton Solve the Radosty Matrx Radosty Soluton Vsualzaton (Renderng) Radosty Image > 90% < 10% ~ 0% Why so costly? Calculaton & storage of n 2 form factors Goal: Provde frequent and tmely updates to the user durng computaton Key Idea: Update the entre mage at every teraton, rather than a sngle patch How? Instead of summng the lght receved by one patch, dstrbute the radance of the patch wth the most undstrbuted radance.
Reorderng the Soluton for PR Progressve Refnement w/out Ambent Term Shootng: the radosty of all patches s updated for each teraton: B1 B1 L ρ1f1 L B 2 B 2 L ρ2f2 M M M = + B M M M Bn Bn L ρnfn L Ths method s fundamentally a Southwell relaxaton Progressve Refnement wth Ambent Term Lghtscape MIT http://www.lghtscape.com EECS 6.837, Durand and Cutler Adaptve Subdvson Dscontnuty Meshng Herarchcal Radosty Other Bass Functons Increasng the Accuracy of the Soluton What s wrong wth ths pcture? The qualty of the mage s a functon of the sze of the patches. The patches should be adaptvely subdvded near shadow boundares, and other areas wth a hgh radosty gradent. Compute a soluton on a unform ntal mesh, then refne the mesh n areas that exceed some error tolerance.
Adaptve Subdvson of Patches Dscontnuty Meshng Lmts of umbra and penumbra Captures nce shadow boundares Complex geometrc computaton The mesh s gettng complex source blocker penumbra umbra Coarse patch soluton (145 patches) Improved soluton (1021 subpatches) Adaptve subdvson (1306 subpatches) Dscontnuty Meshng Dscontnuty Meshng Comparson Wth vsblty skeleton & dscontnuty meshng [Gbson 96] 10 mnutes 23 seconds 1 hour 57 mnutes Herarchcal Approach Group elements when the lght exchange s not mportant Breaks the quadratc complexty Control non trval, memory cost Other Bass Functons Hgher order (non constant bass) Better representaton of smooth varatons Problem: radosty s dscontnuous (shadow boundary) Drectonal bass For non-dffuse fnte elements E.g. sphercal harmoncs
Next Tme: Global Illumnaton: Monte Carlo Ray Tracng Henrk Wann Jensen Lghtscape MIT http://www.lghtscape.com EECS 6.837, Durand and Cutler