Ray Classification for Accelerated BVH Traversal Jakub Hendrich
Ray Classification for Accelerated BVH Traversal Jakub Hendrich, Adam Pospíšil, Daniel Meister, Jiří Bittner
BVH Traversal San Miguel (7. 8 M tris) 2
Previous Work 5 D ray-space Shaft culling BVHs & SAH [Arvo 87, Müller 17, …] [Haines 94, Bala 99, Reshetov 05, …] [Goldsmith 87, Wald 07, Ganestam 15, …] 3
Main Idea 4
Accelerated Traversal 1. shaft = classify(ray) 2. if (shaft. candidate. List): 3. 4. 5. stack. push(shaft. candidate. List) else: stack. push(bvh. root) 6. // original traversal kernel 7. while (!stack. empty()): 8. node = stack. pop() 9. … 5
Construction Outline input: scene, BVH for each voxel in scene for each interval in directional cube map construct frustum shaft geometry create candidate list 6
Shaft Geometry 7
Candidate List Construction Starting from BVH root, replace nodes with children until a termination criterion is met: 1. no intersection with the shaft 2. leaf node 3. low hit probability 8
Estimating Hit Probability When to stop opening and replacing nodes with their children? crucial decision: too early: staying close to root, not saving many steps too late: long candidate lists, possibly adding trav. steps Considering: node hit ratio (20 sample rays) vs. threshold occlusion: don’t open nodes behind geometry 9
Memory Optimizations 10
Evaluation Setup std. C++11, threads, no SIMD PBRT v 3 [Pharr 16] binary & quaternary BVHs 10 scenes, 3 cameras each (1920 x 1080 px, 8 spp) 11
Evaluated Variants Complete Occupied Voxels View Dependent Measured: build size build time traversals per ray First. Hit / Any. Hit / total render time 12
Rendering speedup Conference (330 k tris) 13
Rendering speedup San Miguel (7. 8 M tris) 14
Rendering speedup Happy Buddha (1. 1 M tris) 15
Speedup wrt. Memory Consumption (Conference) 16
Conclusion Ray classification for accelerated BVH traversal ray space subdivision + precomputed compact candidate lists algorithm for optimized candidate list computation Easy to plug into & use within existing framework Up to 1. 25 x speedup in PBRT 17
Future Work Wide BVHs & optimized traversal kernels Tailor for any-hit usage Combine with path guiding [Müller 17] Ray reordering [Bikker 12] 18
Ray Classification for Accelerated BVH Traversal Thank You! → http: //dcgi. fel. cvut. cz/projects/rc+bvh 19
Memory Layout 20
CL Length Distribution Conference (330 k tris) San Miguel (7. 8 M tris) 21
Candidate List Construction 1. stack. push(bvh. root) 2. while (!stack. empty()): 3. node = stack. pop() 4. if (shaft. overlaps(node)): 5. if (node. is. Inner()): 6. p = shaft. get. Hit. Probability(node, sample. Rays) 7. if (p >= min. Hit. Probability): stack. push(all node. children) 8. else: 9. node = shaft. cull. Node. Subtree(node) 10. if (node. valid()): shaft. candidate. List. append(node) 11. 12. else: // leaf shaft. candidate. List. append(node) 22
- Slides: 22