Examples » 3D Fluid Simulation new in Git master

SPH fluid simulation with a dynamic boundary.

A basic implementation of SPH (Smoothed-Particle Hydrodynamics) solver. In order to run in real time, accuracy has been heavily sacrificed for performance. See also 2D Fluid Simulation, which runs just realtime just in a single thread.



  • mouse drag rotates the view
  • Shift mouse drag pans the view
  • mouse wheel zooms in/out
  • H shows / hides the overlay
  • R resets the simulation
  • Space pauses the simulation


This example was originally contributed by Nghia Truong.


Full source code is linked below and also available in the magnum-examples GitHub repository. This example depends on the ImGuiIntegration library which is not a part of the core Magnum repository, see its documentation for usage instructions.