The Visual Computer

, Volume 33, Issue 11, pp 1429–1442 | Cite as

GPU-accelerated SPH fluids surface reconstruction using two-level spatial uniform grids

  • Wei Wu
  • Hongping LiEmail author
  • Tianyun Su
  • Haixing Liu
  • Zhihan Lv
Original Article


An efficient two-level spatial uniform grid structure-based high-quality surface reconstruction method with Marching Cubes (MC) for smoothed particle hydrodynamics (SPH) fluids was presented in this paper. Compared with the traditional way that dividing the simulation domain with uniform grid directly, an enhanced narrow-band approach using the parallel cuckoo hashing method was taken to index the coarse-level surface vertices, hence decrease the memory consumption. Moreover, a two-level spatial uniform grid structure was employed with a scheme of arranging the fine surface vertices, which could preserve the spatial locality property to facilitate the coalesced memory access on the GPU. Our algorithm was designed for parallel architectures, based on which a parallel version of the optimized surface reconstruction was performed on the CUDA platform. In the experiment of comparison to traditional approaches, the results indicated that our surface reconstruction method was more efficient at the same level of quality of the reconstructed surfaces.


Smoothed particle hydrodynamics Fluids simulation Surface reconstruction Cuckoo hashing 



This work was jointly supported by the National Natural Science Foundation of China (Grant No. 41275013) and the National High-Tech Research and Development Program (863) (Grant No. 2013AA09A506-4).


  1. 1.
    Müller, M., Charypar, D., Gross, M.: Particle-based fluid simulation for interactive applications. In: Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation, pp. 154–159. Eurographics Association, UK (2003)Google Scholar
  2. 2.
    Zhu, Y., Bridson, R.: Animating sand as a fluid. ACM Trans. Graphics 24(3), 965–972 (2005)CrossRefGoogle Scholar
  3. 3.
    Adams, B., Pauly, M., Keiser, R., et al.: Adaptively sampled particle fluids. In: ACM Transactions on Graphics (TOG), vol. 26, no. 3, pp. 48. ACM, New York (2007)Google Scholar
  4. 4.
    Solenthaler, B., Schläfli, J., Pajarola, R.: A unified particle model for fluid-solid interactions. Comput. Anim. Virtual Worlds 18(1), 69–82 (2007)CrossRefGoogle Scholar
  5. 5.
    Akinci, G., Ihmsen, M., Akinci, N., et al.: Parallel surface reconstruction for particle-based fluids. In: Computer Graphics Forum, vol. 31, no. 6, pp. 1797–1809. Blackwell Publishing Ltd, Hoboken (2012)Google Scholar
  6. 6.
    Akinci, G., Akinci, N., Ihmsen, M.,Teschner, M.: An efficient surface reconstruction pipeline for particle-based fluids, pp. 61–68. In: Proc. VRIPHYS. Darmstadt, Germany (2012)Google Scholar
  7. 7.
    Onderik, J., Chládek, M., Durikovic, R.: SPH with small scale details and improved surface reconstruction. In: Proceedings of the 27th Spring Conference on Computer Graphics, SCCG ’11, pp. 29–36(2013)Google Scholar
  8. 8.
    Yu, J., Turk, G.: Reconstructing surfaces of particle-based fluids using anisotropic kernels. ACM Trans. Graphics 32(1), 5 (2013)CrossRefzbMATHGoogle Scholar
  9. 9.
    Lorensen, W.E., Cline, H.E.: Marching cubes: A high resolution 3D surface construction algorithm. In: ACM siggraph computer graphics, vol. 21, no. 4, pp. 163–169. ACM, New York (1987)Google Scholar
  10. 10.
    Velasco, F., Torres, J.C.: Cell Octrees: A new data structure for volume modeling and visualization. In: Ertl, T., Girod, B., Niemann, H., Seidel, H.P. (eds.) Proceedings of the Vision Modeling and Visualization Conference 2001 (VMV’01), pp. 151–158. Aka GmbH, Germany (2001)Google Scholar
  11. 11.
    Lee, H., Yang, H.S.: Real-time Marching-cube-based LOD Surface Modeling of 3D Objects. ICAT (2004)Google Scholar
  12. 12.
    Ju, T., Udeshi, T.: Intersection-free contouring on an octree grid. In: Proceedings of 14th Pacific Conference. Computer Graphics and Applications (PG ’06). IEEE Computer Society Press, Los Alamitos (2006)Google Scholar
  13. 13.
    Manson, J., Schaefer, S.: Isosurfaces over simplicial partitions of multiresolution grids. Comput. Graphics Forum 29(2), 377–385 (2010)CrossRefGoogle Scholar
  14. 14.
    Alcantara, D.A., Sharf, A., Abbasinejad, F., et al.: Real-time parallel hashing on the GPU. ACM Trans. Graphics 28(5), 154 (2009)CrossRefGoogle Scholar
  15. 15.
    Blinn, J.F.: A generalization of algebraic surface drawing. ACM Trans. Graphics 1(3), 235–256 (1982)CrossRefGoogle Scholar
  16. 16.
    Zhou, K., Gong, M., Huang, X., Guo, B.: Data-parallel octrees for surface reconstruction. IEEE Trans. Visual Comput. Graphics 17(5), 669–681 (2011)CrossRefGoogle Scholar
  17. 17.
    Akinci, G., Akinci, N., Oswald, E., Teschner, M.: Adaptive surface reconstruction for SPH using 3-Level Uniform Grids. In: WSCG proceedings, pp. 195–204. Union Agency (2013)Google Scholar
  18. 18.
    Du, S., Kanai, T.: GPU-based Adaptive Surface Reconstruction for Real-time SPH Fluids. In: WSCG proceedings, pp. 141–150 (2014)Google Scholar
  19. 19.
    Bridson, R.E.: Computational aspects of dynamic surfaces. Stanford University, Stanford (2003)Google Scholar
  20. 20.
    Houston, B., Wiebe, M., Batty, C.C.: RLE sparse level sets. In: Proceedings of the SIGGRAPH 2004 conference on sketches & applications. New York (2004)Google Scholar
  21. 21.
    Nielsen, M.B., Museth, K.: Dynamic tubular grid: an efficient data structure and algorithms for high resolution level sets. J. Sci. Comput. 26(3), 261–299 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Nielsen, M. B., Nilsson, O., Söderström, A., Museth, K.: Out-of-core and compressed level set methods. ACM Trans. Graphics 26(4), 16 (2007)Google Scholar
  23. 23.
    Ihmsen, M., Akinci, N., Becker, M., et al.: A Parallel SPH Implementation on Multi -Core CPUs. In: Computer Graphics Forum, vol. 30, no. 1, pp. 99–112. Blackwell Publishing Ltd, Hoboken (2011)Google Scholar
  24. 24.
    Goswami, P., Schlegel, P., Solenthaler, B., et al.: Interactive SPH simulation and rendering on the GPU. In: Proceedings of the 2010 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, pp. 55–64. Eurographics Association, UK (2010)Google Scholar
  25. 25.
    Premoze, S., Tasdizen, T., Bigler, J., Lefohn, A., Whitaker, R.: Particle-based simulation of fluids. In: Computer Graphics Forum (Proceedings of Eurographics), vol. 22, pp. 401–410 (2003)Google Scholar
  26. 26.
    Yu, J., Wojtan, C., Turk, G., Yap, C.: Explicit mesh surfaces for particle based fluids. Eurographics 2012(30), 41–48 (2012)Google Scholar
  27. 27.
    Gribble, C.P., Ize, T., Kensler, A., Wald, I., Parker, S.G.: A coherent grid traversal approach to visualizing particle-based simulation data. IEEE Trans. Visual Comput. Graphics 13(4), 758–768 (2007)Google Scholar
  28. 28.
    Kanamori, Y., Szego, Z., Nishita, T.: GPU-based fast ray casting for a large number of metaballs. Comput. Graphics Forum 27(2), 351–360 (2008)CrossRefGoogle Scholar
  29. 29.
    Zhang, Y., Solenthaler, B., Pajarola, R.: Adaptive sampling and rendering of fluids on the GPU. In: Proceedings Symposium on Point-Based Graphics, pp. 137–146 (2008)Google Scholar
  30. 30.
    Müller, M., Heidelberger, B., Hennix, M., Ratcliff, J.: Position based dynamics. J. Vis. Commun. 18(2), 109–118 (2007)Google Scholar
  31. 31.
    Bagar, F., Scherzer, D., Wimmer, M.: A layered particle-based fluid model for real-time rendering of water. In: Computer Graphics Forum (Proceedings EGSR 2010), vol. 29, no. 4, pp. 1383–1389 (2010)Google Scholar
  32. 32.
    Orthmann, J., Keller, M., Kolb, A.: Topologycaching for dynamic particle, volume raycasting. In: Proceedings Vision, Modeling and Visualization (VMV), pp. 147–154 (2010)Google Scholar
  33. 33.
    Jang, Y., Fuchs, R., Schindler, B., Peikert, R.: Volumetric evaluation of meshless data from smoothed particle hydrodynamics simulations. In: Proceedings of the 8th IEEE EG International Conference on volume graphics, VG’10, pp. 45–52. Eurographics Association, UK (2010)Google Scholar
  34. 34.
    Ihmsen, M., Akinci, N., Akinci, G., Teschner, M.: Unified spray, foam and bubbles for particle-based fluids. Vis. Comput. 30(1), 99–112 (2012)Google Scholar
  35. 35.
    Nvidia: CUDA C Programming Guide. (2015). Accessed 10 Nov 2015
  36. 36.
    Solenthaler, B., Pajarola, R.: Predictive-corrective incompressible SPH. In: ACM transactions on graphics (TOG), vol. 28, no. 3, p. 40. ACM, New York (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  • Wei Wu
    • 1
  • Hongping Li
    • 1
    Email author
  • Tianyun Su
    • 2
  • Haixing Liu
    • 2
  • Zhihan Lv
    • 3
  1. 1.College of Information Science and EngineeringOcean University of ChinaQingdaoChina
  2. 2.The First Institute of OceanographySOAQingdaoChina
  3. 3.Shenzhen Research Institute of Advanced TechnologyChinese Academy of SciencesShenzhenChina

Personalised recommendations