欢迎访问《图学学报》 分享到:

图学学报 ›› 2025, Vol. 46 ›› Issue (3): 642-654.DOI: 10.11996/JG.j.2095-302X.2025030642

• 计算机图形学与虚拟现实 • 上一篇    下一篇

基于GPU的刚体动力学并行求解性能分析

梁睿凯(), 罗旭锟, 郭煜中, 何小伟()   

  1. 中国科学院软件研究所人机交互北京重点实验室,北京 100190
  • 收稿日期:2024-08-23 接受日期:2025-01-13 出版日期:2025-06-30 发布日期:2025-06-13
  • 通讯作者:何小伟(1985-),男,研究员,博士。主要研究方向为计算机图形学与物理仿真。E-mail:xiaowei@iscas.ac.cn
  • 第一作者:梁睿凯(2001-),男,硕士研究生。主要研究方向为基于物理的仿真、刚体动力学仿真。E-mail:liangruikai23@mails.ucas.ac.cn
  • 基金资助:
    国家重点研发青年科学家项目(2021YFB1715800);国家自然科学基金青年基金(62302490)

Performance analysis of GPU-based parallel solvers for rigid body dynamics

LIANG Ruikai(), LUO Xukun, GUO Yuzhong, HE Xiaowei()   

  1. Beijing Key Laboratory of Human-Computer Interaction, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China
  • Received:2024-08-23 Accepted:2025-01-13 Published:2025-06-30 Online:2025-06-13
  • Contact: HE Xiaowei (1985-), researcher, Ph.D. His main research interests cover computer graphics and physical simulation. E-mail:xiaowei@iscas.ac.cn
  • First author:LIANG Ruikai (2001-), master student. His main research interests cover physics-based simulation and rigid body dynamics simulation. E-mail:liangruikai23@mails.ucas.ac.cn
  • Supported by:
    National Key R&D Program of China(2021YFB1715800);National Natural Science Foundation of China(62302490)

摘要:

包含刚体和约束的多体动力学模拟在物理仿真中占有重要地位,广泛应用于工程分析、虚拟现实以及游戏动画等领域。传统的刚体物理引擎主要依赖于CPU进行计算,而在现代计算机图形学和实时物理模拟中,GPU的并行计算能力被证明能够显著提高计算性能。为此,研究探索了5种基于雅可比方法的约束求解器在GPU上的实现并对其进行了性能与稳定性分析。具体包括:投影雅可比求解器(PJ)、结合投影雅可比与非线性雅可比的求解器(PJNJ)、投影雅可比与软约束求解器(PJSoft)、基于子步骤策略的雅可比求解器(TJ)和结合子步骤策略的雅可比与软约束求解器(TJSoft)。在基准测试中,软约束方法展现出平滑的约束冲量响应,且子步骤策略在处理高质量比和复杂场景时提供了更为稳定的解决方案。本研究为评估多体模拟中基于GPU的约束求解方案提供了新的视角,对实时物理模拟和交互式计算机图形学具有重要参考价值。

关键词: 多体动力学模拟, GPU实现, 雅可比法, 软约束, 子步骤, 性能与稳定性分析

Abstract:

Multi-body dynamic simulation involving rigid bodies and constraints plays a critical role in physical simulation and has widespread applications in engineering analysis, virtual reality, and game animation. Traditional rigid-body physics engines primarily rely on CPUs for computation. However, in modern computer graphics and real-time physics simulation, the parallel computing power of GPUs has been demonstrated to significantly enhance performance. This study explored the implementation of five Jacobian-based constraint solvers on the GPU and analyzed their performance and stability. These solvers included the projected Jacobi (PJ) solver, the combined projected Jacobi and nonlinear Jacobi (PJNJ) solver, the projected Jacobi with soft constraints (PJSoft) solver, the substep-based Jacobi (TJ) solver, and the substep-based Jacobi with soft constraints (TJSoft) solver. Benchmark tests revealed that the soft-constraint method provided smoother constraint impulse responses, while employing a substep strategy results in more stable solutions, particularly for high mass ratios and complex scenarios. Overall, this work offered a fresh perspective on evaluating GPU-based constraint solver strategies in multi-body simulations and served as an important reference for real-time physics simulation and interactive computer graphics.

Key words: multi-body dynamic simulation, GPU implementation, Jacobi method, soft constraints, substep, performance and stability analysis

中图分类号: