skip to main content
research-article

Real-time KD-tree construction on graphics hardware

Published: 01 December 2008 Publication History

Abstract

We present an algorithm for constructing kd-trees on GPUs. This algorithm achieves real-time performance by exploiting the GPU's streaming architecture at all stages of kd-tree construction. Unlike previous parallel kd-tree algorithms, our method builds tree nodes completely in BFS (breadth-first search) order. We also develop a special strategy for large nodes at upper tree levels so as to further exploit the fine-grained parallelism of GPUs. For these nodes, we parallelize the computation over all geometric primitives instead of nodes at each level. Finally, in order to maintain kd-tree quality, we introduce novel schemes for fast evaluation of node split costs.
As far as we know, ours is the first real-time kd-tree algorithm on the GPU. The kd-trees built by our algorithm are of comparable quality as those constructed by off-line CPU algorithms. In terms of speed, our algorithm is significantly faster than well-optimized single-core CPU algorithms and competitive with multi-core CPU algorithms. Our algorithm provides a general way for handling dynamic scenes on the GPU. We demonstrate the potential of our algorithm in applications involving dynamic scenes, including GPU ray tracing, interactive photon mapping, and point cloud modeling.

Supplementary Material

JPG File (a126-zhou-mp4_hi.jpg)
MOV File (a126-zhou-mp4_hi.mov)

References

