## Ray Tracing on GPUs

Institut fur Informatik, Fachbereich Mathematik und Informatik, Freie Universitat Berlin

Freie Universitat Berlin, 2012

@article{feist2012ray,

title={Ray Tracing on GPUs},

author={Feist, Tom Morris and Wende, Florian},

year={2012}

}

The ray tracing method aims for producing realistic and high-quality images of a scene described by geometric primitives such as triangles, spheres, etc. The basic idea is quiet simple and allows for straight forward implementations of this technique on the computer. At its core is a set of rays, each of which corresponding to one of the image’s pixels in the 1st order. These rays then are traced through the scene we want to create an image of. For each ray-primitive pair an intersection test is performed. If there are actually primitives that have a 3D point in common with the ray, we are to find out the intersection point which is closest to the respective pixel, and for that point we need to evaluate the (Phong) lighting equation. As a result, for each pixel we get its color, giving us a first impression of the scene. It is quiet obvious that the image based on this 1st-order-rays-only approach is far away from what we consider "realistic" and "high-quality". For this reason, it is usual to also take higher than 1st order rays into account. That is, for each ray the closest intersection point (if there is any) becomes the origin of new rays; and for these rays the whole procedure also applies, yielding a hierarchy of rays for each pixel. In this way, it is possible to incorporate reflection and refraction effects, making the image appear more realistic. As the computational amount of the entire procedure grows linearly with the number of pixels considered (and exponentially with the depth of the ray hierarchy for each pixel) and the complexity of the scene, it becomes necessary to introduce efficient data structures that help reduce the overall computational amount. Since the most expensive part of the ray tracing procedure is ray-primitive intersection testing, an efficient traversal method for the scene is required. Amongst further algorithmically optimizations, this report also focuses on how to speed up computations by means of multi processor architectures; multi-core CPUs and GPUs namely.

February 21, 2013 by hgpu