Fluid simulation refers to the simulation of natural phenomena, such as churning smoke, turbulent streams and surging waves, with the combination of physical equations and computer graphics. Among them, smoke simulation is always one of the research hotspots in computer graphics, and it is still a significant and challenging topic. In recent years, with the increasing request to the realistic in movie industry, video games and advertising, researchers have achieved major progress in the physically-based smoke simulation. And smoke simulation has been widely used in various fields. However, due to the tremendous computing workload, it can’t meet real-time requirement, which limits its applications seriously.In order to improve the efficiency of smoke simulation, we choose the Lagrangian vortex methods as vortex smoke solver, which can succinctly represent richly detailed flow and suffers no numerical diffusion as other solvers, and we improve it on the GPU according PPPM method with the help of CUDA parallel technique. In this paper, we replace the traditional iterative method with multigrid method, a more rapid and accurate algorithm, to solve the Poisson equation. Then we use spatial hashing method based on CUDA to accelerate the search for nearest neighboring particles. Texture memory and shared memory is used to optimize this program. We adopt an extension of volume rendering to render smoke because of the arbitrary distribution of smoke particle in space. We also develop a plug-in to integrate the smoke simulation tool with commercial modeling and animation software. |