Cartoon Water Rendering

The project is an implementation of modified Cartoon Water Rendering with Foam and Surface Smoothing[1] using OpenGL. And the physical simulation of liquid is based on Position Based Fluids[2] written in CUDA.

Technical Introduce


  • CUDA 10.2
  • Visual Studio 2017
  • GPU and driver support OpenGL 4.6

Run the Demo

keyboard shortcut

  1. spacebar, Run the demo or Stop at some frame.
  2. m, Sweep the box boundary or Stop the moving boundary.
  3. And you can use mouse to adjust the camera’s position or direction.


  • Imcompressible fluids simulation based on PBD[2].
  • Screen space surface reconstruction based on point splatting[3].
  • Cartoon water rendering[1].
  • GPU particle neighbor searching using Hash table[5].


[1] L.D.S.R. Neto, A.L. Apolinário, Cartoon Water Rendering with Foam and Surface Smoothing, Brazilian Symp. Games Digit. Entertain. SBGAMES. 2014-December (2014) 230–239.
[2] M. Macklin, M. Müller, Position based fluids, ACM Trans. Graph. 32 (2013) 1–5.
[3] W.J. Van Der Laan, S. Green, M. Sainz, Screen space fluid rendering with curvature flow, Proc. I3D 2009 2009 ACM SIGGRAPH Symp. Interact. 3D Graph. Games. 1 (2009) 91–98.
[4] D. Wolff, OpenGL 4.0 Shading Language Cookbook. Packt Publishing, Jul. 2011.
[5] S. Green, “Particle Simulation using CUDA,”, no. September, pp. 1–12, 2013.
[6] OpenGL Projection Matrix

Zoel Shi
Zoel Shi
Tech Artist from Hypergryph.

My research interests include Image and Geometry Processing, Surface Reconstruction, Computational Fluid Dynamics.