Download presentation
Presentation is loading. Please wait.
244
COMPUTER GRAPHICS CHAPTER 32 CS 482 – Fall 2017 ADVANCED RENDERING
RAY TRACING PHOTON MAPPING
245
CHAPTER 32: 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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 245
246
CHAPTER 32: 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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 246
247
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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 247
248
CHAPTER 32: 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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 248
249
CHAPTER 32: ADVANCED RENDERING
RAY TRACING REFLECTION EXAMPLES CS 482 – Fall 2017 CHAPTER 32: ADVANCED RENDERING PAGE 249
250
CHAPTER 32: 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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 250
251
RAY TRACING MULTIPLE REFLECTION
How deep is the multiple reflection in this ray traced image? Some rays are reflected 16 times in this image! CS 482 – Fall 2017 CHAPTER 32: ADVANCED RENDERING PAGE 251
252
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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 252
253
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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 253
254
CHAPTER 32: 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 2017 CHAPTER 32: ADVANCED RENDERING PAGE 254
255
PHOTON MAPPING COLOR BLEEDING AND REFRACTED CAUSTICS
The color bleeding underneath the leaf is generated by means of photons mapped from the light source and traveling through the thin leaf surface to carry the orange-yellow color to the surface beneath the leaf. The caustic refracted light on the leaf beneath the glass orb is generated by means of photons mapped from the light source and refracted through the orb. CS 482 – Fall 2017 CHAPTER 32: ADVANCED RENDERING PAGE 255
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.