-
Notifications
You must be signed in to change notification settings - Fork 11
Description
This issue layouts the big picture plan for my thesis. To render transparency, I am using ray tracing. The key implementations are:
Acceleration structure
For ray tracing, I am choosing SBVH, Spatial Splits in BVH. The advantage of SBVH includes a faster traversal similar to kd-tree while maintaining the BVH structure. The leaf nodes only split when there is an overlap between two primitives' bounding boxes. SBVH is also a good candidate for collision detection if my timeline allows.
Parallelization on CPU
Tasks
- SBVH construction. The SBVH construction is done for the next frame while the rendering threads display the frame buffer for the current from.
- Ray tracing and tree SBVH traversal. The basic algorithm is:
- For each pixel, generate a primary ray and input into a queue. For each available thread, grabs a ray from the queue a compute its pixel value. When the queue is empty, draw the image.
- Since each ray is computed independently, we might incur a synchronization overhead. It would likely be more beneficial to have each thread grabs more than one ray from the queue.
- Collision detection can utilize the SBVH structure. For each object in the scene, we can traverse the tree and search for bounding box intersection.
Architecture
- A thread manager manages the available thread pool. SBVH construction is done on its own dedicated thread, while the task of ray tracing can be spread across multiple threads.
- Parallelization should be able to toggle on/off for comparison.
With the advantage of Vulkan's support for multithreading, these tasks should have increasing speed by off-loading work on the CPU.
Mesh import
The engine support glTF loading via tinygltf.
Timeline
Jan - Feb: SBVH construction and ray tracing (single thread)
March: Parallelization
March - May: Start with writing the paper