Advertisement

The Visual Computer

, Volume 35, Issue 6–8, pp 961–971 | Cite as

Generating signed distance fields on the GPU with ray maps

  • Bastian KrayerEmail author
  • Stefan Müller
Original Article
  • 77 Downloads

Abstract

Signed distance fields represent objects as distances to the closest surface points with a sign differentiating inside and outside. We present an algorithm to compute a signed distance field from triangle meshes. All data are kept on the GPU, making it ideal for any pure graphics-based context. We split the algorithm into a fast parallel distance transform and a new method of computing the sign. To determine the sign, we compute the winding number for any point using a ray map, a ray-based data structure that preserves geometric meaning while reducing the amount of work to be done for ray tests. Based on that structure, we devise a simple parallel algorithm to sample an exponentially growing number of rays to cope with meshes having deficiencies such as holes or self-intersections. We demonstrate how our method is both fast and able to handle imperfect meshes.

Keywords

Signed distance fields Geometric algorithms Object representation GPGPU 

Notes

Compliance with ethical standards

Conflict of interest

The authors declare that they have no conflict of interest.

References

  1. 1.
    Akenine-Möller, T.: Fast 3d triangle-box overlap testing. In: ACM SIGGRAPH 2005 Courses, SIGGRAPH ’05. ACM, New York, NY, USA (2005).  https://doi.org/10.1145/1198555.1198747
  2. 2.
    Baerentzen, J.A., Aanaes, H.: Signed distance computation using the angle weighted pseudonormal. IEEE Trans. Vis. Comput. Graph. 11(3), 243–253 (2005).  https://doi.org/10.1109/TVCG.2005.49 CrossRefGoogle Scholar
  3. 3.
    Barill, G., Dickson, N.G., Schmidt, R., Levin, D.I.W., Jacobson, A.: Fast winding numbers for soups and clouds. ACM Trans. Graph. 37(4), 43:1–43:12 (2018).  https://doi.org/10.1145/3197517.3201337 CrossRefGoogle Scholar
  4. 4.
    Bastos, T., Celes, W.: Gpu-accelerated adaptively sampled distance fields. In: 2008 IEEE International Conference on Shape Modeling and Applications, pp. 171–178 (2008).  https://doi.org/10.1109/SMI.2008.4547967
  5. 5.
    Blelloch, G.E.: Prefix Sums and Their Applications. School of Computer Science, Carnegie Mellon University, Pittsburgh, Tech. rep. (1990)Google Scholar
  6. 6.
    Cuntz, N., Kolb, A.: Fast Hierarchical 3D Distance Transforms on the GPU. In: P. Cignoni, J. Sochor (eds.) EG Short Papers. The Eurographics Association (2007).  https://doi.org/10.2312/egs.20071042
  7. 7.
    Fabbri, R., Costa, L.D.F., Torelli, J.C., Bruno, O.M.: 2d euclidean distance transform algorithms: a comparative survey. ACM Comput. Surv. 40(1), 2:1–2:44 (2008).  https://doi.org/10.1145/1322432.1322434 CrossRefGoogle Scholar
  8. 8.
    Felzenszwalb, P.F., Huttenlocher, D.P.: Distance transforms of sampled functions. Theory Comput. 8(19), 415–428 (2012).  https://doi.org/10.4086/toc.2012.v008a019 MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Frisken, S.F., Perry, R.N., Rockwood, A.P., Jones, T.R.: Adaptively sampled distance fields: A general representation of shape for computer graphics. In: Proceedings of the 27th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’00, pp. 249–254. ACM Press/Addison-Wesley Publishing Co., New York, NY, USA (2000).  https://doi.org/10.1145/344779.344899
  10. 10.
    Fuhrmann, A., Groß, C.: Distance fields for rapid collision detection in physically based modeling. In: GraphiCon’2003, pp. 58–65 (2003)Google Scholar
  11. 11.
    Hart, J.C.: Sphere tracing: a geometric method for the antialiased ray tracing of implicit surfaces. Vis. Comput. 12(10), 527–545 (1996).  https://doi.org/10.1007/s003710050084 CrossRefGoogle Scholar
  12. 12.
    Hasselgren, J., Akenine-Möer, T., Ohlsson, L.: Conservative rasterization. In: Pharr, M. (ed.) GPU Gems 2, pp. 677–690. Addison-Wesley, Reading (2005)Google Scholar
  13. 13.
    Hoff, K., Zaferakis, A., Lin, M., Manocha, D.: Fast 3d geometric proximity queries between rigid and deformable models using graphics hardware acceleration. UNC-CH Technical Report TR02-004 (2002)Google Scholar
  14. 14.
    Huang, J., Li, Y., Crawfis, R., Lu, S.C., Liou, S.Y.: A complete distance field representation. In: Proceedings of the Conference on Visualization ’01, VIS ’01, pp. 247–254. IEEE Computer Society, Washington, DC, USA (2001). http://dl.acm.org/citation.cfm?id=601671.601709
  15. 15.
    Hwang, Y.K., Ahuja, N.: A potential field approach to path planning. IEEE Trans. Robot. Autom. 8(1), 23–32 (1992).  https://doi.org/10.1109/70.127236 CrossRefGoogle Scholar
  16. 16.
    Jacobson, A., Kavan, L., Sorkine-Hornung, O.: Robust inside-outside segmentation using generalized winding numbers. ACM Trans. Graph. 32(4), 33:1–33:12 (2013).  https://doi.org/10.1145/2461912.2461916 CrossRefzbMATHGoogle Scholar
  17. 17.
    Koschier, D., Deul, C., Bender, J.: Hierarchical hp-adaptive signed distance fields. In: Proceedings of the ACM SIGGRAPH/Eurographics Symposium on Computer Animation, SCA ’16, pp. 189–198. Eurographics Association, Goslar Germany, Germany (2016). http://dl.acm.org/citation.cfm?id=2982818.2982844
  18. 18.
    Meijster, A., Roerdink, J.B.T.M., Hesselink, W.H.: A General Algorithm for Computing Distance Transforms in Linear Time, pp. 331–340. Springer US, Boston, MA (2000).  https://doi.org/10.1007/0-306-47025-X_36
  19. 19.
    Rossignac, J., Fudos, I., Vasilakis, A.: Direct rendering of boolean combinations of self-trimmed surfaces. Computer-Aided Design 45(2), 288–300 (2013). https://doi.org/10.1016/j.cad.2012.10.012. http://www.sciencedirect.com/science/article/pii/S0010448512002175. Solid and Physical Modeling 2012
  20. 20.
    Schneider, J., Kraus, M., Westermann, R.: GPU-based real-time discrete euclidean distance transforms with precise error bounds. In: International Conference on Computer Vision Theory and Applications (VISAPP), pp. 435–442 (2009)Google Scholar
  21. 21.
    Sethian, J.A.: A fast marching level set method for monotonically advancing fronts. Proc. Natl. Acad. Sci. 93(4), 1591–1595 (1996).  https://doi.org/10.1073/pnas.93.4.1591 MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Sud, A., Govindaraju, N., Gayle, R., Manocha, D.: Interactive 3d distance field computation using linear factorization. In: Proceedings of the 2006 Symposium on Interactive 3D Graphics and Games, I3D ’06, pp. 117–124. ACM, New York, NY, USA (2006).  https://doi.org/10.1145/1111411.1111432
  23. 23.
    Sud, A., Otaduy, M.A., Manocha, D.: Difi: Fast 3d distance field computation using graphics hardware. Comput. Graph. Forum 23(3), 557–566 (2004).  https://doi.org/10.1111/j.1467-8659.2004.00787.x CrossRefGoogle Scholar
  24. 24.
    Wright, D.: Dynamic occlusion with signed distance fields. In: ACM SIGGRAPH (2015)Google Scholar
  25. 25.
    Xu, H., Barbič, J.: Signed distance fields for polygon soup meshes. In: Proceedings of Graphics Interface 2014, GI ’14, pp. 35–41. Canadian Information Processing Society, Toronto, Ont., Canada, Canada (2014). http://dl.acm.org/citation.cfm?id=2619648.2619655
  26. 26.
    Yatziv, L., Bartesaghi, A., Sapiro, G.: O(n) implementation of the fast marching algorithm. J. Comput. Phys. 212(2), 393–399 (2006).  https://doi.org/10.1016/j.jcp.2005.08.005 CrossRefzbMATHGoogle Scholar
  27. 27.
    Zhou, Q., Jacobson, A.: Thingi10k: A dataset of 10,000 3d-printing models. arXiv preprint arXiv:1605.04797 (2016)

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.University Koblenz-LandauKoblenzGermany

Personalised recommendations