Figure 1 Two path traced scenes, showing indirect lighting, soft shadows and depth of field. Plane scene modeled by IGAD student Nils Ruisch.
AUTHOR: Jacco Bikker
Jacco Bikker, NHTV University of Applied Sciences, Breda, The Netherlands.At NHTV, Jacco is senior lecturer for the IGAD course on game architecture and design, teaching C/C++ optimization and graphics programming courses. He also coaches students that work on game projects using the Arauna real-time ray tracer, which he developed.
Apart from lecturing, Jacco pursues a PhD in computer graphics at the Delft Technical University. His research is on real-time ray tracing and path tracing, applied to the field of games.
Computer graphics for movies and high-quality animations are often rendered using a process called path tracing . Using this rendering technique, single frames take minutes or even hours to render. However, path tracing manages to capture almost all physical phenomena, including indirect lighting and caustics, in a single, clean algorithm. We show that by applying algorithms borrowed from recent advances in real-time ray tracing, path tracing in real-time on consumer hardware is near.
PATH TRACING IN REAL-TIME:
Path tracing is a physically based rendering technique, based on ray tracing. Where regular recursive ray tracing  (Whitted-style) is able to render reflections, refractions, and shadows, path tracing also handles diffuse reflections, indirect light, and even caustics. It does this by replacing the integrals involved in these effects by the expected value of a stochastic process: Soft shadows are calculated by sending several random rays to an area light source; anti-aliasing is calculated as the average of several random rays over the area of a pixel, and so on. Randomness means noise, and thus the resulting image quality depends on the number of samples. A path traced image converges over time, as more samples are added to previous frames.
Figure 3 Examples of real-time ray traced graphics: Sponza, “Time of Light” pinball, and Outbound. All projects based on the Arauna ray tracer, and created by students of the IGAD program.
A few years ago, ray tracing on consumer hardware became feasible . Ray tracing is nearly ideally suited to recent processor technology: It is easy to trace several (tiles of) pixels in parallel, and SIMD can be used effectively to trace several rays (a packet) at once. However, for this to work, coherent ray packets are needed. Rays in such a packet have a similar origin, and travel in similar directions. This complicates the application of these techniques to path tracing, where rays generally quickly diverge due to diffuse bounces.
The main focus of our research is on how to find coherence in rays that seemingly go everywhere. The core observation here is that, given a large enough set of rays, it is very likely that a group of rays exists that can be considered ‘coherent’. The second observation is that a number of rays that is already known to travel a certain area of the scene has greater coherency than the same number of rays without that spatial constraint (see figure 4).
Figure 4 A random selection of three rays possesses far less coherence than a random selection of three rays that is known to travel area C.
We thus find coherency by stepping all rays through a simple grid (or octree). The sets of rays in the grid cells are then processed using regular packet traversal schemes.
In our scheme, rays in a grid cell are propagated until they leave that cell. At that point, they are added to a neighboring cell, which is not necessarily processed next: Cells are processed in order of saturation. This means that at any point in time, a large amount of rays is ready to be processed. This turns out to be a huge advantage for our next step: Path tracing on a heterogeneous architecture.
Even though the performance of today’s processors is very impressive, it is not sufficient to make path tracing real-time in the near future. It thus makes sense to look for other computing devices, which can be used as coprocessors for the main CPU. Our current architecture contains a plug-in system for this. For all plugins, the CPU performs the shading and final image processing. Ray traversal is handled either by the CPU or any other device. Originally developed to support the upcoming Intel Larrabee processor, this system is also able to use CUDA/OpenCL devices, as well as devices connected over a network. Ultimately, we strive for a plug-in system where not only ray traversal can be done by various available devices, but also shading.
The ultimate goal of this research is to create a proof-of-concept path traced game. Our students at the IGAD program of the NHTV University of Applied Sciences will be able to work with an API similar to the Arauna API4. Arauna has been used for six student games so far (see a selection at: http://igad.nhtv.nl/~bikker/projects.htm), and has proven to be a suitable game development platform. Exposing students to experimental technology prepares them well for a career in the game industry: Their skills are not limited to tricks of the trade, but will actually include state of the art in graphics research, which will benefit the industry itself.
1) Kajiya, J. T., The Rendering Equation, proceedings of the 13th annual conference on computer graphics and Interface techniques, ACM, 1986
2) Whitted, T., An Improved Illumination Model for Shaded Display, communications of the ACM, volume 23, issue 6, 1980
3) Wald, I., Slussalek, P., Benthin, C., Interactive Rendering with Coherent Raytracing, in Rendering Techniques 2001 – Proceedings of the 12th Eurographics Workshop on Rendering, 2001
4) Bikker, J., Ray Tracing through the Eyes of a Game Developer, Proceedings of the 2007 IEEE Symposium on Interactive Ray Tracing
To find more information about this project, visit http://igad.nhtv.nl/~bikker . Information about the IGAD course of the NHTV University is available at http://www.nhtv.nl/made .