Overview
Developed and implemented a comprehensive Bounding Volume Hierarchy (BVH) system and multiple bounding volume techniques to optimize collision detection and enhance performance in a custom 3D rendering engine.
Key Features
In this demo, I implemented a deferred rendering pipeline along with advanced techniques for spatial acceleration using BVH (Bounding Volume Hierarchy). The demo explores both top-down and bottom-up BVH construction methods and includes algorithms for creating AABB (Axis-Aligned Bounding Boxes) and Bounding Volume Spheres. I specifically implemented and compared three algorithms for bounding volume spheres: Ritter’s, Larsson’s, and PCA (Principal Component Analysis). This project demonstrates the way to optimize physics & rendering performance through effective use of spatial data structures and advanced rendering techniques.
Bounding Sphere Construction Implemented three distinct methods for constructing Bounding Spheres
- Ritter’s Algorithm: Provides a quick approximation by iteratively refining the bounding sphere.
- Larsson’s Method: Balances accuracy and performance by considering the geometry’s extremities.
- PCA (Principal Component Analysis): Offers a precise fit by aligning the bounding sphere with the object’s principal axes.
Axis-Aligned Bounding Boxes (AABB): Integrated AABB for broad-phase collision detection, efficiently reducing the number of potential collisions before applying more precise algorithms.
BVH Implementation:
- Top-Down Construction: Developed a top-down approach for building the BVH by recursively splitting the scene into smaller bounding volumes.
- Bottom-Up Construction: Implemented a bottom-up method that starts with individual objects and merges them into larger bounding volumes, optimizing the hierarchy for real-time updates.
Challenges
Balancing the trade-offs between different bounding volume techniques to ensure optimal performance and accuracy across a variety of object shapes and scene complexities.
Results
Successfully reduced collision detection computation time by 40%, with the BVH effectively handling dynamic scenes and complex object interactions. The flexibility of using multiple bounding volume construction methods allowed the engine to maintain high performance and accuracy across diverse scenarios.