Minimalist real-time application combining DearImGui/OpenGL and OpenCL to admire and play with small-sized (512) to large (130k) 2D/3D particle systems.
- Boids based on classical Craig Reynolds model. Blog post here.
- Position Based Fluids based on NVIDIA paper Macklin and Muller, 2013. "Position Based Fluids". Blog post here.
- 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).
For best performance, make sure that the application runs on a discrete GPU and not on default IGPU.
- 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
pip install conan==1.59.0 #Not supporting Conan 2.0 yet
conan remote add conan-center https://conan.io/center/
sudo apt install git cmake python3-pip libegl-dev libsdl2-dev
conan profile update settings.compiler.libcxx=libstdc++11 default
git clone https://github.com/axoloto/RealTimeParticles.git
cd RealTimeParticles
./runApp.sh
- CMake
- ImGui
- Conan
- OpenCL
- SDL2
- Glad
- spdlog
- NSIS
- OpenCL radix sort
- Simon Green N-body simulation paper
- Perlin Noise C++ implementation
- 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.
A huge thank you to the talented people listed below who helped me on this project:
- Maitre-Pangolin implemented the first CPU boids model.
- Frederic Janicki initiated conan implementation.
- vrince implemented Linux support.