Skip to Content
  • Article
  • Open Access

15 September 2010

Numerical Stability of Integration Methods Used in Cloth Simulation

,
and
1
College of Textile Donghua University, 2999 North Renmin Rd, Songjiang District, Shanghai 201620, China
2
Key Laboratory of Ministry of Education on Textile Fabric Technology, Donghua University, Shanghai 201620, China
*
Author to whom correspondence should be addressed.

Abstract

For better performance, efficient numerical methods describing physical behaviour of clothes are needed for any cloth simulation system. In this paper we report a quantitative research performed on the stability of the most widely used integration techniques in cloth simulation. Advantages and weaknesses of various integration techniques are listed for trade-off among stability, accuracy and speed. In this light, we offer a solution for choosing numerical methods when dealing with simulation problems.

1. Introduction

The physical model employed is of essential importance in the design of a stable cloth simulation system. Among the available models, there are continuous models [1] and discrete models [2]. Among which, the mass-spring system is widely-used [3] since it is the most intuitive and simple model for efficient animation of clothes. The mass-spring model assumes that a cloth is composed of mass-points and springs. Each spring connects two mass points, and the structure of the spring connection is based on the geometry topology of the cloth mesh. The motion of the cloth is determined by interactive forces between the masses. The modeling requires numerically solving an ordinary differential equation (ODE) system as illustrated in Eq. 1. In order to obtain the evolution of cloth animation along time, the numerical system has to be integrated numerically. Various numerical integration methods are available for this task.
x ′ t = f t , x t x t 0 = x 0
The main concern of our work is to briefly review the integration techniques. The algorithms are analyzed in Section 3. Section 4 shows experimental results of the integration methods. Finally, conclusions are drawn from the experimental results.

3. Algorithms

3.1. Physical model of garment

The present work employs a mass-spring system [3] for garments based on triangular mesh. Tension-shear springs and bend springs are constructed according to the topology of the mesh. Each edge of the triangular mesh that connected two vertices is treated as springs for tension and shearing, and the line that connected two vertices across each edge is considered as bending spring as illustrated in Figure 1.
Figure 1. Mass-spring system with Tension-Shear. springs (solid lines), and bending springs (dash lines).
The forces exerted on the masses are classified into external forces and internal forces. External force Fex of each particle including omnipresent gravity and air resistance is expressed as
F ex = m g + a + b ν i ν i .
where m denotes mass of each particle, g is acceleration of gravity, a represents linear air resistance coefficient and b is quadric air resistance coefficient, vi is velocity of ith mass.
Internal force F interij are caused by non-linear springs between two masses i and j at position xi and x j in the form of:
Jfbi 03 00106 i001
kij denotes elastic modulus of this spring and lij is its rest length. dij is damping coefficient. The type of spring determines its spring constant. Structural springs usually possess higher spring constant values than shear and bending ones. Damping forces are added to account for energy dissipation due to internal friction. These forces damp out the garment’s kinetic energy according to its relative velocity. The most popular model used as damping force F dij of each particle is
F d ij = − d ij ( v i − v j ) .
The linear terms are particularly suited for numerical integration. In order to overcome the artifacts caused by high damping forces, we rectify the damping model according to the method reported by Hauth et al. [9]. The linear damping force was projected onto the direction of the spring to alleviate this phenomenon. Random sequential order has been taken which mitigates the order-dependent problems from this point of view.

3.2. Numerical methods

To animate the mass-spring model mentioned above the numerical integration methods are needed for computing the new velocity and position. The numerical integrators considered in this study are explicit Euler, Symplectic, Midpoint, RK4, Verlet, implicit method [5] and Semi-implicit method [6]. The algorithms are as follows: Explicit Euler methods are described in Eq.2 [3]. The accuracy of this method is O(h2).
( Δ x Δ v ) = h ( v 0 M − 1 f 0 )
Symplectic integration is different from explicit Euler:
( Δ x Δ v ) = h ( v 0 + Δ v M − 1 f 0 )
Midpoint integration is in the form of
k 1 = f ( t n , y n ) k 2 = f ( t n + 1 2 h , y n + 1 2 h k 1 ) . x n + 1 = x n + h k 2
The accuracy of Midpoint integration is O(h3).
RK4 integration method is expressed as
k 1 = f t n , y n k 2 = f t n + 1 2 h , y n + 1 2 h k 1 k 3 = f t n + 1 2 h , y n + 1 2 h k 2 k 4 = f t n + h , y n + h k 3 x n + 1 = x n + 1 6 h k 1 + 2 k 2 + 2 k 3 + k 4 .
The accuracy of this method is O(h5).
Verlet is represented by
x n + 1 = 2 x n − x n − 1 + h i 2 x i ″ .
This gives us a solution with the accuracy of O(h2) for integrating position from acceleration, without involving velocity at all. The velocity we used is estimated as:
v i = x i + 1 − x i − 1 2 h .
But it possesses the computational cost of first order which is easy to code. Therefore Verlet is often chosen over implicit methods for these reasons in physical simulation.

3.3. Strain control

Strain is defined as τ l = l − l 0 l 0 , where l is current length of the spring. l0 is the natural length of this spring. The strain control to adjust the excessive deformation used in this paper is post correction by Provot [3]. Position modification or post correction assume that the position of the spring computed is correct with respect to its direction, but not the distance between the two ends of the spring. Thus the position of each mass is moved at the end of each time step with an iterative algorithm if the length of spring exceeds certain threshold. But this method can’t guarantee convergence because adjusting one position of one node affects the length of all springs connected with this vertex. The algorithm is shown in Table 1.
Table 1. The post correction algorithm.

