Global Illumination Recall: Global Vs. Local Illumination
Total Page:16
File Type:pdf, Size:1020Kb
Global Illumination Recall: Global vs. Local Illumination T Global S Model interactions between light and objects S Impossible in practice! R Still active research problem S Basic idea: “Follow the light” T Local S Consider each object independently CS 4451 Fall 2002 1 Much Different Approach Than OpenGL T Up to now: S Scan convert objects, computing color as we go S Can’t easily do: R Shadows R Reflection R Accurate transparency T Instead, let’s think about light and the viewer’s eye Global Illumination Models T Framework to evaluate/compare algorithms T The Rendering Equation S Kajiya’s general formulation of global illumination T Radiance Equation S Alternative version of the Rendering Equation T Path notation S Classification of algorithms based on the kinds of surface-to-surface interactions they support S Non-mathematical CS 4451 Fall 2002 2 Global Illumination Algorithms T Two well known methods S Ray tracing (10.3.1, Ch 12) S Radiosity (10.3.2, Ch 11) T Newer methods S Fix flaws in RT and Rad (sec 10.5-10.11) S Other more recent methods R E.g., Photon mapping (Jenson) CS 4451 Fall 2002 3 Whitted Ray Tracing T View dependent approach T “Trace” rays around scene S Can’t follow photons from light source to eye S Rather, trace from eye into scene R Models direct interactions R Complex interactions approximated by “ambient” term S Basis for modern offline algorithms R Films such as Toy Story Follow Light Through Scene CS 4451 Fall 2002 4 Forward Ray Tracing T Lights emit photons, so follow the photons S Trace photon paths (rays) S Bounce off objects R Reflect and refract, attenuate S When a ray enter’s eye R Calculate intersection with viewplane R Accumulate color in the pixel T Expensive, but accurate! S Needed to model caustics (see two-pass r. t., sec 10.7) Backward Ray Tracing T Observation: S Only care about light that enters eye T Trace those rays into the scene directly S For each pixel R Compute ray from eye though pixel R Intersect with objects R Compute color using closest object intersection T “Whitted Ray Tracing” = backward ray tracing CS 4451 Fall 2002 5 Coloring Pixels T Use illumination model to determine color at intersection of ray and object S Use the same model we’ve been using S Easily compute specular now, using light rays! T Can do proper transparency S Compute color of farther pixel S Combine it with transparent object Reflection, Refraction and Shadows Light Source Shadow Center of Projection Reflection Ray Projection Plane CS 4451 Fall 2002 6 Diffuse light, refraction, shadows? T Local diffuse computation, no reflected rays S Why not? T Only sharp shadows S Lights are all point lights T “Ideal” refraction S No material defects, unreal looking R Helped by distributed ray tracing (sec 10.6) Radiosity T Attempt to model complex interactions using heat transfer equations S Basic techniques limited to perfect diffusers R Diffuse-diffuse interaction S No sharp highlights or reflections T Computes a single radiosity (illumination) for each patch in the scene T View independent: render patches using a subsequent pass CS 4451 Fall 2002 7 Model Scene as Diffuse Patchs T Start with patches that emit light T Shoot light from each into scene S Consider interaction between a light patch and all receiving patches S Light is deposited in each of these T Sort patches according to energy S Shoot light from highest stored patch T Iterate Issues T Light may arrive back: iterative process S Guaranteed to converge (light lost each time) T Must consider “shadowing” at each step T Very sensitive to patch definitions S Aliasing if patch shouldn’t have constant illum. S Can’t know ideal patch structure ahead of time R This is a key problem! Requires progressive refinement CS 4451 Fall 2002 8.