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.
Real-time physics models currently implemented:
- Boids based on classical Craig Reynolds implementation
- Position Based Fluids based on NVIDIA paper Macklin and Muller, 2013. "Position Based Fluids"
For best performance, make sure that the application runs on a discrete GPU and not default IGPU.
Requirements
- Gitbash
- Python (>= 3.5) and pip
- Conan
- CMake
- NSIS (only for packaging the installer)
- C++ compiler, tested with MSVC 15/19 only for now
- Device (GPU, IGPU or else) supporting OpenGL and OpenCL 1.2 or higher
Build and Run
pip install conan
conan remote add conan-center https://conan.io/center/
git clone https://github.com/axoloto/Boids.git
cd Boids
./runApp.sh
References
- CMake
- ImGui
- Conan
- OpenCL
- SDL2
- Glad
- spdlog
- NSIS
- OpenCL radix sort
- Simon Green N-body simulation paper
- Perlin Noise C++ implementation
Notes
Whole application has been tested only on a handful of Windows machines. I will happily make sure it works on Linux machines as well once I have access to one. Concerning performance, I reach 60fps with a Nvidia GTX 1650 for the 130k boids 3D model, and 12-30fps for the 3D fluids simulation Dam depending on selected settings.