IMPULSE-BASED SIMULATION OF INEXTENSIBLE CLOTH Jn Bender nd Dniel Byer Institut für Betries- und Dilogssysteme Universität Krlsrue Am Fsnengrten 5 76128 Krlsrue Germny ABSTRACT In tis pper n impulse-sed metod for clot simultion is presented. Te simultion of clot is required in different ppliction res like computer nimtion, virtul relity or computer gmes. Simultion metods often ssume tt clot is n elstic mteril. Wit tis ssumption te simultion cn e performed very efficiently using spring forces. Te prolem is tt mny textiles cnnot e stretced significntly. A relistic simultion of tese textiles wit spring forces leds to stiff differentil equtions wic cuse deteriortion of performnce. Te impulse-sed metod descried in tis pper solves tis prolem nd llows te relistic simultion of inelstic textiles. KEYWORDS Clot simultion, pysiclly-sed modelling, impulse-sed simultion, inelstic textiles 1. INTRODUCTION Te simultion of clot nd frics is n import re of reserc nd s mny pplictions like computer nimtion, gmes nd virtul environments. Terefore tis re s long istory of reserc. House nd Breen (2000) nd Mgnent-Tlmnn nd Volino (2005) give good survey of te reserc done in clot nimtions. Current reserc prolems in cloting simultion re summrized in Coi nd Ko (2005). Clot is often simulted s n elstic mteril due to performnce resons ut mny textiles re not noticely stretcle. Mny pproces use spring forces for te simultion of stretcle clot. In fct tody's cloting simultions re minly sed on spring-mss systems of prticles (see, e.g. Coi nd Ko (2002)). Te relistic simultion of n inextensile piece of clot wit suc n pproc would require lrge spring constnts. Tis leds to stiff differentil equtions wic re rd to integrte nd decrese te numericl stility (Hut et l. (2003)). Te integrtion cn only e performed y reducing te time step size significntly or y using specil metods. In ot cses te consequence is low performnce. Anoter pproc is to use constrints to enforce te conditions insted of integrting te spring forces directly (see, e.g. Furmnn et l. (2003)). Especilly if smll tolernces re demnded tis pproc provides good lterntive. A system for constrined-sed simultion of inextensile clot sed on te lgrngin mecnics is given in Goldentl et l. (2007). In tis pper new constrint-sed pproc is presented tt uses impulses for te simultion of clot. It is sown tt te use of impulses insted of spring forces llows n ccurte solution of te constrints. 2. CLOTH SIMULATION A piece of clot is represented y mes of prticles tt re linked y distnce constrints. Te following sections descrie te simultion of prticles nd constrints nd te ndling of teir dependencies in mes.
2.1 Prticle simultion A prticle is ody tt s mss ut no volume. Since prticle s no dimension, it s just trnsltionl degrees of freedom nd no rottionl ones. In te simultion te stte of prticle is descried y its mss m its position c nd its liner velocity v. In generl te mss of prticle is constnt during te simultion. A time step of prticle is performed y integrting its velocity nd its position over time. It is ssumed tt te sum of ll externl forces cting on prticle, like e.g. grvity, is constnt during te time step. In tis cse te velocity nd position fter step of size cn e computed directly y te following equtions: Fext Fext v( t0 + ) = v( + dt = v( t ) m 0 + m 0 Fext 1 Fext 2 c( t0 + ) = c( + v( + t dt = c( + v( + m 2 m 0 were Fext is te sum of ll externl forces nd t0 is te strt time of te simultion step. In te simultion it is differentited etween dynmic nd sttic prticles. In contrst to dynmic prticles sttic ones ve fix position nd no velocity. 2.2 Distnce constrints A distnce constrint for two prticles nd consists of two prts: position constrint nd constrint for te velocities of te prticles. Te position constrint is defined s follows: d( d(0) = 0 wit d( = c( c (. Tis mens tt te difference of teir ctul distnce nd teir distnce t te eginning of te simultion must e zero to stisfy tis constrint. Hence teir distnce must sty constnt over time. In te simultion tis constrint is stisfied y impulses. At time t tese impulses re computed y using preview of te simultion step. For distnce constrint te distnce of te corresponding prticles d(t+) fter te next simultion step of size is determined y integrting te prticle positions (see section 2.1). Te difference etween te vlue d(t+) nd te distnce d(0) t te eginning of te simultion is exctly te error tt would occur, if te simultion step would e performed witout regrding te position constrint. Tis error e = d( t + ) d(0) cn e eliminted y computing impulses nd pplying tem t te eginning of te simultion step t time t. Since n unconstrined prticle s liner motion, te two prticles must cnge teir reltive velocity y e / in direction of te constrint in order to cnge teir distnce y e in time step of size. Te direction of te constrint is given y te vector from prticle to prticle. In order to stisfy te conservtion of momentum two impulses p nd p of te sme mgnitude nd opposite directions re pplied to perform tis velocity cnge. Te impulse p cn e determined y solving te eqution: e Δ v ( p, Δv ( p, = ( c ( c ( ) were Δv ( p, is te velocity cnge of prticle, wen te impulse p is pplied. Te differentition etween dynmic nd sttic prticles is done using te following vlue for computing te velocity cnge: k 1 / m, if prticle is dynmic = 0, oterwise. Te resulting eqution for te impulse is: Δ v ( p, Δv ( p, = k p k( p) = ( k + k) p = ( c ( c ( ) e
wic cn e solved, if t lest one of te prticles is dynmic nd te prticles ve different positions. It is ssumed tt te constrint is stisfied t te eginning of simultion step, so te prticles cnnot ve te sme positions. After te determintion of te impulse p it must e pplied to te prticles in positive nd negtive direction respectively. Due to te resulting velocity cnge, te position constrint will e stisfied fter te simultion step. Te second prt of te distnce constrint is constrint for te velocities of te prticles: ( v () t v () t )( c ( c ( ) = 0. Tis mens tt te reltive velocity of te prticles in direction of te constrint must e zero. In contrst to te position constrint, ere te required impulse cn e determined directly witout preview ecuse n impulse cuses n instntneous velocity cnge. Te impulse tt stisfies te constrint is computed y: ( v () t v ( )( c () t c () t ) p =. k + k Te computtion of n impulse in order to correct te velocities is not solutely necessry for te simultion of distnce constrint. A iger degree of ccurcy cn e cieved y regrding te velocity constrint in te simultion ut t te cost of performnce. 2.3 Mes simultion In te simultion clot is represented y mes. In ec vertex of tis mes one prticle is creted. A simple pproc to simulte stretcle clot is to introduce dmped spring on ec edge of te mes. Te elsticity of te clot is controlled y te spring constnt nd te dmping coefficient. However te simultion of inextensile clot using spring forces leds to stiff differentil equtions wic cuse significnt decrese of performnce. In order to simulte clot using impulses distnce constrint s descried ove is defined for ec pir of prticles tt re connected y n edge in te mes. Te constrint is stisfied, if te distnce etween te positions of te two corresponding prticles equls te lengt of te edge t te eginning of te simultion. If ec constrint is exctly stisfied, te simulted mes is inextensile. In suc mes prticle is linked y multiple distnce constrints to oter prticles. Te impulses of constrints wic ve common prticle influence ec oter. Te resulting dependencies cn e resolved, if te constrints re ndled in n itertive process. In n itertion step n impulse is computed for ec distnce constrint s descried in section 2.2. Since te impulses influence ec oter te constrints re not stisfied witin one step ut te errors re reduced. Te itertive process stops, wen ll constrints re stisfied witin predefined tolernce. Scmitt et l. (2005) proofed tt tis itertive metod converges to te pysiclly correct solution. Te itertive metod s mny dvntges. It is very simple to implement. Collision nd contct ndling wit friction cn e esily integrted in te itertive process (Bender et l., 2006). Te mximl llowed extensiility of te simulted clot is directly defined y te used tolernce vlue. Te itertive process cn e interrupted t ny time to get preliminry result. Even if te process is interrupted nd te tolernce vlue is not reced, te simultion stys stle. All constrints wic ve no common prticle nd terefore no direct dependency cn e solved in prllel. Te disdvntge of te itertive pproc is tt te simultion of complex mes requires mny itertions, if smll tolernce vlue is used. Te numer of itertions cn e reduced significntly y sudividing te mes into strips of constrints. Te distnce constrints of strip must e cyclic. In tis cse ec strip cn e simulted y te liner-time metod of Jn Bender (2007). Te dependencies etween te single strips re still resolved y n itertive process ut since only few strips re required for mes, now tis process converges very fst. 3. RESULTS Te presented metod ws implemented in C++. For te ccurte ndling of collisions nd contcts wit friction te constrint-sed collision response metod of Bender et l. (2006) ws integrted in te itertive process descried ove.
Figure 1 sows te results of two different simultions wit te impulse-sed metod descried in tis pper. Te tolernce vlue used in te itertive process defines te mximl extensiility of te simulted clot. In ot simultions te cosen vlue prevented te clot from stretcing more tn 0.01 percent. Te introduced metod lso works wit muc smller tolernce vlues ut t te cost of performnce. By integrting te liner-time metod of Jn Bender (2007) s mentioned ove mes of 900 prticles nd 1740 distnce constrints cn e simulted out tree times fster tn rel-time on PC wit 2.4 GHz Intel Core 2 Qud processor. Figure 1. Results of te impulse-sed clot simultion 4. CONCLUSION Te presented metod for clot simultion llows te ccurte ndling of inextensile textiles. Tese textiles re simulted y using mes of prticles linked y distnce constrints wic re stisfied y te computtion of impulses. An impulse is determined y using preview of te corresponding constrint stte. Te constrint dependencies in mes re resolved eiter itertively or in comintion wit liner-time metod to increse te performnce. Te extensiility of te clot cn e controlled y tolernce vlue. One of te min fetures of te new metod is its stility. Since constrint is directly resolved y using preview, even totlly destroyed models cn e repired. Hence in ec step n erly result cn e otined t ny time y interrupting te itertive process witout te loss of stility. Tis cn e used to increse te performnce. Oter fetures re tt te metod is simple to implement nd tt collision nd contct ndling wit friction cn e esily integrted in te presented simultion process. REFERENCES Bender, J. nd Scmitt, A., 2006, Constrint-sed collision nd contct ndling using impulses. Proceedings of te 19t interntionl conference on computer nimtion & socil gents, Genev, Switzerlnd, pp. 3-12. Bender, J., 2007, Impulse-sed dynmic simultion in liner time. In Journl of Computer Animtion nd Virtul Worlds, Vol. 18, No. 4-5, pp 225-233. Coi, K.-J. nd Ko, H.-S, 2002. Stle ut responsive clot. ACM Trns. on Grpics, Vol. 21, No. 3, pp. 604 611. Coi, K.-J. nd Ko, H.-S, 2005. Reserc prolems in cloting simultion. Computer-Aided Design, Vol. 37, No. 6, pp. 585 592. Furmnn, A. et l., 2003. Interctive nimtion of clot including self collision detection. WSCG 03, pp. 141 148. Goldentl, Rony et l., 2007. Efficent Simultion of Inextensile Clot. ACM Trnsctions on Grpics (Proceedings of SIGGRAPH 2007), Vol. 26, No. 3. Hut, M. et l., 2003. Anlysis of numericl metods for te simultion of deformle models. Te Visul Computer, Vol. 19, No. 7-8, pp. 581 600.
House, D.H. nd Breen, D.E., 2000. Clot modeling nd nimtion. A.K. Peters, Ltd., Ntick, MA, USA. Mgnent-Tlmnn, N. nd Volino, P., 2005. From erly drping to ute couture models: 20 yers of reserc. Te Visul Computer, Vol. 21, No. 8-10, pp. 506 519. Scmitt, A. et l., 2005, On te Convergence nd Correctness of Impulse-Bsed Dynmic Simultion. Tecnicl Report 2005-17. University of Krlsrue, Germny.