Global Illumination Illumination Algorithms Digital Lighting and Rendering CGT 340 The goal of global illumination is to model all possible paths of light to the camera. Global Illumination Global illumination is calculated using light transportation simulation Usually achieved by physically based rendering Radiance Denoted by, measure the amount of light reaching/leaving the point from the direction Human eye or sensor response is proportional to radiance Radiance is constant along straight lines in space (we call it a ray) 1
Direct and Indirect Illumination Direct Illumination Light arriving directly from the light source Indirect illumination Light that has bounced several times Direct Illumination J. Krivanek Direct Illumination Takes into account: lights, viewer, and the surface point fast efficient suitable for a hardware implementation Indirect Illumination Indirect Global Illumination J. Krivanek 2
Global Illumination Direct vs. Global Illumination Global Illumination=Direct + Indirect J. Krivanek Global Illumination the same as local and reflections/refractions slow many different algorithms usually done by SW, with a help of GPU The Rendering Equation A mathematical concept exists that describes the process of light transportation Includes BRDF and radiance L ( x, ) L s cos cos ' g( x, x' ) fr ( x, ', ) L f ( x, ') d x' x A e ( x, ) ' 2 3
The Rendering Equation Rendering attempts to solve the rendering equation It is hard, nonlinear, recursive We approximate its solution using numerical methods Area light Global Illumination Diffuse-Diffuse reflections Color bleeding Glossy reflection Transparency and refraction Soft shadow Caustics Caustics caused by a focused light on a diffuse surface result of a specular reflection and/or transmission reflective glass, bottom of a swimming pool, reflected metal Caustics 4
Possible light transport (simplified) diffuse to diffuse diffuse to specular Possible light transport (simplified) specular to diffuse specular to specular Light transport notation (Heckbert 1990) Symbols: L ~ light E ~ eye, camera D ~ diffuse reflection S,G ~ specular (glossy) reflection L(S D)* E Meanings: S* is the reflexive transitive closure i.e., any number of reflections of S any can be zero S + does not include zero operation i.e., must be at least one reflection D diffuse direct illumination S D specular or diffuse reflection 5
LE LSE mirror mirror light source E light source E diffuse diffuse LSDE LSDSDE mirror mirror light source E light source E diffuse diffuse 6
Special Cases LSD(S D)E diffuse Mirror interreflections L(S+ G+)*E light source diffuse transparent E Diffuse interreflections LD+E Special Cases Phong illumination model L (D)SE Lights contribute with the diffuse and the specular component There is just one reflection for both It s more model of BRDF than illumination Participating Media A very special case is participating media Volumetric effects, fog, fire, etc. Usually not captured by the global illumination Correct calculation is expensive Particle systems can help 7
Aerial perspective Global Illumination Algorithms Classification Gathering methods Shooting methods Bi directional methods Global Illumination Algorithms Gathering methods Gathering Methods go from the eye to the light these methods accumulate the energy along the ray 3 4 2 8
Gathering Methods Ray casting Ray tracing (classical, distributed) MC Path tracing Only the direct illumination with shadow rays Light paths: multiple specular reflections/refractions no diffuse diffuse reflection Ray tracing stops on a diffuse surface! based on ideas of Dürer and da Vinci (dated back to the early Renaissance) introduced by Whitted in 1980 Appel 1981 the first implementation today de facto standard in global illumination it is a recursive algorithm Albrecht Dürer (1471 1528) 9
Light in the real world RT traces ONLY the rays that go to the eye Ray tracing provides shadows, reflected, refracted rays does not provide soft shadows does not provide caustics does not provide diffuse diffuse refl. Distributed RT can do area lights (and soft shadows) The most commonly used technique today 10
MAXDEPTH=1 MAXDEPTH=3 MAXDEPTH=2 MAXDEPTH=4 MAXDEPTH=5 MAXDEPTH=10 MAXDEPTH=6 MAXDEPTH=100 11
Ray Casting is ray tracing with ray depth=0 provides shadows visibility (HSE) no transparency rough, but good for preview sufficiently fast, even for complex scenes can be partially done in hardware MC Path Tracing Is more theoretical approach. Random paths are traversed from the position of the viewer. In each intersection BRDF is samples randomly and ray is reflected Shadows rays are cast as well. Extremely slow approach. Noisy Full solution MC Path Tracing MC Path Tracing 1 10 Samples per pixel, 100 reflections R.C.Moreno 100 1000 Samples per pixel, 100 reflections R.C.Moreno 12
Global Illumination Algorithms Shooting methods Shooting Methods start in the light sources they shoot the energy the energy eventually reaches the viewer Shooting Methods Photon tracing MC Light tracing Again, quite theoretical Very noisy methods Good for even small light sources Shooting Methods they provide caustics color bleeding diffuse diffuse reflection they have very slow convergence!! 13
Global Illumination Algorithms Bi Directional Methods Bi directional methods both directions from the viewer and from the light sources Eye path x3 Light path connect them somewhere in the middle y3 y1 x2 y2 Bi Directional Methods Bi directional path tracing Metropolis light transport Photon maps Photon Maps Idea [Jensen 96] Two pass method Shooting step: once and store (kd trees) the photons on the surfaces Gathering step: distribution ray tracing using the photon maps 14
Photon Maps photons map directly both passes R.C.Moreno Photon Maps Pros: High quality images Fast convergence Caustics Cons: Additional data structures (this is not finite element method) Readings Glassner, Principles of Digital Image Synthesis Shirley, Realistic RayTracing Watt, Watt, 2nd edition, Advanced Animation and Rendering Techniques Cohen, Wallace, Radiosity and Realistic Image Synthesis Jensen Realistic Image Synthesis using Photon Mapping 15