Open AccessOpen Access


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:

Computer Systems Science and Engineering 2022, 41(2), 427-443.


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.


Cite This Article

H. Va, M. Choi and M. Hong, "Parallel cloth simulation using opengl shading language," Computer Systems Science and Engineering, vol. 41, no.2, pp. 427–443, 2022.

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.
  • 1221


  • 770


  • 1


Share Link

WeChat scan