A creative multitouch fluid simulation built with OpenFrameworks, using MSAFluid for fluid dynamics and supporting native Linux multitouch input.
- Real-time fluid simulation responding to touch input
- True multitouch support on Linux/Wayland
- Multiple visualization modes:
- Color rendering
- Motion vectors
- Speed visualization
- Vector field display
- Customizable parameters via GUI:
- Fluid viscosity
- Fade speed
- Color diffusion
- Input size
- Force multiplier
- Layer combination with adjustable opacity
- Optional GNOME gesture disabling for better touch interaction
- Time-based effects for each touch point
- OpenFrameworks (latest version)
- ofxMSACore
- ofxMSAFluid
- ofxGui (included with OF)
- ofxMultitouch
- libinput (for Linux touch support)
- gsettings (for GNOME gesture control)
- Clone this repository into OpenFrameworks'
apps/myApps
directory:
cd openFrameworks/apps/myApps
git clone [repository-url] fmSim
- Install system dependencies (Fedora):
sudo dnf install libinput-devel gsettings-desktop-schemas
- Add your user to the input group for touch access:
sudo usermod -aG input your_username
- Build and run:
cd fmSim
make
make RunRelease
- Mouse/Touch: Draw fluid
- 'g': Toggle GUI
- 'v': Toggle vector display
- 'm': Toggle motion display
- 'c': Toggle color display
- 's': Toggle speed display
- '[' / ']': Decrease/Increase input size
- Velocity Multiplier: Scales the effect of movement speed
- Viscosity: Controls fluid thickness
- Fade Speed: How quickly the fluid dissipates
- Delta T: Time step for simulation
- Color Diffusion: How colors blend together
- Force Multiplier: Scales the force applied to the fluid
- Input Size: Size of touch influence
- Layer Opacity: Transparency of combined visualization modes
Built with:
MIT License