Skip to main content
Log in

On the use of local ray termination for efficiently constructing qualitative BSPs, BIHs and (S)BVHs

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

Abstract

Acceleration data structures (ADSs) exploit spatial coherence by distributing a scene’s geometric primitives into spatial groups, effectively reducing the cost of ray tracing queries. The most effective ADSs are hierarchical, adaptive tree structures such as BSPs, BIHs and (S)BVHs. The de facto standard cost metric for building these structures is the Surface Area Heuristic (SAH), which assumes a scene-exterior isotropic ray distribution of non-terminating rays. Despite its restrictive assumptions, the SAH remains competitive against many fundamentally different cost metrics targeting more common ray distributions. Our goal is not to radically change and replace the SAH, but to adapt it by introducing the concept of local ray termination in the context of voxel partitioning during the ADS construction and voxel traversal order during ADS traversal. We develop heuristics to approximate local ray termination efficiently without additional preprocessing or ray (sub)sampling. Our heuristics are used for approximating the visibility probabilities in the Ray Termination Surface Area Heuristic (RTSAH) for constructing BSPs, BIHs and (S)BVHs for accelerating closest-hit ray queries and for approximating the hit probabilities in the Shadow Ray Distribution Heuristic for constructing dedicated BVHs for accelerating any-hit ray queries. The main aim of our paper is to analyze the potential of including local ray termination into the SAH. The results indicate rendering performance close to the references (SAH and NodeSATO) on average due to small and/or compensating gains in the number of ray-triangle intersection tests and ADS node traversal steps. Furthermore, prerendering build times are higher for the RTSAH due to triangle clipping.

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

Similar content being viewed by others

