https://github.com/halcy/simpleflow
A simple OpenCL / OpenGL fluid simulation and renderer
https://github.com/halcy/simpleflow
Last synced: about 1 year ago
JSON representation
A simple OpenCL / OpenGL fluid simulation and renderer
- Host: GitHub
- URL: https://github.com/halcy/simpleflow
- Owner: halcy
- Created: 2014-02-02T01:10:09.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T12:49:06.000Z (over 6 years ago)
- Last Synced: 2025-03-30T22:04:18.797Z (about 1 year ago)
- Language: C
- Size: 45.3 MB
- Stars: 26
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
simpleflow
==========
A simple OpenCL / OpenGL fluid simulation and renderer.
[Short demonstration video (youtube)](https://www.youtube.com/watch?v=KD2UqBCqfjA)
Warning: Requires a fairly powerful GPU!
Controls:
* Movement:
* Mouse to look
* WASD to move around
* Q/E to go up/down
* Waves:
* R/F to make stronger/weaker
* V to set power to 0
* Y/C to rotate direction
* X to reverse direction
* Features
* 1/3 to decrease/increase simulation time step
* 2 to reverse time step (does not work very well)
* 4/5 to decrease/increase smoothing iterations
* 6 to toggle liquid shading
* Misc:
* P to pause everything for a second
* Escape to quit
To make, open the .sln file in Visual Studio and compile, everything
that is required should be included in the repository. Currently,
only windows is supported, but most of the code (everything that is
not user input handling) is platform independent and should work on
any platform with a new enough OpenGL.

Particles are simulated using an OpenCL-based Smoothed Particle
Hydrodynamics implementation, colliding with a height map. The
resulting particles are then rendered and smoothed using screen-space
curvature smoothing, and eventually shaded and combined with the
heightmap geometry.