5/7/07

Coherent grid traversal

Last week I implemented the grid traversal approach from "Ray Tracing Animated Scenes using Coherent Grid Traversal". For me it was a good crash course in coherent ray tracing using ray packets, and I got some experience in implementing SIMD packet traversal and triangle intersection. I got a pretty nice speedup as well, as the table below shows. I haven't implemented coherent ray tracing for the BIH yet, but that shouldn't be too hard.

TrianglesMono gridMono BIHCoherent grid
Hand17K1.921.885.8
Bunny69K1.691.964.4
Armadillo346K1.442.22.8
Dragon871K0.790.951.88
Asian Dragon7.2M0.181.030.35


The table shows the frame rates achieved with the different approaches at 800x800. All except the hand model are from The Stanford 3D Scanning Repository (note no animations this time). In the table, "mono" refers to tracing one ray at a time, whereas "coherent" means tracing 4x4 rays at once in a coherent fashion. Note also that only the coherent version is optimized with SIMD using SSE intrinsics. Using a coherent grid traversal versus a single ray grid traversal gives me a 2x-3x speedup currently. An interesting thing to note from the table is that the BIH traversal is much less affected by the model complexity than the grid traversal. In fact it seems that the BIH tree quality is of higher importance than the model complexity.

References:
Ray Tracing Animated Scenes using Coherent Grid Traversal
The Stanford 3D Scanning Repository

No comments: