Anda di halaman 1dari 8

Deformation Constraints in a Mass-Spring Model to Describe Rigid Cloth Behavior

Xavier Provot Institut National de Recherche en Informatique et Automatique (INRIA) B.P. 105 78153 Le Chesnay Cedex France Xavier.Provot@inria.fr http://www-rocq.inria.fr/syntim/research/provot/ This paper describes a physically-based model for animating cloth objects, derived from elastically deformable models, and improved in order to take into account the non-elastic properties of woven fabrics. A cloth object is rst approximated to a deformable surface composed of a network of masses and springs, the movement of which is evaluated using the numerical integration of the fundamental law of dynamics. We show that when a concentration of high stresses occurs in a small region of the surface, the local deformation becomes unrealistic compared to real deformations of textiles. With such an elastic model, the only solution to decrease these deformations has been so far to increase the sti ness of the deformed springs, but we show that it dramatically increases the cost of the algorithm. We present therefore a new method to adapt our model to the particularly sti properties of textiles, inspired from dynamic inverse procedures.

Abstract

raideur des ressorts deformes, mais nous montrons que ceci faisait cro^tre dramatiquement le co^t de u l'algorithme. Nous presentons donc ici une nouvelle methode permettant d'adapter notre modele aux proprietes particulierement rigides des textiles, inspiree des procedures de dynamique inverse. Keywords: Physically-based models, deformable surfaces, cloth animation, rigid behavior.

1 Introduction
1.1 Background

Woven fabrics have been widely studied in computer graphics in order to nd appropriate models describing their particular properties, namely their static behavior (e.g. drape) and their dynamic behavior (e.g. buckling propagation). Early studies can be found in 1, 2, 3, 4], but regarding cloth animation with which we were mostly concerned, physically-based models have proved to be both the most e cient and realistic. Among the physicallyResume based models used in cloth animation, elastically deCet article decrit un modele physique d'animation formable models have been used successfully in order des tissus, variante des modeles elastiques deforma- to give a representation of the behavior of various bles, et ameliore de facon a prendre en compte les cloth objects such as ags, tablecloths, or even garproprietes non elastiques des textiles. Nous mode- ments dressing synthetic actors 5, 6, 7]. lisons tout d'abord une piece de tissu par une surface deformable, constituee d'un reseau de masses 1.2 Realism et de ressorts. Son mouvement est evalue gr^ce a However, one of the problems encountered in this a l'integration numerique de la loi fondamentale de kind of modelization is that woven fabrics are far la dynamique. Nous montrons que lorsqu'une forte from having ideal elastic properties. This is why, concentration de contraintes appara^t a certains en- under certain conditions and stresses, these elasdroits de la surface, la deformation locale y de- tic models behave more like sheets of rubber, or vient irrealiste comparee aux deformations rencon- gum, than like textiles. This behavior occurs espetrees dans les tissus reels. Avec un tel modele elas- cially when the elastic model is subject to high contique, la seule solution permettant d'attenuer cette straints, and therefore to high \super-elastic" defordeformation etait jusqu'a present d'augmenter la mation rates. Such high constraints do not appear in

many of the normal uses of textiles (tablecloth, ample clothes,: : : ), and this is why the use of an elastic model for cloth animation is valid. But this is not the case for ags, or hanging sheets1 , where constraints are often concentrated at the hanging point(s) of the piece of cloth. In these cases, when high contraints should lead to lower deformation rates, cloth animation models should be much sti er than the elastic models that have been implemented so far. But the numerical solution of these models is evaluated by the means of a sampling rate in time which increases when sti ness increases|the higher the sti ness, the higher the cost of the algorithm. This is why some attempts have been made to give up elastically deformable models and to use instead a network of rigid rods of xed length 9], the movement of which can be computed thanks to the advances in constraint problems. This computation remains nevertheless costly when the number of rods increases, and the method gives free course to uncontrolled shear deformations unlikely to occur in woven fabrics. This could be handled by adding springs, but then the same \super-elastic" problem would remain, though this time only for shear deformation. From a di erent viewpoint, D. E. Breen also proposes, in 8], to use particle systems. But he only applies this method to the static behavior (the drape) of cloth objects, and not to cloth animation. Besides the computational speed of his algorithm is very slow.

2 The Mass-Spring Model


2.1 The Mesh
Our elastic model is a mesh of m n virtual masses, each mass being linked to its neighbors by massless springs of natural length non equal to zero. The linkage inbetween neighbors is achieved in three different ways ( gure 1): springs linking masses i j ] and i + 1 j ], and masses i j ] and i j + 1], will be referred to as \structural springs" springs linking masses i j ] and i +1 j +1], and masses i + 1 j ] and i j + 1], will be referred to as \shear springs" springs linking masses i j ] and i + 2 j ], and masses i j ] and i j + 2], will be referred to as \ exion springs". Indeed, under pure shear stresses, only the \shear springs" are constrained under pure exion stresses (i.e. bending), only the \ exion springs" are constrained whereas under pure compression or traction stresses (i.e. stretching), only the \structural springs" are constrained.
m=1 n=1 m=2 m=3

n=2

1.3 Preview

mass :
n=3

spring :

In our approach, we start in section 2 with a model composed of masses and springs, which can be considered as a variant of elastic models. The speci city of this approach is that, unlike in 5, 6, 7], the model is not considered as a continuous surface that will have to be discretized, but rather as a discrete structure of elements where each mass-point and each spring can be handled individually. In sections 3 and 4, we describe the inconvenient \super-elastic" property of this model and why this problem cannot be solved by increasing sti ness. In section 5, we then introduce constraints on the deformation rates of the springs in order to avoid this \super-elastic" e ect, and we take these constraints into account using a low-cost heuristic method inspired from classical dynamic inverse procedures. Results are discussed in section 6.
1

Figure 1: Regular mesh of masses and springs used for our model.

2.2 Dynamics and Forces


i j

The system under study is the mesh of the m n masses, each mass being positioned at time t on the point P (t), where i = 1 : : : m and j = 1 : : : n. The evolution of the system is governed by the fundamental law of dynamics: F = a
i j i j

also: coat hanging on a peg, banner, curtain,

:::

where is the mass of each point P and a is its acceleration caused by the force F . F can be divided between the internal and external forces.
i j i j i j i j

The internal force is the resultant of the tensions of the springs linking P to its neighbors: F (P ) = ; P( )2R K l ; l0 kl k ] (1) l where: R is the set regrouping all couples (k l) such as P is linked by a spring to P ,
i j int i j k l i j k l i j k l
i j k l

where t is a chosen time-step2.

i j k l

i j k l

k l

l0 is the natural length of the spring linking P and P , K is the sti ness of the spring linking P and P . The external force is of various nature according to the kind of load to which we wish the model to be exposed. Omnipresent loads will be gravity, a viscous damping and a viscous interaction with an air stream (or wind). Let g be the acceleration of gravity, the weight of P is given by: F (P ) = g The viscous damping will be given by: F (P ) = ;C v where C is a damping coe cient, and v is the velocity of point P . The role of this damping is in fact to model in rst approximation the dissipation of the mechanical energy of our model. It is introduced as an external force, but could actually be considered as an internal force as well. Finally, a viscous uid moving at a uniform velocity u exerts, on the surface of a body moving at a velocity v, a force F = C n (u ; v)]n, where n is the unit normal on the surface. In our case: F (P ) = C n (u ; v )]n where n is the unit normal on the surface at point P .
i j k l i j k l i j k l i j k l i j gr i j dis i j dis i j dis i j i j f luid vi vi f luid vi i j vi i j f luid i j i j i j i j i j i j

i j k l

= ;;;;!, P P
i j k l

i j

There are some cases where the movement of a cloth object is not entirely caused by analytically computable forces. This occurs for all contact problems. A simple example of this situation is given by the case of a hanging curtain. Each hanging point of a mass-spring curtain is subject to internal forces and gravity which all tend to pull it downward. But the rod from which the curtain hangs is exerting a counter-balancing force which is not directly computable as a function of the positions and the velocities of the vertices of the mesh. Nevertheless, this counter-balancing force can be indirectly determined. The integration of the fundamental law of dynamics allows us to compute the displacement of a point from the knowledge of the force applied to it. But in our case, we can solve the inverse problem: we know the displacement of the hanging point (it is equal to ~ if the rod is xed), and hence we can compute its 0 actual velocity and the actual resulting force applied to it (also equal to ~ if the rod is xed). All happens 0 as if we did not take into account the results of the integration of equation (2) for the hanging points. Whatever the result found, the displacement of the hanging points is re-set to its a priori known value. In cloth animation, dynamic inverse procedures are also used to deal with collisions of the cloth object with other objects, and to deal with selfcollisions of the cloth itself. Such procedures are described by Carignan et al. in 7], but we did not focus on this point in this paper.

2.4 Dynamic Inverse Procedures

After having implemented this algorithm, we have tested it in various situations, which led to more or less realistic results. We have been particularly interested in nding the manifestations of the lack of realism of our model, and then in understanding its causes. We will study here the case of a sheet 2.3 Integration All these considerations allow us to compute the hanging by two adjacent corners, subject to gravity, = ~ ). 0 force F (t) applied on point P at any time t. The but in a scene where there is no wind (u fundamental equation of dynamics can therefore be The sheet is modeled by a mesh composed of 17 17 explicitly integrated through time by a simple Euler vertices. The two corners are immobile and held into place by a dynamic inverse procedure, as described method: 8 a (t + t) = 1 F (t) in section 2.4. Figure 2(a) shows the initial position > of the \structural" springs (represented by cylinders) > < v (t + t) = v (t) + t a (t + t) (2) of the sheet model. Figure 2(b) shows the resulting >
f luid i j i j

3 The \Super-Elastic" E ect

> > : P (t + t) = P (t) + t v (t + t)


i j i j i j i j i j i j

2 More details about how in section 4.

must be chosen are presented

deformation computed by the algorithm after 200 steps. This example clearly shows one of the problems| the elongation of the springs directly tied to the corners is very high compared to all the other springs. The deformation of the sheet is therefore very locally concentrated around the corners, and the deformation rate3 decreases very rapidly with the distance between the vertices and the corners. The value of the deformation rate of the most elongated springs exceeds 100 % !

(a) Initial position

nomenon can be observed and it is called \superelasticity", since it concerns materials which can be subject to very high elastic deformation rates. The reason for this di erence between our model and real woven fabrics is that woven fabrics are not super-elastic at all. Their elasticity is non-linear, and their \sti ness" increases very rapidly when the deformation rate increases. The deformation rate is thus always limited to a very low amount, and when very high loads are applied, rupture occurs before any large deformation can take place. However, our goal was not to model the phenomenon of rupture, but only to limit unlikely large deformations. The maximum deformation rate of most woven fabrics is around 10 %, and it is even lower for some linen cloths, calicos or denims, for instance. Another lack of realism can be seen during the animation of the sheet: this \super-elongation" does not come to stabilization easily, and leads to a high amplitude oscillation around the equilibrium position of the sheet. To avoid this oscillation, it is therefore necessary to increase the damping coe cient C . Though this operation can indeed suppress any oscillation, one of its shortcomings is that the sheet then looks like it had been immersed in some oily uid and its movement loses realism.
dis

4 Increasing Sti ness

(b) After 200 iterations

Figure 2: Deformation of the elastic model of a sheet hanging by two adjacent corners. Such a local deformation never occurs in woven fabrics. In fact it can be sometimes encountered in very loose knitted fabrics, but it is rather infrequent. In the eld of the physics of polymers, a similar phe3 In the following, we will speak of the \deformation rate" of the springs, which will be de ned as: = ;0 0 where 0 is the natural length of a spring, and is its length at any time .
l l l l l t

To avoid the \super-elastic" e ect, we have tried to adjust the parameters of the model. This consists in increasing the sti ness of the springs. For a same level of constraints (same gravity in our case), the deformation rate should be lower for sti springs. This result can indeed be attained, but not as simply as it seems. Experience shows that, for a given time-step t and a given mass , there is a critical sti ness value K above which the numerical resolution of the system is divergent. In fact, this result is well known in the case of linear di erential equations4 . The mathematical results concerning such linear equations show that their numerical solving is ill-conditioned if t is greater than the natural period of the system 11], given by: r (3) T0 K
c

4 Our model can be reduced to this case provided the natural lengths of the springs are supposed equal to zero 12].

2 =) K m T0 2 Therefore, if we want to increase sti ness, we have to decrease t below the new decreased value of T0.
c

For a same animation time, the number of iterations needed will then be greater, and the algorithm will be more costly5. In our model, all springs have a natural length non equal to zero, but they remain nevertheless intrinsically linear springs. However, these springs once coupled lead our model to lose its linearity: it cannot be reduced to linear matricial di erential equations. However, experience shows that the result given by equation (3) is still (at least qualitatively) true in our case. This is why we have tried to nd a new method to avoid the super-elastic e ect, without having to decrease t.

Pi,j(t+ t) Pi,j(t+ t)

vi,j(t+ t) Pi,j(t) Pk,l(t+ t) vk,l(t+ t) Pk,l(t) Pi,j(t)

vi,j(t+ t) vk,l(t+ t) Pk,l(t)

Pk,l(t+ t)

(a) Adjustment of a \super-elongated" spring linking two loose masses.


Pi,j (fixed) Pi,j (fixed)

Pk,l(t)

vk,l(t+ t)

vk,l(t+ t) Pk,l(t)

Pk,l(t+ t)

Our idea has been to apply an ad hoc dynamic inverse procedure to the \super-elongated" springs (see below for their characterization) so as to reduce their elongation. At each given time-step, the numerical integration is achieved using equation (2). Then the deformation rates of all springs are computed. If, and only if, the deformation rate of a spring is greater than a critical deformation rate , then a dynamic inverse procedure is applied to the two ends of the spring so that its deformation rate exactly equals . This means that, if we choose = 0:1, we want the length of the springs not to exceed their natural length by more than 10 % (for many fabrics, it could even be less than that). The underlying reasoning which helped us build this procedure was the following: we assume that the position of the spring computed using equation (2) is correct regarding its direction , but not regarding the distance between the two ends of the spring the only thing to do is then to reduce this distance so that the deformation rate does not exceed while keeping the computed direction of the spring unchanged. The distance reduction is done di erently whether the ends of the spring are loose or are xed by a new dynamic inverse procedure. If both ends are loose ( gure 3(a)), both are evenly \brought closer" to their middle so that the \shrunk" spring reaches . If only one end is loose ( gure 3(b)), then it is \brought closer" to the xed end so as to reach . If both are xed, they are left unchanged. Thus, in a single computation, all the springs with
c c c c c c

5 Dynamic Inverse Constraints on Deformation Rates

(b) Adjustment of a \super-elongated" spring linking a xed mass and a loose mass.

Pk,l(t+ t)

Figure 3: Principle of our ad hoc dynamic inverse procedure: adjustment of the \super-elongated" springs. a deformation rate exceeding after the numerical integration are adjusted to a more \reasonable" deformation rate. Of course, at this point, this operation has modi ed the position of many vertices, and may have over-elongated other springs. But, if the deformation is very locally concentrated, the springs a ected by the operation should be less elongated than the ones which had been detected before the operation. One of the e ects of the procedure is to help the deformation propagate through the structure, instead of remaining in a concentrated area. We did not take into account the order in which the super-elongated springs are adjusted at each step. In our procedure, this order depends entirely on our data structure. This is acceptable only because we restricted our method to situations in which constraints are locally distributed, that is situations in which only a few springs are super-elongated at each step. If high constraints were globally extending to the whole cloth object, then the adjustment order of the springs would probably have more importance, and should be studied. There are still mathematical investigations to be carried out in order to prove the properties of our procedure. However, we decided to test it, and our results show that it is valid in all the situations we have implemented so far.
c

5 It must be mentioned that even if only the sti ness of a few springs (e.g. the most elongated ones) is increased, the time-step must be decreased: the lowest value of and the highest value of have to be used in equation (3).
t K

folding deformation in order to reach a low energetic shear deformation is limited. We applied this procedure to the case of the hang- position, since now itshappens as if the springs were Finally, everything ing sheet described in section 3. A critical deforma- classical springs up to a certain deformation rate, tion rate = 10 % has been chosen, rst only for rigid rods rate. \structural" springs, and then for both \structural" and quasiquasi rigid above thisis deformation using But this behavior performed and \shear" springs. We never put any constraint on a low-cost dynamic inverse procedure instead of a \ exion" springs because exion, unlike elongation more costly solving of a constraint problem. At a and shear deformation, is almost not limited at all given sti ness, the computational cost of the new in real cloth objects|they are easily folding. algorithm is indeed only 15 % greater than that of the classic elastic model6. But to reach an equivalently sti behavior with the latter, sti ness and time sampling have to be increased. Therefore, for two equivalently sti behaviors, we have measured that our algorithm is 90 % faster that the classic elastic algorithm.
c

6 Results and Discussion

(a) Our method applied to \structural" springs

Figure 5: On the left: a sti elastic model computed in 9 mn. On the right: our model computed in 1 mn. Regarding the animation sequence, the amplitude of the oscillation of the falling sheet is also much lower than in the initial model, and it disappears more quickly since many springs are kept from behaving like ideal elastic springs. The damping coe cient can be lowered, and the movement is less \oily". The same results have been obtained with a 33 33 mesh. We have noticed in some tests that the results were even better when we performed the dynamic inverse procedure twice in a row at each iteration, and this makes us think that the procedure, when repeated, is converging.
6 Here, the two models do not include any procedure designed to avoid self-collision. If such a procedure was added and since it increases the computational cost a lot, the cost added by our procedure would be even less signi cant in proportion.

(b) Our method applied to \structural" and \shear" springs

Figure 4: Deformation of our model of a sheet hanging by two adjacent corners (after 200 iterations). Figures 4(a) and 4(b) show the results we have obtained, and are to be compared with gure 2(b). On gure 4(a), the \super-elastic" e ect is totally suppressed, and all springs have a reasonable deformation rate. The sheet does not seem to be made out of some kind of rubber anymore. On gure 4(b), the shear deformation is also successfully controlled, and the sheet model is forced to undergo a greater

We have also successfully applied the method to a ag in a strong wind. Besides leading to extravagant elongations of the springs, increasing the velocity of the wind is indeed another factor which makes the purely elastic algorithm unstable, and hence which requires lower time-steps. But with our model, the elongations were totally controlled, and the move-

a comparison between the purely elastic model and our model. As is shown on gure 6(a), the qualitative observations mentioned above for the hanging sheet are still signi cantly true. Though the ag was designed to be a square of cloth, its elastic model deforms to an elongated rectangle shape, and the shear deformation at the attaching points is high. On the contrary, the square shape of our controlled model is much less deformed and there is hardly no shear deformation. In these examples, local super-elongations were concentrated around only two hanging points. But our method is also e cient for the case of the sail of the \drakkar" in gure 7 which hangs by 8 points on the upper rod and is tied to 2 points on the lower rod.

(a) Elastic ag and our \semi-rigid" ag when sti ness is low.

Figure 7: Wind blowing in a sail.

(b) Increasing sti ness: elastic ag becomes chaotic and \semi-rigid" ag remains stable.

7 Conclusion

Figure 6: Comparison for the case of a ag. ment of the ag was very realistic. With the same wind velocity, time-step and sti ness, the purely elastic model was totally unstable and chaotic ( gure 6(b)). We must also mention that this time, a critical deformation rate of only 5 % had been chosen for our model. Though this leads to a more \rigid" behavior, it does not decrease neither the e ciency of our method, nor its cost. At a lower sti ness7, we have been able to make
7

The value of the acceleration of gravity was also lowered.

We have presented an elastically deformable model of cloth objects and we have studied its unrealistic behavior compared to that of real woven fabrics. We have shown that this behavior, known as \super-elasticity", could not be improved by merely adjusting the model's parameters without signi cantly increasing the cost of the algorithm. We have therefore proposed another method to avoid the \super-elastic" e ect, based on a low-cost dynamic inverse procedure. We have shown how this heuristic method could help us model a realistic cloth object in situations in which constraints had not been adequately handled before. Using this more realistic model, it is likely that our next step will be to determine our model's parameters (including maximum deformation rate ) so that our model's behavior
c

identi es with that of real cloth samples of various nature. This could be done using the image processing of an animation sequence of real cloth samples. We hope that this work will contribute to the eld of cloth animation in computer graphics so that cloth models stick closer to reality. This is one of the conditions necessary to further consider the potential application of these cloth models to garment industry.

8 Acknowledgements

We would like to thank Georges Stamon, Andre Gagalowicz and Anne Verroust for their assistance and guidance. We would also like to thank Pierre Jancene for helping us render gure 6, and Sabine Coquillart, Philippe Decaudin and Fabrice Neyret, who were very helpful for giving us their constructive advice about our work.

References

1] Amirbayat J. and Hearle J. W. S. The Complex Buckling of Flexible Sheet Materials|Part I. Theoretical Approach. In Int. J. Mech. Sci., Great Britain, 1986, Vol. 28, No. 6, pp. 339{358.

2] Aono Masaki. A Wrinkle Propagation Model for Cloth. In Proc. Computer Graphics International'90, Springer, Tokyo, 1990, pp. 96{115. 3] Weil Jerry. The Synthesis of Cloth Objects. In Proc. SIGGRAPH'86, Computer Graphics, 1986, Vol. 20, No. 4, pp. 49{54. 4] Taillefer Frederic. Modelisation du Rendu et du Comportement des Surfaces Tissees. Ph.D. Thesis, University of Paris 6, 1993. 5] Terzopoulos Demetri, Platt John, Barr Alan, Fleischer Kurt. Elastically Deformable Models. In Proc. SIGGRAPH'87, Computer Graphics, 1987, Vol. 21, No. 4, pp. 205{214. 6] La eur Benoit, Magnenat Thalmann Nadia, Thalmann Daniel. Cloth Animation with SelfCollision Detection. In Proc. IFIP Conference on Modeling in Computer Graphics, Springer, Tokyo, 1991, pp. 179{187.

7] Carignan Michel, Yang Ying, Magnenat Thalmann Nadia, Thalmann Daniel. Dressing Animated Synthetic Actors with Complex Deformable Clothes. In Proc. SIGGRAPH'92, Computer Graphics, 1992, Vol. 26, No. 2, pp. 99{104. 8] Breen David E., House Donald H., Wozny Michael J. Predicting the Drape of Woven Cloth Using Interacting Particles. In Proc. SIGGRAPH'94, Computer Graphics Proceedings, 1994, pp. 365{372. 9] Van Overveld C. W. A. M., Van Loon Erik. Hanging Cloths and Dangling Rods: a Uni ed Approach to Constraints in Computer Animation. In The Journal of Visualization and Computer Animation, 1992, Vol. 3, pp. 45{60. 10] Platt John C., Barr Alan H. Constraint Methods for Flexible Models. In Proc. SIGGRAPH'88, Computer Graphics, 1988, Vol. 22, No. 4, pp. 279{288. 11] Klaus-Jurgen Bathe. In Finite Element Procedures in Engineering Analysis. Prentice-Hall, 1982. 12] Nastar Chahab, Ayache Nicholas. Fast Segmentation, Tracking, and Analysis of Deformable Objects. In Proceedings of the Fourth International Conference on Computer Vision (ICCV '93), Berlin, 1993.

Anda mungkin juga menyukai