Vol.41, No.2, 2022, pp.427-443, doi:10.32604/csse.2022.020685
OPEN ACCESS
ARTICLE
Parallel Cloth Simulation Using OpenGL Shading Language
  • Hongly Va1, Min-Hyung Choi2, Min Hong3,*
1 Department of Software Convergence, Soonchunhyang University, Asan, 31538, Korea
2 Department of Computer Science and Engineering, University of Colorado Denver, Denver, CO 80217, USA
3 Department of Computer Software Engineering, Soonchunhyang University, Asan, 31538, Korea
* Corresponding Author: Min Hong. Email:
Received 03 June 2021; Accepted 05 July 2021; Issue published 25 October 2021
Abstract
The primary goal of cloth simulation is to express object behavior in a realistic manner and achieve real-time performance by following the fundamental concept of physic. In general, the mass–spring system is applied to real-time cloth simulation with three types of springs. However, hard spring cloth simulation using the mass–spring system requires a small integration time-step in order to use a large stiffness coefficient. Furthermore, to obtain stable behavior, constraint enforcement is used instead of maintenance of the force of each spring. Constraint force computation involves a large sparse linear solving operation. Due to the large computation, we implement a cloth simulation using adaptive constraint activation and deactivation techniques that involve the mass–spring system and constraint enforcement method to prevent excessive elongation of cloth. At the same time, when the length of the spring is stretched or compressed over a defined threshold, adaptive constraint activation and deactivation method deactivates the spring and generate the implicit constraint. Traditional method that uses a serial process of the Central Processing Unit (CPU) to solve the system in every frame cannot handle the complex structure of clothmodel in real-time. Our simulation utilizes the Graphic Processing Unit (GPU) parallel processing with compute shader in OpenGL Shading Language (GLSL) to solve the system effectively. In this paper, we design and implement parallel method for cloth simulation, and experiment on the performance and behavior comparison of the mass–spring system, constraint enforcement, and adaptive constraint activation and deactivation techniques the using GPU-based parallel method.
Keywords
Adaptive constraint; cloth simulation; constraint enforcement; GLSL compute shader; mass–spring system; parallel GPU
Cite This Article
Va, H., Choi, M., Hong, M. (2022). Parallel Cloth Simulation Using OpenGL Shading Language. Computer Systems Science and Engineering, 41(2), 427–443.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.