In order raytracing to be done in reasonable time, in most cases an
acceleration structure must be used. It organises, otherwise random,
list of triangles in the scene. When we shot a ray it allows to
immediately discard most of the triangles and costly ray-triangle
intersection algorithm must be performed only in few instances.
Commonly the structure, either KD-Tree or BVH (Bounded Volume
Hierarhy), is build on CPU and consumes few seconds to complete. If
the underlying object moves or changes its shape, the structure must
be either updated, or built from scratch. This is a major obstacle in
real-time raytracing.
There are two ways to attack the problem - either simplify the
building algorithm, producing slightly worse hierary, or try to
parallelise the algorithm and port it onto graphics cards.
Unfortunately not all algorithms can be parallelised. Using
unparallelised algorithms would waste most of computational power of
GPU.
My work is to explore different ways of building those structures:
compare their efficiency and build time, initially on CPU and then try
to port them on GPU using CUDA.
It should be noted that there already exists one CUDA algorithm for KD-
Trees. This structure is probably the best one for static scenes, but
requires lots of updates when rendered objects begin to move.
I also have some ideas to explore - hybrid constructs which would be
as efficient as KD-Trees and as flexible as BVH.