CS 445 / 645 Introduction to Computer GraphicsGlobal IlluminationThe ‘Rendering Equation’Recursive Ray TracingSlide 5Slide 6Slide 7Problems With Ray TracingRadiositySlide 10Radiosity EquationSlide 12Solving for all PatchesSlide 14Slide 15Slide 16Form FactorsForm Factor – Another exampleForm Factor – Another ModelSlide 20View-dependent vs View-independentCS 445 / 645Introduction to Computer GraphicsLecture 16Lecture 16RadiosityRadiosityLecture 16Lecture 16RadiosityRadiosityGlobal IlluminationGlobal Illumination (Angel Ch. 13)Global Illumination (Angel Ch. 13)•The notion that a point is illuminated by more than light The notion that a point is illuminated by more than light from local lights; it is illuminated by all the emitters and from local lights; it is illuminated by all the emitters and reflectors in the global scenereflectors in the global scene–Ray TracingRay Tracing–RadiosityRadiosityGlobal Illumination (Angel Ch. 13)Global Illumination (Angel Ch. 13)•The notion that a point is illuminated by more than light The notion that a point is illuminated by more than light from local lights; it is illuminated by all the emitters and from local lights; it is illuminated by all the emitters and reflectors in the global scenereflectors in the global scene–Ray TracingRay Tracing–RadiosityRadiosityThe ‘Rendering Equation’Jim Kajiya (Current head of Microsoft Research) developed this in Jim Kajiya (Current head of Microsoft Research) developed this in 19861986I(x, x’) is the total intensity from point x’ to xI(x, x’) is the total intensity from point x’ to xg(x, x’) = 0 when x/x’ are occluded and 1/dg(x, x’) = 0 when x/x’ are occluded and 1/d22 otherwise (d = distance otherwise (d = distance between x and x’)between x and x’)(x, x’) is the intensity emitted by x’ to x(x, x’) is the intensity emitted by x’ to x(x, x’,x’’) is the intensity of light reflected from x’’ to x through x’(x, x’,x’’) is the intensity of light reflected from x’’ to x through x’S is all points on all surfacesS is all points on all surfacesJim Kajiya (Current head of Microsoft Research) developed this in Jim Kajiya (Current head of Microsoft Research) developed this in 19861986I(x, x’) is the total intensity from point x’ to xI(x, x’) is the total intensity from point x’ to xg(x, x’) = 0 when x/x’ are occluded and 1/dg(x, x’) = 0 when x/x’ are occluded and 1/d22 otherwise (d = distance otherwise (d = distance between x and x’)between x and x’)(x, x’) is the intensity emitted by x’ to x(x, x’) is the intensity emitted by x’ to x(x, x’,x’’) is the intensity of light reflected from x’’ to x through x’(x, x’,x’’) is the intensity of light reflected from x’’ to x through x’S is all points on all surfacesS is all points on all surfaces SdxxxIxxxxxxxgxxI '''',''',',',',',Recursive Ray TracingCast a ray from the Cast a ray from the viewer’s eye through viewer’s eye through each pixeleach pixelCompute intersection of Compute intersection of this ray with objects this ray with objects from scenefrom sceneClosest intersecting Closest intersecting object determines colorobject determines colorCast a ray from the Cast a ray from the viewer’s eye through viewer’s eye through each pixeleach pixelCompute intersection of Compute intersection of this ray with objects this ray with objects from scenefrom sceneClosest intersecting Closest intersecting object determines colorobject determines colorRecursive Ray TracingFor each ray cast from eyepointFor each ray cast from eyepoint•If surface is struckIf surface is struck–Cast ray to each light source (shadow ray)Cast ray to each light source (shadow ray)–Cast reflected ray (feeler ray)Cast reflected ray (feeler ray)–Cast transmitted ray (feeler ray)Cast transmitted ray (feeler ray)–Perform Phong lighting on all Perform Phong lighting on all incoming lightincoming light•Note diffuse component of Phong lightingNote diffuse component of Phong lightingis not pushed through the systemis not pushed through the system For each ray cast from eyepointFor each ray cast from eyepoint•If surface is struckIf surface is struck–Cast ray to each light source (shadow ray)Cast ray to each light source (shadow ray)–Cast reflected ray (feeler ray)Cast reflected ray (feeler ray)–Cast transmitted ray (feeler ray)Cast transmitted ray (feeler ray)–Perform Phong lighting on all Perform Phong lighting on all incoming lightincoming light•Note diffuse component of Phong lightingNote diffuse component of Phong lightingis not pushed through the systemis not pushed through the systemRecursive Ray TracingComputing all shadow and feeler rays is slowComputing all shadow and feeler rays is slow•Stop after fixed number of iterationsStop after fixed number of iterations•Stop when energy contributed is below thresholdStop when energy contributed is below thresholdMost work is spent testing ray/plane intersectionsMost work is spent testing ray/plane intersections•Use bounding boxes to reduce comparisonsUse bounding boxes to reduce comparisons•Use bounding volumes to group objectsUse bounding volumes to group objects•Parallel computation (on shared-memory machines)Parallel computation (on shared-memory machines)Computing all shadow and feeler rays is slowComputing all shadow and feeler rays is slow•Stop after fixed number of iterationsStop after fixed number of iterations•Stop when energy contributed is below thresholdStop when energy contributed is below thresholdMost work is spent testing ray/plane intersectionsMost work is spent testing ray/plane intersections•Use bounding boxes to reduce comparisonsUse bounding boxes to reduce comparisons•Use bounding volumes to group objectsUse bounding volumes to group objects•Parallel computation (on shared-memory machines)Parallel computation (on shared-memory machines)Recursive Ray TracingJust a Sampling MethodJust a Sampling Method•We’d like to cast infinite rays and combine illumination We’d like to cast infinite rays and combine illumination results to generate pixel valuesresults to generate pixel values•Instead, we use pixel locations to guide ray castingInstead, we use pixel locations to guide ray castingProblems?Problems?Just a Sampling MethodJust a Sampling Method•We’d like to cast
View Full Document