Physically-based simulation in computer graphics aims to produce visually plausible results with high resolution and rich detail. However, it can be challenging as it requires significant computing power to model and calculate the dynamic behavior of ...
Physically-based simulation in computer graphics aims to produce visually plausible results with high resolution and rich detail. However, it can be challenging as it requires significant computing power to model and calculate the dynamic behavior of a system over time, especially for high-resolution models. Deformable objects, including soft bodies, fluids, and fabrics, pose many challenges to simulation behavior due to their complex physical properties. These objects tend to have non-linear and dynamic properties, which make it challenging to model them accurately with conventional techniques and require a significant amount of computing resources. This study introduces a novel approach, the parallel conjugate gradient algorithm, to solve significant sparse linear system problems. Additionally, we aim to develop a stable and effective cloth simulation and deformable object simulation based on a parallel algorithm. To accelerate the performance of the simulation, we utilize a general-purpose graphics processing unit (GPGPU). The proposed algorithms were designed on the compute shader in Unity3D and OpenGL, which runs outside the standard rendering pipeline in the graphics processing unit (GPU) to utilize the massive parallel process to accelerate the performance of the simulation. The method of a mass-spring model (MSM) and Position-based Dynamic (PBD) are used as the primary algorithm of our proposed cloth simulation and deformable object simulation. To address the issue of the trade-off between accuracy and performance, we proposed parallel constraint enforcement, adaptive constraint activation & deactivation (ACAD), and parallel PBD for cloth simulation. Similarly, we proposed a parallel algorithm of volume preservation constraint based on MSM and PBD for the general deformable object simulation. The experimental findings indicate that the parallel sparse linear solving algorithms proposed in this study, when tested on eight sparse matrices, yielded significantly faster results with the GPU-based linear solving system than the CPU-based linear solving system. The average computing time recorded with the GPU-based system was 0.64ms, while that with the CPU-based system was 15.37ms. The parallel technique for cloth simulation can process 589K vertices of cloth and achieve a frame per second (fps) of 49.47 fps in Unity3D and 171.3 in the OpenGL platform. The VPC method proposed for deformable object simulation can handle 82K vertices at 29.8 fps. However, the implementation in OpenGL can run up to 655K vertices with an average fps of 101. The parallel PBD technique can solve the constraint with 17K vertices and 50 iterations. In Unity3D, it has an average fps of 74.24, while in OpenGL, it has a higher fps of 167.5.