2022
Real-Time Cloth Simulation

Di Wang
Masters of Science Capstone Project, December 2022

[Proposal    Report    Presentation]

Computer animated cloth is commonplace in video games and film making. Believable cloth animation greatly improves the sense of immersion for video gamers. Simulated cloth can seamlessly blend into live-action footage, allowing filmmakers to generate desired visuals by adjusting parameters. Real-time cloth simulation allows a user to interact with the materials, making the virtual cloth try-on experience possible. All these use cases prefer fast solutions, ideally achieving believable cloth animation in real-time. It is, however, challenging to simulate cloth both accurately and efficiently, due to its infinite deformation scenarios and complex inner mechanics. This project studied two solutions to tackle real-time cloth simulations: 1) an iterative approach using a linear solver, which fully exploits the GPU’s parallel processing architecture and efficiently solves the cloth material with thousands of vertices in real-time. 2) a nonlinear solver, which is based on the Projective Dynamics global-local optimization technique [1]. We implemented an interactive application to demonstrate the two solutions, and assessed their qualities based on generality, correctness, and efficiency of the results. Our results show that both solvers are capable of generating believable real-time cloth animations in a wide range of testing scenarios: they interactively react to the changes in cloth attributes, internal and external forces, can be properly illuminated, texture mapped, and are capable of interacting with other objects in the scene, e.g., proper collision. The known conditions where the solvers could generate incorrect results were investigated: the instability of the linear solver with overly stiff spring constants, and the stiff self-bending of the nonlinear solver resulting in inability to support realistic wrinkles. By experimentation and theoretical reasoning, we identified that the linear solver’s instability is inevitable, while the nonlinear stiff-bending can be improved by a more sophisticated energy definition. To evaluate the both solvers’ efficiency, we recorded actual runtime and derived each performance function with respect to the cloth resolutions. Our results verify the expected algorithmic complexity: within GPU supported range, linear solver runtime can maintain constant as the resolution increases. The nonlinear’s running-time grows at a O(N3) rate.

Under supervision of Dr. Kelvin Sung. Division of Computing Software Systems at UW Bothell