Lukasz.dk

Lukasz’ Ray Tracer

lzrt is a product of my master thesis in computer science entitled “Ray Tracing on the IBM Cell Processor”. The focus in my thesis was on the geometric aspect of ray tracing, optimizing the search for the nearest triangle a ray hits. This is achieved by using a kd-tree as an acceleration structure. lzrt supports animation by rebuilding the kd-tree for every new frame. On the graphics side lzrt is very basic with only Phong shading support, a very basic Lightwave Object (LWO) loader, only supporting one ray pr. pixel and no texture support. lzrt does however support shadow and reflection rays, and also multicore processors. Performance on x86 is quite good, however it is poor on the Cell, considering the potential, please read the lzrt Performance document for more details.

From a technical view lzrt is multiplatform ray tracing application in C and C++, tested on x86 Ubunu 7.10/8.10, PowerPC 7.10/8.10 and the Cell (PS3) Ubuntu 7.10/8.10 (using the SPUs). Alot of the functions and algorithms have been optimized for Single Instruction Multiple Data (SIMD) on both the PowerPC and the SPUs. The input scenes lzrt are defined and animated using a Lua script.

In order to compile lzrt you need to have the Cell SDK 3.x (3.0 and 3.1 tested) installed on your x86 workstation and then cross compile it for the Cell. To test it, you have to transfer it to your PS3. During development of lzrt I used scp and ssh to transfer and test, and remote desktop to view the graphical output. The source code for lzrt contains a lot of SPU code and may be useful as a reference for others writing a Cell application.

Downloads

References

Screenshots