MSAFluid (2008)

A simple to use opensource C++ / Java / AS3 library (with examples) for openFrameworks, Cinder, Processing and Flash, for solving and displaying real-time 2D cell-based fluid simulations based on Navier-Stokes equations. The library provides a very simple to use API with many convenience methods for adding and getting forces and colors at any position. This ease of use has made the library incredibly popular with artists and creatives.

Included examples

The source code for the examples below are included with the library to demonstrate how to use the features, including how to interact with the fluid using camera and/or multi-touch screens.

Body Paint

MSAFluid (and MSAOpenCL) form the technical basis for 2009 installation, Body Paint.

MSAFluid in the wild

This library and the supplied examples have turned out to be hugely popular and now they have a life of their own. Many multi-touch visuals and interactive dance performances use MSAFluid – often without even changing the example parameters!

Search for other examples on youtubevimeo or flickr

Play

Download source

Java version (for processing): github.com/memo/p5-MSAFluid

C++ version (for openFrameworks and Cinder): github.com/memo/ofxMSAFluid

AS 3.0 version (ported by Eugene Zatepyakin): blog.inspirit.ru/?p=248

Credits & Acknowledgements

The library is based on Jos Stam’s famous paper – Real-Time Fluid Dynamics for Games. The main example was inspired by the brilliant Plasma Pong (even with some advice from the author, Steve Taylor, who pointed me in the direction of Jos Stam’s paper). Other useful resources include :

Press

Interviews

Books

Other Coverage

Academic Papers