References

  1. Aila, T., Karras, T., Laine, S.: On quality metrics of bounding volume hierarchies. In: Proceedings of the 5th High-Performance Graphics Conference, HPG ’13, pp. 101–107. ACM, New York (2013)

  2. Appel, A.: Some techniques for shading machine renderings of solids. In: Proceedings of the April 30–May 2, 1968, Spring Joint Computer Conference, AFIPS ’68 (Spring), pp 37–45. ACM, New York (1968)

  3. Bentley, J.L., Friedman, J.H.: Data structures for range searching. ACM Comput. Surv. 11(4), 397–409 (1979)

    Article  Google Scholar 

  4. Birn, J.: Lighting challenges. http://3drender.com/challenges (2006)

  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 the 25th Spring Conference on Computer Graphics, SCCG ’09, pp. 51–58. ACM, New York (2009)

  7. Boulos, S., Haines, E.: Ray-Box sorting. Ray Tracing News 19, 1 (2006)

    Google Scholar 

  8. Cauchy, A.-L.: Note sur divers théorèmes relatifs à la rectification des courbes et à la quadrature des surfaces. Comptes Rendus de l’Académie des Sciences 13, 1060–1066 (1841)

    Google Scholar 

  9. Cauchy, A.-L.: Mémoire sur la rectification des courbes et la quadrature des surfaces courbes. Mémoires de l’Académie des Sciences 22, 3–13 (1850)

    Google Scholar 

  10. Cazals, F., Sbert, M.: Some integral geometry tools to estimate the complexity of 3D scenes. Research Report RR-3204, INRIA (1997)

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

    Article  Google Scholar 

  12. Cohen, M.F., Wallace, J., Hanrahan, P.: Radiosity and Realistic Image Synthesis. Academic Press Professional, Inc., San Diego (1993)

    MATH  Google Scholar 

  13. Dammertz, H., Keller, A.: The edge volume heuristic—robust triangle subdivision for improved BVH performance. In: IEEE Symposium on Interactive Ray Tracing, pp. 155–158 (2008)

  14. Ernst, M., Greiner, G.: Early split clipping for bounding volume hierarchies. In: IEEE Symposium on Interactive Ray Tracing, pp 73–78 (2007)

  15. Fabianowski, B., Fowler, C., Dingliana, J.: A Cost metric for scene-interior ray origins. In: Alliez, P., Magnor, M. (eds.) Eurographics 2009—Short Papers. The Eurographics Association (2009)

  16. Feltman, N., Lee, M., Fatahalian, K.: SRDH: specializing BVH construction and traversal order using representative shadow ray sets. In: Proceedings of the Fourth ACM SIGGRAPH/Eurographics Conference on High-Performance Graphics (Aire-la-Ville, Switzerland, Switzerland, 2012), EGGH-HPG’12, Eurographics Association, pp. 49–55

  17. Ganestam, P., Doggett, M.: SAH guided spatial split partitioning for fast BVH construction. Comput. Graph. Forum 35, 2 (2016)

    Article  Google Scholar 

  18. 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 

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

    Article  Google Scholar 

  20. Hapala, M., Havran, V.: Review: Kd-tree traversal algorithms for Ray Tracing. Comput. Graph. Forum 30(1), 199–213 (2011)

    Article  Google Scholar 

  21. Havran, V.: Heuristic ray shooting algorithms. Ph.D. thesis, Faculty of Electrical Engineering, Czech Technical University, Prague (2000)

  22. Havran, V., Bittner, J.: Rectilinear BSP trees for preferred ray sets. In: Proceedings of Summer School of Computer Graphics, vol. 99, pp. 171–179 (1999)

  23. Havran, V., Bittner, J.: On improving Kd-trees for ray shooting. In: Proceedings of Winter School of Computer Graphics 2002 Conference, pp. 209–217 (2002)

  24. Havran, V., Herzog, R., Seidel, H.-P.: On the fast construction of spatial hierarchies for Ray Tracing. In: IEEE Symposium on Interactive Ray Tracing, pp. 71–80 (2006)

  25. Hottel, H.C.: Radiant heat transmission between surfaces separated by non-absorbing media. Trans. ASME 53, 265–273 (1931)

    Google Scholar 

  26. Hunt, W.A., Mark, W.R.: Ray-specialized acceleration structures for ray tracing. In: 2008 IEEE Symposium on Interactive Ray Tracing, pp. 3–10 (2008)

  27. Hunt, W.A., Mark, W.R., Stoll, G.: Fast kd-tree construction with an adaptive error-bounded heuristic. In: IEEE Symposium on Interactive Ray Tracing, pp. 81–88 (2006)

  28. Hurley, J.T., Kapustin, A., Reshetov, A., Soupikov, A.: Fast ray tracing for modern general purpose CPU. In: Proceedings of GraphiCon (2002)

  29. Ize, T., Hansen, C.: RTSAH traversal order for occlusion rays. Comput. Graph. Forum 30(2), 297–305 (2011)

    Article  Google Scholar 

  30. Ize, T., Wald, I., Parker, S.G.: Ray tracing with the BSP tree. In: IEEE Symposium on Interactive Ray Tracing, pp. 159–166 (2008)

  31. Kajiya, J.T.: The rendering equation. SIGGRAPH Comput. Graph. 20(4), 143–150 (1986)

    Article  Google Scholar 

  32. Kaplan, M.R.: The use of spatial coherence in ray tracing. ACM SIGGRAPH Course Notes 11 (1985)

  33. Kay, T.L., Kajiya, J.T.: Ray tracing complex scenes. SIGGRAPH Comput. Graph. 20(4), 269–278 (1986)

    Article  Google Scholar 

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

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

    Article  Google Scholar 

  36. Markov, A.A.: Primer statisticheskogo issledovanija nad tekstom ‘Evgenija Onegina’ illjustrirujuschij svjaz’ ispytanij v tsep. Izvestija Imp. Akademii nauk (Bulletin of the Imperial Academy of Sciences of St. Petersburg) 7(3), 153–162 (1913)

    Google Scholar 

  37. Markov, A.A.: An example of statistical investigation of the text ‘Eugene Onegin’ concerning the connection of samples in chains. Sci. Context 19(4), 591–600 (2006)

    Article  MATH  Google Scholar 

  38. McGuire, M.: Computer graphics archive. https://casual-effects.com/data (2017)

  39. Moulin, M.: Hybrid Kd-trees for photon mapping and accelerating ray tracing. Master’s thesis, Department of Computer Science, KU Leuven, Belgium (2015)

  40. Moulin, M., Billen, N., Dutré, P.: Efficient visibility heuristics for Kd-trees using the RTSAH. In: Lehtinen, J., Nowrouzezahrai, D. (eds.) Eurographics Symposium on Rendering—Experimental Ideas & Implementations, pp. 31–39. The Eurographics Association (2015)

  41. Nah, J.-H., Manocha, D.: SATO: surface area traversal order for shadow ray tracing. Comput. Graph. Forum 33(6), 167–177 (2014)

    Article  Google Scholar 

  42. Ng, K., Trifonov, B.: Automatic bounding volume hierarchy generation using stochastic search methods. In: Proceedings Mini-Workshop on Stochastic Search Algorithms (2003)

  43. Ogaki, S., Derouet-Jourdan, A.: MBVH child node sorting for fast occlusion test. In: Lehtinen, J., Nowrouzezahrai, D. (eds.) Eurographics Symposium on Rendering—Experimental Ideas & Implementations, pp. 57–64. The Eurographics Association (2015)

  44. Ogaki, S., Derouet-Jourdan, A.: An N-ary BVH child node sorting technique for occlusion tests. J. Comput. Graph. Tech. (JCGT) 5(2), 22–37 (2016)

    Google Scholar 

  45. Ooi, B.C., McDonell, K.J., Ron, S.-D.: Spatial Kd-tree: an indexing mechanism for spatial databases. In: Proceedings of the IEEE COMPSAC Conference (1987)

  46. Pharr, M., Humphreys, G.: Physically Based Rendering, Second Edition: From Theory To Implementation, 2nd edn. Morgan Kaufmann Publishers Inc., San Francisco (2010)

    Google Scholar 

  47. Popov, S., Georgiev, I., Dimov, R., Slusallek, P.: Object partitioning considered harmful: space subdivision for BVHs. In: Proceedings of the Conference on High Performance Graphics 2009, HPG ’09, pp. 15–22. ACM, New York (2009)

  48. Popov, S., Gunther, J., Seidel, H.P., Slusallek, P.: Experiences with streaming construction of SAH Kd-trees. In: 2006 IEEE Symposium on Interactive Ray Tracing, pp. 89–94 (2006)

  49. Reinhard, E., Kok, A.J.F., Jansen, F.W.: Cost prediction in ray tracing. Tech. rep., University of Bristol, Bristol, UK (1996)

    Google Scholar 

  50. Rubin, S.M., Whitted, T.: A 3-dimensional representation for fast rendering of complex scenes. SIGGRAPH Comput. Graph. 14(3), 110–116 (1980)

    Article  Google Scholar 

  51. Ruppert, D.: Statistics and Data Analysis for Financial Engineering, 1st edn. Springer, San Francisco (2011)

    Book  MATH  Google Scholar 

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

    Article  Google Scholar 

  53. Sillion, F.X., Puech, C.: Radiosity and Global Illumination. Morgan Kaufmann Publishers Inc., San Francisco (1994)

    Google Scholar 

  54. Silvennoinen, A., Saransaari, H., Laine, S., Lehtinen, J.: Occluder simplification using planar sections. Comput. Graph. Forum 33(1), 235–245 (2014)

    Article  Google Scholar 

  55. Stich, M., Friedrich, H., Dietrich, A.: Spatial splits in bounding volume hierarchies. In: Proceedings of the Conference on High Performance Graphics 2009, HPG ’09, pp. 7–13. ACM, New York (2009)

  56. Thomsen, K., Michon, G.P.: Surface area of an ellipsoid. Final Answers (2001)

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

    Article  Google Scholar 

  58. Wächter, C., Keller, A.: Instant ray tracing: the bounding interval hierarchy. In: Proceedings of the 17th Eurographics Conference on Rendering Techniques (Aire-la-Ville, Switzerland, Switzerland, 2006), EGSR ’06, Eurographics Association, pp. 139–149

  59. Wald, I.: On fast construction of SAH-based bounding volume hierarchies. In: Proceedings of the 2007 IEEE Symposium on Interactive Ray Tracing (Washington, DC, USA, 2007), RT ’07, IEEE Computer Society, pp. 33–40

  60. Wald, I., Günther, J., Slusallek, P.: Balancing considered harmful—faster photon mapping using the voxel volume heuristic. Comput. Graph. Forum 23(3), 595–603 (2004)

    Article  Google Scholar 

  61. Wald, I., Havran, V.: On building fast Kd-trees for ray tracing, and on doing that in O(N log N). In: IEEE Symposium on Interactive Ray Tracing, pp. 61–69 (2006)

  62. Wald, I., Mark, W.R., Günther, J., Boulos, S., Ize, T., Hunt, W., Parker, S.G., Shirley, P.: State of the art in ray tracing animated scenes. Comput. Graph. Forum 28(6), 1691–1722 (2009)

    Article  Google Scholar 

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

  64. Whitted, T.: An improved illumination model for shaded display. Commun. ACM 23(6), 343–349 (1980)

    Article  Google Scholar 

  65. Williams, A., Barrus, S., Morley, R.K., Shirley, P.: An efficient and robust ray-box intersection algorithm. In: ACM SIGGRAPH 2005 Courses, SIGGRAPH ’05. ACM, New York (2005)

  66. Winston, W.L.: Operations Research: Applications and Algorithms, 4th edn. Brooks/Cole, Cengage Learning, Belmont (2004)

    MATH  Google Scholar 

  67. Woop, S., Marmitt, G., Slusallek, P.: B-Kd trees for hardware accelerated ray tracing of dynamic scenes. In: Proceedings of the 21st ACM SIGGRAPH/EUROGRAPHICS Symposium on Graphics Hardware, GH ’06, pp. 67–77. ACM, New York (2006)

