While watching Marvel movies, are the character handsome? Do you like their clothes? When playing video games, do you want to change the clothing of your character? or even pay for it? In most of cartoon movies we were watching, or some clips from Marvel movies, characters are always dressing beautiful clothes, suites, skirts, etc. In most streets, or campaigns, people are always having some flags or banners to hold. These things seem easy and natural in our real life, but how could we present them or even animate them in a virtual world? such that any people around the world can watch it or even improve it? One of fundamental and pivotal problems for human avatars in virtual reality is clothing simulation, which involves the problems of how to simulate the cloth such that they are visually pleasing and physically correct, how to generalize the simulation pipeline into different cloth materials, how to scale the simulation into larger and larger cloth. All of these problems requires huge research efforts to explore and develop. In this blog we focus on the situation of scaling the simulation for cloth.
“Computational resources is always behind the demand of it”, whenever new computer comes with huge computation power, there always exists a demand that requires even more power of it. For example, one could simply increase the number of triangles in mesh for processing. Things get even more worse if coming back to the time of 1998, when the computer was not as fast as it’s currently being (even could be several orders of magnitude slower than what it is now ๐ ), how would we run a simulation in that scenario? what’s the major bottleneck of simulation without bringing back all of the advanced technology we have in mind right now? How to develop a fast and stable simulation system, particular for cloth?
Let’s go to the deep how to simulate a system first. Typically, following Newton’s second law, simulating a system involves solving the Partial Differential Equation:

where the acceleration equals to the inverse of mass times the forces. In the case of cloth, which typically has an internal energy E, the gradient of E at the particular location will induce the internal forces.
Then the problem becomes how to solve this equation both stably and fast? The first idea came into the mind is discretizing the equation into different time step and numerical integrating them together. In particular at each small time step h, we have the following equation (putting all the forces into the f).

Well, then it comes to a second hardest part in this equation, we still need to solve this Ordinary Differential Equation at this time step, how to solve it? The simplest treatment is treating the right hand side as the velocity and forces at previous time time, which means:

In this case, h means the time duration. Then we have the full pipeline!!! But! Wait a second, there are some problems here, so right hand side is only from the previous time, so it’s only an approximate of true answers, in the case of severe change in a time step (e.g. a stiff part), it’s very fragile to break. This is also the main reason why previous method on cloth simulation needs very small time step to integrate, which makes things slow, slow, and slow ๐
How can we improve it? Let’s rethink of above equation, any other formulation we can think of? Another way of thinking the problem is thinking from the backward side, what if we get the velocity and forces from the end of time step? can we also do it? Then it becomes the following equation:

Interestingly, this means to get the new velocity and location we only need to solve this equation! With some simplification of the above equation, we can derive the below:

Variable in this equation are known in most cases, and we need to compute the gradient from forces into the velocity and position, then solving the equation to get the velocity update, and use the updated velocity to get new position. In this paper, it used an efficient sparse solver to get more of it (Interesting readers can look into more details in the paper ๐
Experiments turn out this can be much faster than previous methods. Then this it is! A fast and stable cloth simulation framework that supports large step in simulation and stable to the different configurations of clothes. Check more to the original paper for more details if you want to learn more about it!
Also just for fun, cloth simulation is a long-standing research problem, check the below video of the latest simulation results!
Thanks for your time in reading! Hope it can help people understanding large step in cloth simulation ๐