OpenCL GPGPU Spatial Partitioning Raytracing

Revision as of 12:22, 22 October 2017 by Vasco.costa (talk | contribs)

Contact "brlcad" on

BRL-CAD has one of the oldest and fastest parallel ray tracing implementations around but we don't currently leverage the GPU. With implicit geometry and constructive solid geometry (CSG) Boolean operations, we also have a very different approach to ray tracing that has its own set of academic challenges.

Your project is to help us introduce a GPGPU pipeline into BRL-CAD using OpenCL. You're welcome to use a library that encapsulates OpenCL.

Currently we use a Bounding Volume Hierarchy (BVH), an object partitioning scheme, to reduce the amount of intersections that we need to compute on the OpenCL librt. The advantage of the BVH is that it does not compute duplicate intersections, which is typically an issue with spatial partitioning schemes. This allows us to use less per thread memory since we do not require the use of mailboxing . But an issue with the BVH is that it requires computing all the primitive intersections along the ray path. This is an issue in scenes with high depth complexity like Goliath or architectural scenes.

This task requires you to write an ANSI C prototype of a new spatial partitioning acceleration structure for BRL-CAD and to port this prototype to OpenCL.

The ANSI C librt uses a BSP tree (really a Kd-tree) so that can be used an initial example. You can also use the PBRT Kd-tree source code as an initial example.

Difficulty: Hard

Languages: C and OpenCL (or other GPGPU API)