A real-time SPH fluid simulation using CUDA and OpenGL
To build AquaSimCUDA, you can use CMake. Follow these steps:
- Create a build directory:
mkdir build && cd build
- Run CMake to configure the project:
cmake ..
- Build the project:
cmake --build . - After building, the executable will be located in the
bindirectory created by CMake.
- Use
W,A,S,Dto move around. - Hold the left mouse button to look around and move.
- Press
Qto move up. - Press
Eto move down.
In the config directory, you will find a .jsonc file. This file allows you to modify the parameters of the simulation.
- When specifying a container, you must define a region for rendering the marching cubes.
- Each container requires:
- Planes at the bottom to be defined separately and assigned a container "name" and a containerId for which they belong to.
- Minimum and maximum bounds for marching cubes.
- You can define a list of containers, each containing a list of fluids. However, all containers will share the same parameters (e.g., viscosity, etc.).
Make sure to carefully configure these parameters to ensure proper simulation behavior. Example configurations are provided in the .jsonc file for reference.