高级检索
温婵娟, 欧嘉蔚, 贾金原. GPU通用计算平台上的SPH流体模拟[J]. 计算机辅助设计与图形学学报, 2010, 22(3): 406-411.
引用本文: 温婵娟, 欧嘉蔚, 贾金原. GPU通用计算平台上的SPH流体模拟[J]. 计算机辅助设计与图形学学报, 2010, 22(3): 406-411.
Wen Chanjuan, Ou Jiayu, Jia Jinyuan. GPGPU-based Smoothed Particle Hydrodynamic Fluid Simulation[J]. Journal of Computer-Aided Design & Computer Graphics, 2010, 22(3): 406-411.
Citation: Wen Chanjuan, Ou Jiayu, Jia Jinyuan. GPGPU-based Smoothed Particle Hydrodynamic Fluid Simulation[J]. Journal of Computer-Aided Design & Computer Graphics, 2010, 22(3): 406-411.

GPU通用计算平台上的SPH流体模拟

GPGPU-based Smoothed Particle Hydrodynamic Fluid Simulation

  • 摘要: 针对流体模拟需要大量计算资源从而很难达到实时模拟的问题,提出一种完全在GPU上实现的基于平滑粒子流体动力学的流体模拟方法.首先通过在GPU上构造基于哈希函数的空间均匀网格来实现任意大小场景的快速邻近粒子查找,并在GPU上并行求解SPH流体方程来实现流体模拟;渲染流体时,通过在顶点着色器中进行纹理采样,利用粒子坐标缓存数据直接更新流体粒子系统的顶点缓存,从而避免了CPU—GPU之间的数据传输,充分利用了GPU的并行性.实验对比表明,与纯CPU实现以及CPU和GPU混合实现的模拟结果相比,采用该方法能显著地减少单个时间片的计算时间,大幅度提高流体模拟和渲染的整体性能.

     

    Abstract: Real-time fluid simulation has become a challenging task due to its intensive computational resource required.This paper presents a new particle-based SPH fluid simulation method based completely on GPU.By this method,hash-based uniform grid is constructed firstly on GPU to locate the neighbor particles faster in arbitrary scale scenes.Then in rendering stage,the particle vertex buffer is updated with the particle position buffer directly by sampling textures in vertex shader,thus,the intensive data transfers between CPU and GPU is avoided and the parallelism of GPU hardware is further utilized.The experimental results show that,in comparison with the pure CPU implementation or combined implementation of CPU and GPU,our method can be used to reduce the fundamental computing time in terms of single GPU time slice effectively and thus significantly improve the performance of fluid simulation and rendering.

     

/

返回文章
返回