This project aims to implement a real-time smoke fluid simulation. All components have been configured to run on GPUs using CUDA programming, which can be examined in the kernels
folder. The project uses advanced fluid dynamics algorithms and volumetric rendering techniques for realistic smoke visualization. It is divided into three main parts: Fluid Solver, Renderer, and an OpenGL-based interactive window (GL).
The Fluid Solver contains the core algorithms for fluid motion, efficiently implemented in CUDA for GPU acceleration.
The Renderer applies volumetric rendering techniques, also optimized with CUDA for GPU, to achieve realistic visualization of smoke.
The GL part creates a visualization window and handles user interactions, enabling users to view and interact with the smoke simulation.
The project depends on several libraries listed in the CMakeLists.txt
file. To install these libraries, follow these steps:
- Download and install CMake if not already installed on your system.
- Clone this repository to your local machine.
- Open a command line tool and navigate to the project directory.
- Run the
cmake
command to load theCMakeLists.txt
file, which will automatically download and install the required libraries.
After installing the libraries, follow these steps to run the project:
- Locate the
gl
executable file in the project directory. - Run the
gl
file to start the program.
- The simulation starts automatically upon launching the program.
- Pause/Resume Simulation: Press the
P
key to pause the fluid motion. Press theO
key to resume the simulation. - Camera Control: Use
W
/S
,A
/D
,Space
, andCtrl
keys to move the camera for different views of the 3D simulation.
- Chen Junsheng
- Zhang Yuefeng
ShanghaiTech CS171 Final Project