Skip to content

Minimalist real-time 3D particles simulator (Boids, Fluids) based on OpenGL/OpenCL frameworks

License

Notifications You must be signed in to change notification settings

axoloto/RealTimeParticles

Repository files navigation

RealTimeParticles

Minimalist real-time application combining DearImGui/OpenGL and OpenCL to admire and play with small-sized (512) to large (130k) 2D/3D particle systems.

Demo on YouTube

ytFluids

Real-Time Physics Models

  1. Boids based on classical Craig Reynolds model. Blog post here.

Boids

  1. Position Based Fluids based on NVIDIA paper Macklin and Muller, 2013. "Position Based Fluids". Blog post here.

FLuids

  1. Clouds using Position Based Fluids model with thermodynamics extension inspired by C. W. Ferreira Barbosa, Y. Dobashi and T. Yamamoto, 2015. "Adaptive cloud simulation using position based fluids". Clouds can take up to 1 min to appear. Blog post (WIP).

Clouds

For best performance, make sure that the application runs on a discrete GPU and not on default IGPU.

Requirements

  • Gitbash
  • Python (>= 3.5) + pip
  • Conan (==1.59)
  • CMake (>=3.16)
  • NSIS (only for packaging the installer)
  • C++ compiler (Cpp17)
  • Device (GPU, IGPU or else) supporting OpenGL and OpenCL 1.2 or higher

Setup Conan

pip install conan==1.59.0 #Not supporting Conan 2.0 yet
conan remote add conan-center https://conan.io/center/

Ubuntu specific requirements

sudo apt install git cmake python3-pip libegl-dev libsdl2-dev
conan profile update settings.compiler.libcxx=libstdc++11 default

Build and Run

git clone https://github.com/axoloto/RealTimeParticles.git
cd RealTimeParticles
./runApp.sh

References

Notes

  • I reached 60fps with a Nvidia GTX 1650 for the 130k boids 3D model, and 12-30fps for the 3D fluids dam simulation depending on selected settings.
  • Tested on Ubuntu, Macos (AMD GPU) and various Windows machines.

Thanks

A huge thank you to the talented people listed below who helped me on this project: