Skip to main content
Log in

Efficient kd-tree construction for ray tracing using ray distribution sampling

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

Although regarded as a standard heuristic for constructing a kd-tree, Surface Area Heuristic (SAH) suffers from degrading traversal performance as well as unnecessary acceleration structure construction due to its assumption of uniform ray distribution. In this paper, first, we propose a Grid based Ray Distribution Heuristic (GRDH) to construct a high quality kd-tree. The information of ray distribution is sampled and recorded in a sparse grid, which is also utilized to partition primitives efficiently. The heuristic only evaluating traversal cost on limited splitting candidates, is fast and easy to be implemented. Then, we introduce a novel ray tracing pipeline with two-pass construction and two-pass tracing routine to enable an on-demand construction algorithm. In the pipeline, after constructing a partially structured kd-tree, rays are classified by whether triggering transitions to construct unstructured leaf nodes, and being traced in different tracing passes. For on-demand construction, this raises the barrier of interleaving with traversal routine, as well as enables the algorithm to be flexible on multi-core computation platform. Additionally, GRDH is also combined into on-demand construction for high traversal performance. The experimental results demonstrate that the on-demand GRDH construction algorithm can achieve a speedup of 1.63 ~ 1.95 in overall frame performance for scenes with more than 360K primitives.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

References

  1. Bentley JL (1975) Multidimensional binary search trees used for associative searching. Commun ACM 18(9):509–517

    Article  MathSciNet  MATH  Google Scholar 

  2. Bittner J, Havran V (2009) RDH: ray distribution heuristics for construction of spatial data structures, Proceedings of the 25th Spring Conference on Computer Graphics, pp 51–58

  3. Choi B, Chang B, Ihm I (2012) Construction of efficient kd-trees for static scenes using voxel-visibility heuristic. Comput Graph 36(1):38–48

    Article  Google Scholar 

  4. Choi B, Komuravelli R, Lu V, Sung H, Bocchino RL, Adve SV, Hart JC (2010) Parallel SAH k-D tree construction for fast dynamic scene ray tracing, high performance graphics, pp 77–86

  5. Djeu P, Hunt W, Wang R, Elhassan I, Stoll G, Mark WR (2011) Razor: an architecture for dynamic multiresolution ray tracing. ACM Trans Graph 30(5):115:1–115:26

    Article  Google Scholar 

  6. Fabianowski B, Fowler C, Dingliana J (2009) A cost metric for scene-interior ray origins, Eurographics Short Papers, pp 49–52

  7. Feltman N, Lee M, Fatahalian K (2012) SRDH: specializing BVH construction and traversal order using representative shadow ray sets, Eurographics Conference on High-Performance Graphics, pp 49–55

  8. Fujimoto A, Tanaka T, Iwata K (1986) Arts: accelerated ray-tracing system. IEEE Comput Graph Appl 6(4):16–26

    Article  Google Scholar 

  9. Havran V (2000) Heuristic ray shooting algorithms, Ph.D. Thesis

  10. Hunt W, Mark WR, Fussel D (2007) Fast and lazy build of acceleration structure from scene hierarchies, IEEE Symposium on Interactive Ray Tracing, pp 47–54

  11. Hunt W, Mark WR, Stoll G (2006) Fast kd-tree construction with an adaptive error-bounded heuristic, symposium on interactive ray tracing, Los Alamitos, CA, USA, pp 81–88

  12. Hurley J, Kapustin E, Reshetov E, Soupikov A (2002) Fast ray tracing for modern general purpose CPU, In Proceedings of Graphicon, 7(5):2002

  13. Kang Y-S, Nah J-H, Park W-C, Yang S-B (2013) gkDtree: a group-based parallel update kd-tree for interactive ray tracing. J Sys Archit, pp 166–175

  14. Lauterbach C, Garland M, Sengupta S, Luebke D, Manocha D (2009) Fast BVH construction on GPUs. Comput Graphics Forum 28(1):375–384

    Article  Google Scholar 

  15. Liang X, Yang H, Qian Y, Zhang Y (2014) A fast Kd-tree construction for ray tracing based on efficient ray distribution. J Softw 9(3):596–604

    Google Scholar 

  16. MacDonald J, Booth K (1990) Heuristics for ray tracing using space subdivision. Vis Comput 6(3):153–166

    Article  Google Scholar 

  17. Pharr M, Humphreys G (2010) Physically based rendering, 2nd edn, From theory to implementation. Morgan Kaufmann Publishers Inc, San Francisco

    Google Scholar 

  18. Popov S, Günther J, Seidel H-P, Slusallek P (2006) Experiences with streaming construction of SAH KD-trees, Proceedin of the 17th Eurographics Ysmposium on Rendering, pp 139–149

  19. Reshetov A, Soupikov A, Hurley J (2005) Multi-level ray tracing algorithm. ACM Trans Graph 24(3):1176–1185

    Article  Google Scholar 

  20. Rubin S, Whitted T (1980) A 3-dimensional representation for fast rendering of complex scenes, In Proceedings of SIGGRAPH, pp 110–116

  21. Shevtsov M, Soupikov A, Kapustin A (2007) Highly parallel fast KD-tree construction for interactive ray tracing of dynamic scenes. Comput Graphics Forum 26(3):395–404

    Article  Google Scholar 

  22. Solomon H (1978) Geometric probability, J.W. Arrowsmith Ltd

  23. Vinkler M, Havran V, Sochor J (2012) Visibility driven BVH build up algorithm for ray tracing. Comput Graph 36(4):283–296

    Article  Google Scholar 

  24. Wächter C, Keller A (2006) Instant ray tracing: the bounding interval hierarchy, Proceedings of the 17th Eurographics Symposium on Rendering, pp 139–149

  25. Wald I, Ize T, Kensler A, Knoll A, Parker SG (2006) Ray Tracing Animated Scenes using Coherent Grid Traversal. ACM Trans Graph (Proc ACM SIGGRAPH) 25(3):485–493

    Article  Google Scholar 

  26. Wald I, Slusallek P, Benthin C, Wagner M (2006) On building fast kd-trees for ray tracing, and on doing that in O(N log(N), Proceedings of the 2006 I.E. Symposium on Interactive Ray Tracing, pp 61–69

  27. Wu Z, Zhao F, Liu X (2011) SAH KD-tree construction on GPU. high performance graphics, pp 71–78

  28. Zhou K, Hou Q, Wang R, Guo B (2008) Real-time KD-tree construction on graphics hardware, ACM SIGGRAPH Asia, pp 126:1–126:11

Download references

Acknowledgments

The authors wish to thank the anonymous reviewers. The research is supported by National Natural Science Foundation of China with grant No. 61472261, National Key Technology R&D Program of China with grant No. 2012BAH62F03, Youth Foundation of Southwest Petroleum University with grant No. 0202002131285, Talent Project of Science and Technology Innovation of Sichuan Province with grant No. 14-YCG052, Science Project of Education Department of Sichuan Province with grant No. 020402000091.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yanci Zhang.

Electronic supplementary material

Below is the link to the electronic supplementary material.

(MP4 13062 kb)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liang, X., Yang, H., Zhang, Y. et al. Efficient kd-tree construction for ray tracing using ray distribution sampling. Multimed Tools Appl 75, 15881–15899 (2016). https://doi.org/10.1007/s11042-015-2896-7

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-015-2896-7

Keywords

Navigation