Skip to main content
Log in

Parallel BVH construction using k-means clustering

  • Original Article
  • Published:
The Visual Computer Aims and scope Submit manuscript

Abstract

We propose a novel method for fast parallel construction of bounding volume hierarchies (BVH) on the GPU. Our method is based on a combination of divisible and agglomerative clustering. We use the k-means algorithm to subdivide scene primitives into clusters. From these clusters, we construct treelets using the agglomerative clustering algorithm. Applying this procedure recursively, we construct the entire bounding volume hierarchy. We implemented the method using parallel programming concepts on the GPU. The results show the versatility of the method: it can be used to construct medium-quality hierarchies very quickly, but also it can be used to construct high-quality hierarchies given a slightly longer computational time. We evaluate the method in the context of GPU ray tracing and show that it provides results comparable with other state-of-the-art GPU techniques for BVH construction. We also believe that our approach based on the k-means algorithm gives a new insight into how bounding volume hierarchies can be constructed.

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.

Institutional subscriptions

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

Similar content being viewed by others

References

  1. Aila, T., Karras, T., Laine, S.: On quality metrics of bounding volume hierarchies. In: Proceedings of High Performance Graphics, pp. 101–108. ACM, New York (2013)

  2. Aila, T., Laine, S.: Understanding the efficiency of ray traversal on GPUs. In: Proceedings of HPG, pp. 145–149 (2009)

  3. Apetrei, C.: Fast and simple agglomerative LBVH construction. In: Borgo, R., Tang, W. (eds.) Computer Graphics and Visual Computing (CGVC). The Eurographics Association (2014). doi:10.2312/cgvc.20141206

  4. Arthur, D., Vassilvitskii, S.: \(K\)-means++: the advantages of careful seeding. In: Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’07), pp. 1027–1035. Society for Industrial and Applied Mathematics, Philadelphia (2007)

  5. Bittner, J., Hapala, M., Havran, V.: Fast insertion-based optimization of bounding volume hierarchies. Comput. Graph. Forum 32(1), 85–100 (2013)

    Article  Google Scholar 

  6. Bittner, J., Havran, V.: RDH: ray distribution heuristics for construction of spatial data structures. In: Proceedings of SCCG, pp. 61–67. ACM, New York (2009)

  7. Dammertz, H., Hanika, J., Keller, A.: Shallow bounding volume hierarchies for fast SIMD ray tracing of incoherent rays. Comput. Graph. Forum 27, 1225–1233(9) (2008)

    Article  Google Scholar 

  8. Dasgupta, S.: The hardness of \(k\)-means clustering. Department of Computer Science and Engineering, University of California, San Diego (2008)

  9. Domingues, L.R., Pedrini, H.: Bounding volume hierarchy optimization through agglomerative treelet restructuring. In: Proceedings of the 7th Conference on High-Performance Graphics, pp. 13–20 (2015)

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

  11. Feltman, N., Lee, M., Fatahalian, K.: SRDH: specializing BVH construction and traversal order using representative shadow ray sets. In: Proceedings of HPG, pp. 49–55 (2012)

  12. Ganestam, P., Barringer, R., Doggett, M., Akenine-Möller, T.: Bonsai: rapid bounding volume hierarchy generation using mini trees. J. Comput. Graph. Tech. (JCGT) 4(3), 23–42 (2015)

    Google Scholar 

  13. Garanzha, K., Pantaleoni, J., McAllister, D.: Simpler and faster HLBVH with work queues. In: Proceedings of HPG’11, pp. 59–64. ACM SIGGRAPH/Eurographics, Vancouver (2011)

  14. Goldsmith, J., Salmon, J.: Automatic creation of object hierarchies for ray tracing. IEEE Comput. Graph. Appl. 7(5), 14–20 (1987)

    Article  Google Scholar 

  15. Gu, Y., He, Y., Fatahalian, K., Blelloch, G.E.: Efficient BVH construction via approximate agglomerative clustering. In: Proceedings of high performance graphics, pp. 81–88. ACM, New York (2013)

  16. Havran, V., Herzog, R., Seidel, H.P.: On the fast construction of spatial data structures for ray tracing. Proc. IEEE Symp. Interact. Ray Tracing 2006, 71–80 (2006)

    Article  Google Scholar 

  17. Hunt, W.: Corrections to the surface area metric with respect to mail-boxing. In: IEEE Symposium on Interactive Ray Tracing (RT’08), pp. 77–80 (2008)

  18. Hunt, W., Mark, W.R., Fussell, D.: Fast and lazy build of acceleration structures from scene hierarchies. In: Proceedings of Symposium on Interactive Ray Tracing, pp. 47–54 (2007)

  19. Ize, T., Wald, I., Parker, S.G.: Asynchronous BVH construction for ray tracing dynamic scenes on parallel multi-core architectures. In: Proceedings of Symposium on Parallel Graphics and Visualization’07, pp. 101–108 (2007)

  20. Jain, A.K., Dubes, R.C.: Algorithms for Clustering Data. Prentice-Hall Inc, Upper Saddle River (1988)

    MATH  Google Scholar 

  21. Karras, T.: Maximizing parallelism in the construction of BVHs, octrees, and k-d trees. In: Proceedings of High Performance Graphics, pp. 33–37 (2012)

  22. Karras, T., Aila, T.: Fast Parallel construction of high-quality bounding volume hierarchies. In: Proceedings of High Performance Graphics, pp. 89–100. ACM, New York (2013)

  23. Kay, T.L., Kajiya, J.T.: Ray tracing complex scenes. In: Evans, D.C., Athay, R.J. (eds.) SIGGRAPH ’86 Proceedings, vol. 20, pp. 269–278 (1986)

  24. Kensler, A.: Tree rotations for improving bounding volume hierarchies. In: Proceedings of the 2008 IEEE Symposium on Interactive Ray Tracing, pp. 73–76 (2008)

  25. Krivánek, M., Morávek, J.: NP-hard problems in hierarchical-tree clustering. Acta Inf. 23(3), 311–323 (1986)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  Google Scholar 

  27. Lloyd, S.: Least squares quantization in PCM. IEEE Trans. Inf. Theor. 28(2), 129–137 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  28. MacQueen, J.: Some methods for classification and analysis of multivariate observations. In: Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability. Volume 1: Statistics, pp. 281–297. University of California Press, Berkeley (1967)

  29. Nickolls, J., Buck, I., Garland, M., Skadron, K.: Scalable parallel programming with CUDA. Queue 6(2), 40–53 (2008)

    Article  Google Scholar 

  30. Pantaleoni, J., Luebke, D.: HLBVH: hierarchical LBVH construction for real-time ray tracing of dynamic geometry. In: Proceedings of High Performance Graphics’10, pp. 87–95 (2010)

  31. Rubin, S.M., Whitted, T.: A 3-dimensional representation for fast rendering of complex scenes. In: SIGGRAPH’80 Proceedings, vol. 14, pp. 110–116 (1980)

  32. Vinkler, M., Bittner, J., Havran, V., Hapala, M.: Massively parallel hierarchical scene processing with applications in rendering. Comput. Graph. Forum 32(8), 13–25 (2013)

    Article  Google Scholar 

  33. Wald, I.: On fast construction of SAH based bounding volume hierarchies. In: Proceedings of the Symposium on Interactive Ray Tracing, pp. 33–40 (2007)

  34. Wald, I.: Fast construction of SAH BVHs on the Intel many integrated core (MIC) architecture. IEEE Trans. Vis. Comput. Graph. 18(1), 47–57 (2012)

    Article  MathSciNet  Google Scholar 

  35. Walter, B., Bala, K., Kulkarni, M., Pingali, K.: Fast agglomerative clustering for rendering. In: IEEE Symposium on Interactive Ray Tracing, pp. 81–86 (2008)

  36. Weghorst, H., Hooper, G., Greenberg, D.P.: Improved computational methods for ray tracing. ACM Trans. Graph. 3(1), 52–69 (1984)

    Article  Google Scholar 

Download references

Acknowledgments

This research was supported by the Czech Science Foundation under Research Program P202/12/2413 (Opalis) and the Grant Agency of the Czech Technical University in Prague, Grant No. SGS16/237/OHK3/3T/13.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel Meister.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (avi 28465 KB)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Meister, D., Bittner, J. Parallel BVH construction using k-means clustering. Vis Comput 32, 977–987 (2016). https://doi.org/10.1007/s00371-016-1241-0

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00371-016-1241-0

Keywords

Navigation