[1]
Carr, N. A., Hall, J. D., and Hart, J. C. 2002. The ray engine. In Proceedings of Graphics Hardware, 37--46.
[2]
Carr, N. A., Hoberock, J., Crane, K., and Hart, J. C. 2006. Fast GPU ray tracing of dynamic meshes using geometry images. In Proceedings of Graphics Interface, 203--209.
[3]
Foley, T., and Sugerman, J. 2005. Kd-tree acceleration structures for a GPU raytracer. In Graphics Hardware'05.
[4]
Goldsmith, J., and Salmon, J. 1987. Automatic creation of object hierarchies for ray tracing. IEEE CG & A 7, 5, 14--20.
[5]
Gropp, W., Lusk, E., and Skjellum, A. 1994. Using MPI: Portable Parallel Programming with the Message Passing Interface. MIT Press.
[6]
Günther, J., Wald, I., and Slusallek, P. 2004. Realtime caustics using distributed photon mapping. In Eurographics Symposium on Rendering, 111--121.
[7]
Harris, M., Owens, J., Sengupta, S., Zhang, Y., and Davidson, A., 2007. CUDPP homepage. http://www.gpgpu.org/developer/cudpp/.
[8]
Havran, V. 2001. Heuristic Ray Shooting Algorithms. PhD thesis, Czech Technical University in Prague.
[9]
Hoppe, H., DeRose, T., Duchamp, T., McDonald, J., and Stuetzle, W. 1992. Surface reconstruction from unorganized points. In Proceedings of SIGGRAPH'92, 71--78.
[10]
Horn, D. R., Sugerman, J., Houston, M., and Hanrahan, P. 2007. Interactive k-d tree GPU raytracing. In Proceedings of Symposium on Interactive 3D graphics and Games, 167--174.
[11]
Hunt, W., Mark, W. R., and Stoll, G. 2006. Fast kd-tree construction with an adaptive error-bounded heuristic. In IEEE Symposium on Interactive Ray Tracing, 81--88.
[12]
Jensen, H. W. 2001. Realistic Image Synthesis Using Photon Mapping. AK Peters.
[13]
MacDonald, J. D., and Booth, K. S. 1990. Heuristics for ray tracing using space subdivision. Vis. Comput. 6, 3, 153--166.
[14]
Manku, G. S., 2002. Fast bit counting routines. http://infolab.stanford.edu/ manku/bitcount/bitcount.html.
[15]
Mount, D. M., and Arya, S., 2006. ANN: A library for approximate nearest neighbor searching. http://www.cs.umd.edu/~mount/ANN/.
[16]
Nicolaychuk, A., 2008. RivaTuner. http://www.guru3d.com/index.php?page=rivatuner.
[17]
NVIDIA, 2007. CUDA programming guide 1.0. http://developer.nvidia.com/object/cuda.html.
[18]
Pauly, M., Keiser, R., Kobbelt, L. P., and Gross, M. 2003. Shape modeling with point-sampled geometry. In Proceedings of SIGGRAPH'03, 641--650.
[19]
Pharr, M., and Humpreys, G. 2004. Physically Based Rendering: From Theory to Implementation. Morgan Kaufmann.
[20]
Popov, S., Günther, J., Seidel, H.-P., and Slusallek, P. 2006. Experiences with streaming construction of SAH KD-trees. In IEEE Symposium on Interactive Ray Tracing, 89--94.
[21]
Popov, S., Günther, J., Seidel, H.-P., and Slusallek, P. 2007. Stackless kd-tree traversal for high performance GPU ray tracing. In Eurographics'07, 415--424.
[22]
Preparata, F. P., and Shamos, M. I. 1985. Computational Geometry: An Introduction. Springer-Verlag New York, Inc.
[23]
Purcell, T. J., Buck, I., Mark, W. R., and Hanrahan, P. 2002. Ray tracing on programmable graphics hardware. ACM Trans. Gr. 21, 3, 703--712.
[24]
Purcell, T. J., Donner, C., Cammarano, M., Jensen, H. W., and Hanrahan, P. 2003. Photon mapping on programmable graphics hardware. In Graphics Hardware'03, 41--50.
[25]
Reshetov, A., Soupikov, A., and Hurley, J. 2005. Multilevel ray tracing algorithm. In SIGGRAPH '05, 1176--1185.
[26]
Sengupta, S., Harris, M., Zhang, Y., and Owens, J. D. 2007. Scan primitives for GPU computing. In Graphics Hard-ware'07, 97--106.
[27]
Shevtsov, M., Soupikov, A., and Kapustin, A. 2007. Highly parallel fast kd-tree construction for interactive ray tracing of dynamic scenes. In Eurographics'07, 395--404.
[28]
Shiue, L.-J., Jones, I., and Peters, J. 2005. A realtime GPU subdivision kernel. ACM Trans. Gr. 24, 3, 1010--1015.
[29]
Stoll, G. 2005. Part II: Achieving real time - optimization techniques. In SIGGRAPH 2005 Course on Interactive Ray Tracing.
[30]
Wald, I., and Havran, V. 2006. On building fast kd-trees for ray tracing, and on doing that in O(Nlog N). In Proceedings of IEEE Symposium on Interactive Ray Tracing, 61--69.
[31]
Wald, I., Slusallek, P., Benthin, C., and Wagner, M. 2001. Interactive rendering with coherent ray tracing. Computer Graphics Forum 20, 3, 153--164.
[32]
Wald, I., Günther, J., and Slusallek, P. 2004. Balancing considered harmful --faster photon mapping using the voxel volume heuristic. In Proceedings of Eurographics'04, 595--603.
[33]
Wald, I., Ize, T., Kensler, A., Knoll, A., and Parker, S. G. 2006. Ray tracing animated scenes using coherent grid traversal. ACM Trans. Gr. 25, 3, 485--493.
[34]
Wald, I., Boulos, S., and Shirley, P. 2007. Ray tracing deformable scenes using dynamic bounding volume hierarchies. ACM Trans. Gr. 26, 1, 6.
[35]
Wald, I. 2007. On fast construction of SAH based bounding volume hierarchies. In IEEE Symposium on Interactive Ray Tracing, 33--40.
[36]
Wang, R. Y., Pulli, K., and Popović, J. 2007. Real-time enveloping with rotational regression. ACM Trans. Gr. 26, 3, 73.
[37]
Yoon, S.-E., Curtis, S., and Manocha, D. 2007. Ray tracing dynamic scenes using selective restructuring. In Eurographics Symposium on Rendering.
[38]
Zhou, K., Huang, X., Xu, W., Guo, B., and Shum, H.-Y. 2007. Direct manipulation of subdivision surfaces on GPUs. ACM Trans. Gr. 26, 3, 91, 9.
[39]
Zwicker, M., Pfister, H., van Baar, J., and Gross, M. 2001. Surface splatting. In SIGGRAPH'01, 371--378.
[40]
Zwicker, M., Pauly, M., Knoll, O., and Gross, M. 2002. Pointshop 3d: an interactive system for point-based surface editing. In SIGGRAPH'02, 322--329.

