leojilong / Position-Based-Fluids-Simulation

Position Based Fluid Simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Position Based Fluid Simulation

CSC417 Project
Hanlin Zhou, Long Ji

This project follows algorithms and methods from Position Based Fluids by Miles Macklin and Matthias Müller(2013).
Demos require 64-bit Python3 and taichi library version 0.7.0.
Demos run on GPU (CUDA) by default.
Can switch to CPU by changing "ti.init(arch=ti.gpu)" to "ti.init(arch=ti.cpu)".

Video Explnation

https://youtu.be/yp1B_HC5wLo

2D Simulation:

-run Position_Based_Fluid.py
-Press 'A' and 'D' to control fluid movement.

3D Simulation: (no realtime 3D visualization available)

-run PBF3D.py
-Press 'A','D','W','S' to control fluid movement.
-switching to cpu mode not recommended.
-creates a sub-folder "./3d_ply" which stores outputs PLY files that can be rendered in other software. (Blender, Houdini)
-comment out line 362-366 if you do not want the PLY outputs.

References

Position Based Fluids

About

Position Based Fluid Simulation


Languages

Language:Python 100.0%