Download references

Acknowledgements

We would like to thank Naiwen Xie and especially Roald Frederickx for many fruitful discussions, and the anonymous reviewers for their feedback and suggestions. The Bedroom [4] scene is modeled by David Vacek and designed by David Tousek. The Kitchen [4] scene is modeled by Jeremy Birn. The Carnival [4] scene is modeled by Dan Konieczka. The Museum Hall [4] scene is modeled by Alvaro Luna Bautista and Joel Andersdon. The Conference Room [38] scene is created by Anat Grynberg and Greg Ward. The Crytek Sponza [38] scene is created by Frank Meinl. pbrt-v2 [46] is courtesy of Matt Pharr and Greg Humphreys.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Matthias Moulin.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Matthias Moulin is a predoctoral fellow of the Research Foundation—Flanders (FWO).

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (pdf 25109 KB)

Supplementary material 2 (pdf 602 KB)

Appendix: Form Factors

Appendix: Form Factors

The (patch-to-patch) form factor, , between two surface area domains, and , describes the fraction of energy (i.e., irradiance in the context of radiosity algorithms or rays in the context of ray termination) leaving reaching :

(A.1)

where and belong to the surface area domain, and , respectively, is the binary visibility function (i.e., evaluates to 1 if and are mutually visible, 0 otherwise), and are the surface normals in and , respectively, and is the distance between and . Due to the visibility component, no tractable closed form expression can be found handling all geometrical configurations between both surface area domains, and . For the remainder we assume the absence of such geometrical configurations (i.e., ).

The form factor between two finite, orthogonal rectangles sharing one complete edge with length l, , and the form factor between two finite, parallel and identical rectangles separated by a distance l, , can be evaluated via the following tractable closed form expressions [25]:

(A.2)
(A.3)

Here, w, h and l are defined as shown in Fig. 4, and the dimensionless variables are defined as: and .

Fig. 4
figure 4

The two types of form factors between the rectangular planes of a bounding box: a the form factor between two finite, orthogonal rectangular planes sharing one complete edge with length l, , b the form factor between two finite, parallel and identical rectangular planes separated by a distance l,

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Moulin, M., Dutré, P. On the use of local ray termination for efficiently constructing qualitative BSPs, BIHs and (S)BVHs. Vis Comput 35, 1809–1826 (2019). https://doi.org/10.1007/s00371-018-1575-x

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00371-018-1575-x

Keywords

Navigation