Fast and Stable Cloth Simulation with Contact Based on Optimized C-IPC Method
摘要
The applications of cloth simulation with frictional contact are ubiquitous, and achieving dynamic cloth effects with complex frictional contact is a significant research topic. However, the numerical computation and enhancing stability of cloth simulation with contact presents significant challenges in C-IPC, stemming from the highly nonlinear system, contact Hessian assembly and uncontrollable numerical damping. Based on our empirical analysis, we have determined that the computational cost of simulating cloth with frictional contact is dominated by linear solving step and constraint set computation step etc. The linear solving step, whose purpose is to update the object’s motion, accounts for the largest proportion of the total time because it involves Hessian matrix assembly and gradient vector update. Within the landscape of existing methodologies, the principal computational bottleneck is assembling the Hessian matrix. The direct computation of its matrix–vector product and the gradient constitutes a prohibitively expensive operation, especially in large-scale scenarios. In addition, strong stretch forces must be accompanied by appropriately strong damping forces in C-IPC. Simple damping models can damp the motion of objects in complex scenarios, they tend to introduce noticeable instability into the simulation. In this paper, we propose a fast iterative algorithm for solving linear equations using the linear conjugate gradient algorithm to optimize Newton method. This algorithm seeks to compute approximate Hessians and gradients while preserving the convergence characteristics of many exact underlying second-order algorithms. This improvement effectively reduces the computational overhead of the linear solver. Compared with C-IPC method, our method is twice as fast in situations with a large amount of contact. In addition, to enhance the stability of the simulation system, we have integrated the Rayleigh damping model into our framework. By integrating the damping energy, we eliminate unstable high-frequency vibrations and obtain stable and realistic simulation results.https://github.com/SUER119/Optimizated-Method.