140 likes | 403 Views
MP2: Global Illumination. Advanced Graphics Rendering and Appearance Modeling Chris Lattner May 5, 2003. What I’ve done. Global Illumination: Specifically, chasing after caustics and other indirect illumination Local illumination model is simple (phong) Two approaches:
E N D
MP2: Global Illumination Advanced Graphics Rendering and Appearance Modeling Chris Lattner May 5, 2003
What I’ve done... • Global Illumination: • Specifically, chasing after caustics and other indirect illumination • Local illumination model is simple (phong) • Two approaches: • bi-directional raytracing • photon mapping • Built on my existing raytracer • All timings are on an 800mhz P3 laptop
Implementation Details: • Bi-directional Raytracing: • Deposit energy into texture map • Requires tweaking texture resolution • Photon Mapping: • Standard model, uses kd-tree for storage • No projection map, no irradiance cache • Both: • GI only used for indirect illumination • Raytracer handles direct illumination
Example Results: “Simple” Scene • 2 light sources • One “glass sphere” • One reflective sphere • One cylinder • Caustics: • Cardioid from cylinder • Two focusing caustics from glass sphere
Simple: No Global Illumination • Render Time: 217 seconds (800x600)
Simple: Photon Mapped Result • Render Time: 436 seconds • 20,000 photons shot, 30 samples per pixel
Simple: Photon Mapped Result • Render Time: 1344 seconds • 150,000 photons shot, 75 samples per pixel
Simple: Bi-directional Raytracer • Render Time: 402 seconds • 410 rays shot, 512x512 light map
Glass: No Global Illumination • Render Time: 88 seconds (800x600) • Note lack of illumination in the liquid
Glass: Photon Mapped Result • Render Time: 524 seconds • 200,000 photons shot, 100 samples per pixel
Glass: Bi-directional Raytracer • Render Time: 124 seconds • 410 rays shot, 256x256 light map
Example Results: Pool of water • Photon mapped hole with bump mapped surface • Different bump map amplitude & frequency
Example Results: Teapot Caustic • Bezier patch model (but no bottom) • Photon mapped, note highlights on teapot
Overall Impressions • Bi-di can give better results (and renders faster), if you’re willing to tweak it all day long • Photon mapping requires more optimizations (than I implemented) to make it practical • Photon mapping has better theoretical background, better as a framework for many extensions • My bi-di implementation is a big hack