https://github.com/keijiro/stablefluids
A straightforward GPU implementation of Jos Stam's "Stable Fluids" on Unity.
https://github.com/keijiro/stablefluids
compute fluid-dynamics gpu shader unity unity3d
Last synced: 8 months ago
JSON representation
A straightforward GPU implementation of Jos Stam's "Stable Fluids" on Unity.
- Host: GitHub
- URL: https://github.com/keijiro/stablefluids
- Owner: keijiro
- Created: 2018-06-27T05:22:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-04T23:11:23.000Z (almost 3 years ago)
- Last Synced: 2025-04-11T14:43:57.100Z (about 1 year ago)
- Topics: compute, fluid-dynamics, gpu, shader, unity, unity3d
- Language: C#
- Homepage:
- Size: 366 KB
- Stars: 1,067
- Watchers: 31
- Forks: 90
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# StableFluids


This project is a straightforward GPU-based implementation of Jos Stam's
[Stable Fluids] in Unity.
[Stable Fluids]: https://www.dgp.toronto.edu/people/stam/reality/Research/pdf/ns.pdf
[WebGL Demo](https://keijiro.github.io/StableFluids)
## System Requirements
- Unity 6
## Project Structure
While this project uses URP, the following modules depend only on the Core
Render Pipeline shader library, making them compatible with any render pipeline
(Built-in/Universal/High-Definition).
### `Assets/StableFluids`
Contains Jos Stam's Stable Fluids implementation. Access the velocity field
texture via `FluidSimulation.VelocityField` for rendering or to apply external
forces.
### `Assets/Marbling`
Contains components for the marbling demo, which advects colors based on the
velocity field.
## References
- [Stable Fluids, Jos Stam](https://www.dgp.toronto.edu/people/stam/reality/Research/pdf/ns.pdf)
- [Real-Time Fluid Dynamics for Games, Jos Stam](https://pdfs.semanticscholar.org/847f/819a4ea14bd789aca8bc88e85e906cfc657c.pdf)
- [Fast Fluid Dynamics Simulation on the GPU, Mark J. Harris](https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-38-fast-fluid-dynamics-simulation-gpu)