Download presentation
Presentation is loading. Please wait.
215
COMPUTER GRAPHICS NOVEMBER 3, 2015 CS 482 – FALL 2015
ADVANCED RENDERING RAY TRACING PHOTON MAPPING
216
NOVEMBER 3, 2015: ADVANCED RENDERING
RAY TRACING OVERVIEW Ray tracing is a brute force method for resolving the hidden surface problem (as well as many others). In ray tracing, a virtual screen and a virtual viewpoint are defined in the same coordinate system as the objects to be rendered. A ray is projected from the viewpoint through every pixel in the screen, and on into the object space. This ray is tested for intersection against every object in the scene. If no object is hit, the background is rendered; otherwise, the closest object to the viewport is rendered. CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 216
217
NOVEMBER 3, 2015: ADVANCED RENDERING
RAY TRACING SHADOWS If an object is hit, a second ray is projected from the intersection point towards the simulated light source. If this second ray hits another object, then the original intersection point is in shadow. CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 217
218
RAY TRACING ASSET MANAGEMENT
Pixar’s Cars used expansive sets with lots of tiny, detailed geometry, which would have caused resolution problems if shadow maps had been used. Asset management would also be a problem when there are nearly 1000 light sources, as in this scene. Using ray traced shadows eliminated both problems. CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 218
219
NOVEMBER 3, 2015: ADVANCED RENDERING
RAY TRACING REFLECTION If the intersected object is reflective, a second ray is projected from the intersection point at the angle of reflection. If that second ray also intersects an object, then the original intersection point should “reflect” the object at the second intersection. CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 219
220
NOVEMBER 3, 2015: ADVANCED RENDERING
RAY TRACING REFLECTION EXAMPLES CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 220
221
NOVEMBER 3, 2015: ADVANCED RENDERING
RAY TRACING MULTIPLE REFLECTION If the secondary ray also hits a reflective object, then the original intersection is also affected, and so on... CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 221
222
PHOTON MAPPING RUSSIAN ROULETTE
Ray tracing computes only light based on direct illumination, ignoring the fact that light bounces around objects and surfaces before landing. Photon mapping addresses this problem by first casting rays from the light source into the scene, with each collision with an object in the scene determined to be a reflection, a refraction, or an absorption of the light. Because only a sample of rays are cast from the light source, each ray is given a probability of producing a reflection, a refraction, or an absorption, with the odds weighted heavily towards the appropriate response for the object being hit. Non-specular, Non-Translucent objects will mainly produce absorptions. Specular objects will mainly produce reflections. Translucent objects will mainly produce refractions. CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 222
223
PHOTON MAPPING COLOR BLEEDING Direct Illumination ONLY
When light bounces around a scene, diffuse interreflections accumulate color at every step, causing colors to “bleed” onto their surroundings. Photon mapping allows a photon to make any number of specular bounces, but at the first diffuse bounce, it is stored in the photon map and another photon is generated. This allows the reflected color to be transferred to the next diffuse surface. Direct Illumination ONLY WITH Photon Mapping CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 223
224
NOVEMBER 3, 2015: ADVANCED RENDERING
PHOTON MAPPING REFRACTED CAUSTICS A vortex perturbing the water surface causes extra photons to congregate at some underwater locations, and few photons to congregate at other locations. CS 482 – FALL 2015 NOVEMBER 3, 2015: ADVANCED RENDERING PAGE 224
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.