Cited By

View all
  • (2025)LibRTS: A Spatial Indexing Library by Ray TracingProceedings of the 30th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3710848.3710850(396-411)Online publication date: 28-Feb-2025
  • (2025)Path Overlap Detection and Property Graph Construction from TCX Data for Advanced Analysis2025 IEEE 23rd World Symposium on Applied Machine Intelligence and Informatics (SAMI)10.1109/SAMI63904.2025.10883235(000489-000494)Online publication date: 23-Jan-2025
  • (2025)A conformal optimization framework for lightweight design of complex components using stochastic lattice structuresComputers & Structures10.1016/j.compstruc.2025.107646308(107646)Online publication date: Feb-2025
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Graphics
ACM Transactions on Graphics  Volume 27, Issue 5
December 2008
552 pages
ISSN:0730-0301
EISSN:1557-7368
DOI:10.1145/1409060
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 December 2008
Published in TOG Volume 27, Issue 5

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. kd-tree
  2. photon mapping
  3. point cloud modeling
  4. programable graphics hardware
  5. ray tracing

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)189
  • Downloads (Last 6 weeks)29
Reflects downloads up to 28 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2025)LibRTS: A Spatial Indexing Library by Ray TracingProceedings of the 30th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3710848.3710850(396-411)Online publication date: 28-Feb-2025
  • (2025)Path Overlap Detection and Property Graph Construction from TCX Data for Advanced Analysis2025 IEEE 23rd World Symposium on Applied Machine Intelligence and Informatics (SAMI)10.1109/SAMI63904.2025.10883235(000489-000494)Online publication date: 23-Jan-2025
  • (2025)A conformal optimization framework for lightweight design of complex components using stochastic lattice structuresComputers & Structures10.1016/j.compstruc.2025.107646308(107646)Online publication date: Feb-2025
  • (2025)Blending weight BSP Tree for mesh Boolean operationsComputer-Aided Design10.1016/j.cad.2025.103849182(103849)Online publication date: May-2025
  • (2025)Stereo vision based broccoli recognition and attitude estimation method for field harvestingArtificial Intelligence in Agriculture10.1016/j.aiia.2025.02.002Online publication date: Feb-2025
  • (2024)Automatic Method for Detecting Deformation Cracks in Landslides Based on Multidimensional Information FusionRemote Sensing10.3390/rs1621407516:21(4075)Online publication date: 31-Oct-2024
  • (2024)An efficient method for modeling and evaluating the bench terrain of open-pit minesFrontiers in Earth Science10.3389/feart.2024.135135212Online publication date: 9-May-2024
  • (2024)FAST-LIO2: Fast Direct LiDAR-Inertial OdometrySSRN Electronic Journal10.2139/ssrn.4675561Online publication date: 2024
  • (2024)Real-time volume rendering for three-dimensional fetal ultrasound using volumetric photon mappingVisual Computing for Industry, Biomedicine, and Art10.1186/s42492-024-00177-47:1Online publication date: 25-Oct-2024
  • (2024)Redzone stream compaction: removing k items from a list in parallel O(k) timeACM Transactions on Parallel Computing10.1145/367578211:3(1-16)Online publication date: 29-Jun-2024
  • Show More Cited By

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media