Shadow Mapping and Ray-Tracing

 

Student: Dave Moderno
Supervisor: António Ramires

Abstract

Shadow Mapping and Ray-Tracing are two algorithms commonly used to determine the shadows of a scene. Shadow Mapping is an extremely fast algorithm, but the shadows it produces aren’t the most perfect ones, especially on the contours of the shadowed areas. On the other hand, Ray-Tracing defines shadows with great precision but is much slower. Combining the strengths of both algorithms, fast and accurate shadows could be obtained.
To achieve this purpose, the shadow mapping technique will be used in various ways to try to reduce the number of rays that the ray-tracer needs to shoot, in order to greatly reduce this algorithm’s performance issues. In other words, this work will try to find out if an efficient ray-tracer can be made by only using the information attained by the shadow mapping technique.
First, tests will be executed in order to verify that the most problematic areas of the shadow mapping approach are in fact the contours of the shadows. With this, this work will try to prove that if the information of the contours is readily available, shadowing techniques can be used to correct these contours instead of being applied on the entire image.
Afterwards, some approaches that will try the before mentioned reduction of ray intersection tests will be tested. For the first approach, when computing the shadow map, the triangle IDs of the shadow casters are stored, and the secondary rays are only tested for intersection against these triangles. In this approach a ray is only tested against a single triangle, the one that is stored inside the pixel of the shadow map where the point being tested projects upon. The second and third approaches are similar to the first one, but will try intersection with more triangles. The second one will also try intersections with the triangles that are stored in the pixels that are neighbours to the pixel obtained by the projection, and the third one will also try intersection with the triangles adjacent to the triangle stored in the pixel. A fourth approach will try to use texel coherence to confirm the shadowing of each pixel. Finally, an algorithm that combines the previous approaches will be proposed.
The goal of this work is to evaluate quantitatively the results obtained using all approaches, using fully ray-traced shadows as ground truth.
For implementation purposes the Curitiba 3D engine will be used as a starting point, and ray-tracing algorithms will be implemented on top of it.

Thesis download (PDF)

 Posted by at 2:07 am