4. Experimental results

All experiments are performed on a PC with a 1.61 GHz Intel processor, NVIDIA GeForce 7300 GT and 2.00GB memory. To demonstrate the stability of several integration methods, two different sets of experiments were carried out (1) a piece of cloth draped around a sphere and (2) a sheet hanging by the two corners. By monitoring the strain of the whole cloth, the stability of various integration methods was derived. The maximum strain is set at 1% in the case of cloth draped around sphere. Simple collision handling was added. The change of strain illustrates the stability of the integrators along the simulation process.
A piece of cloth is draped down under gravity around a sphere. The snapshots of the simulation results using various integration methods with strain control of position modification are shown in Figure 2. We can conclude from Figure 3 that Verlet integration method is the most stable one among them while the others are with no big difference. Strain of Verlet integration can maintain 0.5% while the others are around 13%.
Figure 2. Cloth draped around a sphere using (1) Euler (2) Symplectic (3) Midpoint (4) RK4 and (5) Verlet method with strain control of position modification.
Figure 3. Cloth draped around a sphere under various integration methods with position modification by strain control.
A sheet of cloth is hung with two fixed corners under gravity. The maximum strain we set in this condition is 10%. We can see in Figure 4 that the strain of Verlet integration stays at about 2% while the other four methods are around 12%.
Figure 4. Hanged sheet under various integration methods without strain control.
The sheet hung by two corners subject to wind show similar results as plotted in Figure 5. The experiments show that Verlet integration is suitable for dealing with stiff system.
Figure 5. Hanged sheet subject to wind under various integration methods with position modification.
Improved accuracy comes at the cost of more calculations at each step. Euler requires calculating only once while midpoint needs two calculations and RK4 takes four. To achieve the level of error tolerance of RK4 it would require many more evaluations of Euler’s method. It still adds both complexity and increases simulation time that may not be necessary.
When subjected to wind the result is similar to that of without wind effect. The snap shots of these simulation results are illustrated in Figure 6.
Figure 6. Hung sheet with and without wind using Verlet method.

5. Conclusions

The stability of numerical methods is of essential importance in choosing the most efficient integration technique for cloth simulation. The verlet integration method is the most stable one among the available five methods. The results provide empirical background for choosing the right one based on the needed level of accuracy and speed. Also we can control the times of iteration according to the stability. When the relative error is beyond pre-specified tolerance, then no further iterations are necessary and the process is stopped. All the algorithms that try to improve the modeling performance are limited to this period. Beyond this scope the simulation is out of control.

Acknowledgments

This research was funded in part through the grants by Natural Science Foundation of China (No. 60703098, No. 60973072), the Fundamental Research Funds for the Central Universities, Specialized Research Fund for the Doctoral Program of Higher Education (SRFDP) (No. 20070255003), and Foundation of Donghua University for Phd. Candidates (No. BC200918).

References

  1. Terzopoulos, D.; Platt, J.; Barr, A.; Fleischer, K. Elastically deformable models. Comput. Graph. Forum 1987, 21(4), 205–214. [Google Scholar] [CrossRef] [Scilit]
  2. Breen, D.E.; House, D.H.; Wozny, M.J. Predicting the drape of woven cloth using interacting particles. Proceedings of ACM SIGGRAPH 1994.
  3. Provot, X. Deformation constraints in a mass-spring model to describe rigid cloth behavior. Graph. Interface 1995, 147–154. [Google Scholar]
  4. Volino, P.; Magnenat-Thalmann, N. Comparing efficiency of integration methods for cloth simulation 2001.
  5. Baraff, D.; Witkin, A. Large steps in cloth simulation. Comput. Graph. Annu. Conf. Ser. 1998, 32, 43–54. [Google Scholar] [CrossRef] [Scilit]
  6. Desbrun, M.; Schrӧder, P.; Barr, A. Interactive animation of structured deformable objects. 1999.
  7. Kang, Y.M.; Choi, J.H.; Cho, H.G.; Park, C.J. Fast and stable animation of cloth with an approximated implicit method. 2000.
  8. Eberhardt, B.; Etzmu, O.; Hauth, M. Implicit-explicit schemes for fast animation with particle systems, 2000.
  9. Hauth, M.; Etzmuss, O.; Eberhardt, B.; Klein, R.; Sarlette, R.; Sattler, M.; Daubert, K.; Kautz, J. Cloth animation and rendering. proceedings of proceedings of eurographics, 2002.
  10. Hauth, M.; Etzmuss, O. A high performance solver for the animation of deformable objects using advanced numerical methods. Eurographics 2001, 20(3), 15. [Google Scholar] [CrossRef] [Scilit]
  11. Hauth, M.; Etzmu, O.; Stra er, W. Analysis of numerical methods for the simulation of deformable models. Vis. Comput. 2003, 19(7), 581–600. [Google Scholar] [CrossRef] [Scilit]
  12. Kang, Y.M.; Choi, J.H.; Cho, H.G.; Lee, D.H.; Park, C.J. Real-time animation technique for flexible and thin objects; 2000: 322–329.
  13. Tsiknis, K.D. Better cloth through unbiased strain limiting and physics-aware subdivision. Computer Science 2006; Master: 37.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.