tutorial t3: cloth animation and rendering

38
EUROGRAPHICS 2002 Tutorial T3: Cloth Animation and Rendering Michael Hauth, WSI/GRIS, University of Tübingen Olaf Etzmuss, WSI/GRIS, University of Tübingen Bernd Eberhardt, HDM Stuttgart, University of Applied Sciences Reinhard Klein, AG “Computer Graphik”, University of Bonn Ralf Sarlette, AG “Computer Graphik”, University of Bonn Mirko Sattler, AG “Computer Graphik”, University of Bonn Katja Daubert, Max-Planck-Institut für Informatik, Saarbrücken Jan Kautz, Max-Planck-Institut für Informatik, Saarbrücken Published by The Eurographics Association ISSN 1017-4565

Upload: others

Post on 18-Mar-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tutorial T3: Cloth Animation and Rendering

EUROGRAPHICS 2002

Tutorial T3: Cloth Animation and Rendering

Michael Hauth, WSI/GRIS, University of TübingenOlaf Etzmuss, WSI/GRIS, University of Tübingen

Bernd Eberhardt, HDM Stuttgart, University of Applied SciencesReinhard Klein, AG “Computer Graphik”, University of BonnRalf Sarlette, AG “Computer Graphik”, University of BonnMirko Sattler, AG “Computer Graphik”, University of Bonn

Katja Daubert, Max-Planck-Institut für Informatik, SaarbrückenJan Kautz, Max-Planck-Institut für Informatik, Saarbrücken

Published byThe Eurographics AssociationISSN 1017-4565

Page 2: Tutorial T3: Cloth Animation and Rendering
Page 3: Tutorial T3: Cloth Animation and Rendering

The European Association for Computer Graphics23rd Annual Conference

EUROGRAPHICS 2002

Saarbrücken, GermanySeptember 2–6, 2002

Organized by

EUROGRAPHICSTHE EUROPEAN ASSOCIATION

FOR COMPUTER GRAPHICS

����

�� �

INFORMATIK

Max-Planck-Institutfür Informatik

Saarbrücken, Germany

SA

RA V I E N

SI

S

UN

I VE R S I T

AS

Universität des SaarlandesGermany

International Programme Committee ChairsGeorge Drettakis (France)

Hans-Peter Seidel (Germany)

Conference Co-Chairs Honorary Conference Co-ChairsFrits Post (The Netherlands) Jose Encarnação (Germany)Dietmar Saupe (Germany) Wolfgang Straßer (Germany)

Tutorial Chairs STAR Report ChairsSabine Coquillart (France) Dieter Fellner (Germany)Heinrich Müller (Germany) Roberto Scopignio (Italy)

Lab Presentation Chairs Industrial Seminar ChairsGünther Greiner (Germany) Thomas Ertl (Germany)Werner Purgathofer (Austria) Bernd Kehrer (Germany)

Günter Enderle Award Committee Chair Conference Game ChairFrançois Sillion (France) Nigel W. John (UK)

John Lansdown Award Chair Conference DirectorHuw Jones (UK) Christoph Storb (Germany)

Short/Poster Presentation Chairs Local OrganizationIsabel Navazo (Spain) Annette Scheel (Germany)Philipp Slusallek (Germany) Hartmut Schirmacher (Germany)

Page 4: Tutorial T3: Cloth Animation and Rendering
Page 5: Tutorial T3: Cloth Animation and Rendering

EUROGRAPHICS2002 Tutorial

Cloth Animation and Rendering

MichaelHauth�, Olaf Etzmuss

�, BerndEberhardt

�, ReinhardKlein

�, Ralf Sarlette

�, Mirko Sattler

�, KatjaDaubert

�, JanKautz

�,�

WSI/GRIS,Universityof Tübingen�HDM Stuttgart,Universityof AppliedSciences�AG "ComputerGraphik",Universityof Bonn�

Max PlanckInstitutefor ComputerSciences,Saarbrücken

AbstractThe area of physically-basedmodelingis situatedin the intersectionof computerscience, mathematics,andphysics.Theanimationof cloth is a particularly interestingapplicationof physically-basedmodeling, becauseit aimsat fastanimationsolutionsfor ratherdifficult physicalproblems.Moreover, it addressesoneof themajordifficultiesin creatingrealisticsceneswith virtual actors.Thechallenge of computeranimationis to breakdownphysicalmodelsfor complex structuresastextiles,approx-imatethemefficiently, andrun fastsimulationswith intelligentnumericalmethods.Furthermore, interactivityandcollisionswith otherobjectsin thesceneare challengesthat havemotivatedmuch creativework over therecentyears.Therange of methodsproposedin literature is quitelarge. Thetechniquesvary fromsimplifiedmethodsdesignedfor real-timeapplicationsto sophisticatedmethodsthatweredesignedto reproducemeasuredmaterialproperties.Renderingcloth is especiallydifficult becauseof its complex material properties.Software renderingcan dealwith thesepropertiesfairly easily, oncethey havebeenacquired,but remainstooslowfor interactiveapplications.Hardware acceleratedrenderingoftenprovidesa way to achieve interactiverenderings,unfortunatelycomplexmaterialsaren’t directly supported.We will demonstrate how interactiverenderingwith complex materialscannonethelessbeachieved

1. PhysicalModels(Olaf Etzmuss)

Cloth modelshave beendesignedwith differentobjectives.A commonobjective in computergraphicsis to generatepretty andconvincing picturesandfilms. For that purposephysicsmay be ignoredor simplified significantly. A dif-ferentobjective is to preserve physical,measuredpropertiesin orderto mapreal materialsontoa simulatedcloth. This,for instance,is indispensablein e-commerceapplications,inwhich a customerselectsclothesbasedon a simulation.Incomputergraphicsthis alsoshouldleadto ananimationthatis fastandallows interactionwith a complex scene.But theuseris preparedto wait abit longerfor theresultsto achievea physicallysoundsimulation.

Accordingto theseconsiderations,we will first startwithamodelhastheformerobjective.After thatwewill describehow discreteandcontinuousmodelsaimto preserverealma-terial properties.

All modelshave in commonthatthey discretizetheclothby a polygonalmesh.The verticesof this mesharecalledparticlesor (mass)nodes.Themeshtopologydefines,howtheparticlesinteractandexert forcesononeanother.

1.1. DiscreteModels

Given the meshdescribingthe cloth, forceson eachparti-clearecomputeddependingon its positionandvelocityandthe positionsand velocitiesof a set of particleswithin itstopologicalneighbourhood.When the function F comput-ing the forceshasbeendetermined,Newton’s equationofmotion governsthe movementof the particles.The trajec-tory of eachparticlewith massmi atpositionxi is computedby

F � x v�� mi d2xi

dt2 � (1)

Here x denotesthe vector containingall particle positionsandv the vector of all particle velocities.Note that, since

c�

TheEurographicsAssociation2002.

Page 6: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

s� u v deformedsurfacer � u v (local,partial)reststateof surfaced � u v displacementxi particlepositionsvi particlevelocityε strain(tensor)σ stress(tensor)C elastictensorD viscoustensor�a b � scalarproductof vectorsa andb

∆ Laplaciansxx � syy � szz

su partialderivative of s with respectto u

Table1: Notationin this section

particlesystemsalreadyrepresenta discretizationin space,only a systemof ordinary differential equationshasto besolved. The systemspresentedin literaturediffer by theirmethodsof computingtheforces.

1.1.1. Mass-springsystems

In mass-springsystems,particle interactionis solely mod-elledby linearsprings.

2 21

1

3

2

3

3

1

1

3

2

Figure 1: Provot’s mass-springsystemwith (1) structuralsprings,(2) shearsprings,and(3) bendingsprings

Provot76 proposesa mass-springsystemfor textiles andusesarectangularmeshin which theparticlesareconnectedby structuralspringsto counteracttension,diagonalspringsfor shearing,andinterleaving springsfor bendingasshownin figure1.

Forcesby linear springsbetweentwo particlesat xi andx j aregivenby

Fei j � x�� ki j ��� xi � x j � � l i j xi � x j� xi � x j � (2)

whereki j is the elasticmodulusof this spring and l i j itsrestlength.The springconstantdependson the type of thespring. For the structuralforces thereare very large con-stants,whereasfor thebendandshearforcesthespringshavesmallvalues.

Obviously, thereis a stronginterdependencebetweenthedifferentkindsof springsleadingto nonlinear, uncontrolledeffects.The diagonalshearsprings,for instance,also leadto additionaltensionandtransversalcontraction.

Furthermore,we needviscousforcesto accountfor en-ergy dissipationdueto internalfriction. Theseforcesdampout kinetic energy anddependon thevelocity of theobject.It is very popularto modelthesefor eachspringby

Fdi j � x�� di j � vi � v j � (3)

Sincethesetermsarelinearthey areparticularlywell suitedfor the numericalintegration.However, thereare two ma-jor disadvantagesof this simple term as it also penalisesa rigid rotation of a spring.Moreover, high dampingof astructuralspring preventsthe object from bending.Hence,this simplifieddampingmakesthedeformableobjectmoveratherstiffly. Theseeffectsarealleviatedbymodellingastiff,dampedspringaccuratelyby

Fdi j � di j

�vi � v j xi � x j �� xi � x j � 2 � xi � x j (4)

Thisis just thelineardampingterm(3) projectedontothedi-rectionof thespring.Unfortunately, in many casesthis termcomplicatestheimplicit time integration.

Finally, in order to run the simulation,we only have tosumupall springforcesandplug theminto equation(1).

In several mass-springsystems76� 22� 53 anotherpopularidea is exploited. It is motivated by a biphasicbehaviourof textile materialsas shown in figure 2 , i.e. initially thematerialyields to an exertedstresseasilybut appearsto beextremelystiff in a secondphase.This effect is imitatedbyrathersmall springconstantsthat model the first phase.Inorder to model the second,almostrigid phase,the systemis post-processedafter each time step if the springs areelongatedtoo much.In this process,iteratively all particlepositionsare modified suchthat a certainmaximumelon-gation is not exceeded.Sucha post-processingis justifiedfor simplemass-springsystemsthat do not model specificmaterial propertiesanyway. Moreover, the result dependson theorderin which thespringelongationsarecorrected.

Although Provot’s mass-springsystemdoesnot model

c�

TheEurographicsAssociation2002.

Page 7: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

Force

Elongation

Figure2: Biphasicspringmodelledbypost-correction

any specificmaterialandis not relatedto propertiesof realclothes,it is capableof producingvisuallyverypleasingani-mationsthataresufficient in many computergraphicsappli-cations.

1.1.2. Representationsof Cloth asdiscreteMechanism

In their book on cloth modellingDonaldHouseandDavidBreenstatethat “Cloth is a mechanism,not a continuousmaterial”. Consequently, someattemptshave beenmadetomodelclothesby the interactionof discretethreadsthatareinterwovenin textiles.

Somediscretesystemsthathave beendevelopedin com-puteranimationfor the animationof clothesandothersur-faceshave theadvantagethatthey allow fastsimulations.Inparticular, particlesystemshave beensuccessfullyusedforrapid animations.We can considerthe quadrilateralmeshthat is describedby the massnodesand structuralspringsin Provot’s mass-springsystemasa network of interwoventhreads,in whichonethreadis givenby achainof structuralsprings.Different threadscan interactat the masspoints,whereshear, bend,or otherinternalforcesapply. In ordertomodelthe interactionof threads,morecomplex forcesthanpurespring-forcesareaddedto thesystemandyield a moregeneralparticlesystem.

Most particlesystemsusepotentialfunctionsfor tension,bend,and shearenergy. Theseenergies arechosento cor-respondto standardexperiments(Kawabata57) to measuretextile properties. Hence, the measurementsfrom oneexperimentareusedto modelonespecificenergy function.All energiesaremodelledon a rectangulargrid, whereeachparticle interactswith its four direct neighbours.The gridis alignedwith two distinct directionsthat are apparentintextiles (in woven materialsthey arecalledweft andwarpdirection).The materialsshow differentpropertiesin thesedirectionsand eachexperimenthas to be carried out forbothdirections.

The tensionenergy is evaluatedfor eachparticleandde-pendsonthefour neighboursof thatparticlein arectangular

mesh.Thetensionenergy of aparticleat positionx0 is

Et � 4

∑i � 1

�� � 12Ct1 � i � � x0 ! xi � ! li ! ht1 � i " 3 if � x0 ! xi �$# li

12Ct2 � i � � x0 ! xi � ! li ! ht2 � i " 5 if � x0 ! xi �$% li &

(5)wherel i arethe restlengthsbetweenparticlesandCt ' i and

ht ' i arematerialparameters.They canbeusedto fit measureddataby a piecewise linear curve. The energy is computedfrom astrain �(� x0 � xi � � l i , andthestrain-stressrelationismodelledpiecewisecubicor quintic.If we introducealinearstrain-stressrelationshipby replacingthe exponentswith 2andsetht ' i : � 0, we getlinearspringenergies.

Theshearenergy is modelledas

Es � 4

∑i ) 1

1

2Cs � φi � π

2� hs' i 2 (6)

andthebendenergy as

Eb � 2

∑i ) 1

1

2Cb � ψi � π � hb ' i 2 � (7)

HereCs Cb and hs' i hb ' i are the materialconstants.Theseenergiesimplementhingesfunctioninglike springsthat lin-earlydependon theshearangleφ andthebendangleψ, re-spectively. Thesearetheanglesformedby theincidentedgesasdepictedin figure3.

Figure3: Shearandbendenergy in a particlesystem

All derived energies are combinedto computethe finalforcesto bepluggedinto equation(1):

F � � grad� Et � Es � Eb � Eexternal �In this section,only elasticforceshave beendiscussed.Vis-cous forces should be modelledin the fashionof section1.2.6. Note that the well-known cloth simulationby Baraff

c�

TheEurographicsAssociation2002.

Page 8: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

andWitkin2 alsorepresentsis a particlesystem.However, itwasdesignedfor trianglemeshesandwithout theobjectiveof fitting to realmaterialdata.

1.1.3. Triangular meshes

Until now, we only have consideredparticlesystemsbasedon rectangularmeshes.Triangularmass-springsystemsarewidely usedaswell andcanbeconstructedwith almostthesameset of forces.However, their physicalpropertiesarehardto controlanddependonthetopologyof themesh.Fur-thermore,they usuallyshow a very strongtransversalcon-traction.This motivatedVolino85 to extend the conceptoftriangularmass-springsystems.In a triangularmeshthede-formationof eachfaceis uniquelydeterminedby the elon-gationof its edges.Forcesactingoneachof its particlescanbe formulateddependingonly on these(vectorial) elonga-tions. This resultsin a particlesystemin which the forcesononeparticledonotonly dependonadjacentedgesbut ontheelongationsof all edgesof all facesincidentto thecon-sideredparticle.The coefficientsof thesedependenciesarethematerialconstantsandallow a flexible modellingof thephysicalproperties.

1.2. Continuous Models

Althoughclothesarenot homogeneous,continuousobjects,modelling themasdiscretemechanisminvolvescomplica-tions.As we cannotrepresenteachsinglethreadin a textileby anedgein themesh,we have to choosea certainresolu-tion of theobject.If we wantto beindependentof this reso-lution,weneedto representapatchof textile asacontinuousmaterial,whichallowsusto uselow resolutionmodelswith-out loosingbasicmaterialproperties.

From a continuummodela consistentdiscretizationcanbe derived. Consistency heremeansthat the computedso-lution convergesto theaccuratesolutionfor the continuumwhen the resolutionis increased.That allows us to switchfrom oneresolutionto anotherwithout changingtheproper-tiesof thecloth.Thereforewe will describethefoundationsof the continuoustheoryandpresenta particlesystemthatcanapproximatethis theory. This sectionwill beconcludedby a paragraphaboutenergy dissipationin cloth.

1.2.1. Descriptionsof Strain

Continuummechanicsis thestandardtheoryto describeandmodel deformableobjects,and the following elaborationsarebasedonseveraltext books7 � 9� 63� 81.

The basicquantitiesof continuummechanicsarestrain,which is adimensionlessdeformationnotedby ε, andstress,which is a forceper lengthfor surfacesor perareafor vol-umesandis denotedby σ. In thecaseof a one-dimensionalspring,theseentitiesarescalars.Thestrainof this springisits elongationperlength,while thestressis thespringforce.In thecaseof surfacesor volumes,theseentitiesaretensors.

Surfacesare more complicatedthan a one-dimensionalspring,andthe descriptionof strainis moreinvolved.Tex-tiles can be describedas regular surfaces(in the senseofdifferentialgeometry23). The deformationof a regular sur-faceembeddedin R3 is describedby a strain tensorwithrespectto a certainundeformedreferencestate.In thisequi-librium state,denotedby r , the object is not deformed,and the elasticenergy is zero.Let r be parametrisedovera domainU * V. Under forcesthe rest statedeformsto astates� u v . The displacementis a mappingd definedbyd � u v+� s� u v � r � u v asdepictedin figure4.

The differenceof the first fundamentalforms Is and Irof the currentstateand the equilibrium stateof the objectdescribesthe in-planestrainanddefinesa nonlinearstraintensor59

G � 12 � Is � Ir �� (8)

12 , �

su su � �su sv ��

su sv � �sv sv �.- � 1

2 , �ru ru � �

ru rv ��ru rv � �

rv rv �.- �For planarsurfaces,thedeformationis defineduniquelybythe differenceof the metricsof thesestates.As a pieceofcloth is a surfacein three-dimensionalspace,the curvaturetensors(secondfundamentalforms) have to be taken intoaccountas well. Terzopoulosand Fleischer82 developedamodel for animatedsurfacesbasedon the the energy dueto thesetensors.

Commonly, the reststater is assumedto be the identitymapping.Thenequ.G coincideswith Green’s straintensor

G � 12 , �

su su � � 1�su sv ��

su sv � �sv sv � � 1 - �

UxV

r s

d

Figure 4: The reference configuration: the rest state isparametrisedby a mappingr on a spaceU * V. By defor-mationd it transformsinto thedeformed(strained)configu-ration,which is parametrisedby themappings.

Green’s tensor, unfortunately, is nonlinear and yieldsfourth ordertermsin the energy formulation,andthesearecomputationallyvery costly and lead to variousnumericalproblems.Linearelasticitytheorywould allow muchfasteranimations.It makes use of the linear approximationof

c�

TheEurographicsAssociation2002.

Page 9: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

Green’s tensor, calledCauchy’s straintensor. It is obtainedby neglectingtermsof orderhigherthanonein thedisplace-ment d in the componentsof Green’s tensor, herefor twodimensions:�

su su � � 1 � �e1 � du e1 � du � � 1� 2�du e1 � � O � d2 �

sv sv � � 1 � �e2 � dv e2 � dv � � 1� 2�dv e2 � � O � d2 �

su sv �/� �e1 � du e2 � dv �� �du e2 � � �

dv e1 � � O � d2 0(9)

where � e1 e2 is theCartesianbasisof R2. Thus,Cauchy’stensorcanbewrittenas

ε � , d1u

12 � d1

v � d2u

12 � d1

v � d2u d2

v - wherethe superscriptsdenotethe vectorcomponents.Lin-ear elasticity is basedon this linearisedstrain tensorandyieldsmuchsimplerformulations.In particular, it resultsinlinear partial differential equations.Theselinear equationsarewidely usedin engineeringandlendthemselvesto finiteelementformulationsveryeasily.

The straintensorof linear elasticity, aswe have seen,isderived from Green’s strain tensorby linearisationsin thedeformations,i.e. the displacementd (figure 4) is assumedto besmall,andall termsof ordertwo or higherin d arene-glectedin thestraintensor. For this reasonthelineartheoryis not appropriatefor highly flexible objectslike clothes.Itonly appliesto small displacements.It is thereforenot in-variantunderrotationsandleadsto unphysicalbehaviour ifthe object or a part of it is rotated.As animatedsurfacescanbendstrongly, thedisplacementsbecomevery large,al-thoughthedeformationsremainsmall.

In this sectionwe have learntthata linearisationwith re-spectto a global referenceframeis not applicableto clothanimation.However, we will seelater that a linearisationwith respectto a local referenceframeis feasible.

1.2.2. The equationof motion

Sofar, we only have dealtwith thedescriptionof strain.Inlinearelasticity, alsotherelationbetweenthestresstensorσandstrainε is assumedto be linear, andthe dependenceisgivenby theelastictensorC. This is formulatedby Hooke’slaw:

σi j � Ci jkl εkl (10)

C is asymmetricrank-4tensorcontainingthematerialprop-erties.Here,symmetrymeansCi jkl � Ckl i j aswell asCi jkl �Cj ikl . Hooke’s law is usedto computethestresstensorin theequationof motionof a continuouselasticmaterial:

ρ ∂2s∂t2 � div σ � f (11)

whereρ is themassdensityandthedivergenceof thestressσ yields the force densitydueto the interior energy of theelasticobject. f denotesan external force density(e.g. thegravity forcedensityρg). Equation(11) is apartialdifferen-tial equation(PDE)thathasto besolvedover theparameterdomainandtime.A standardprocedureis to semidiscretizethesystemin spacewith finite differencesor finite elements.Thiseliminatesall spatialderivativesin theequationandre-ducesthePDEto anordinarydifferentialequation(ODE) intime t thatcanbesolvedby any suitableintegrationmethod.Thisway, we reducethePDE(11) to theODE(1).

As wewill seein chapter2, thehigherordertermsthatareinducedby Green’s tensorleadto complicationfor rapidan-imationswith largetimesteps.A linearisationof thesetermscouldalleviatetheseproblems.

1.2.3. Bend forces

Bendforcescannotbederivedfrom thestandardstrainten-sorbecausethey areout-of-planeforcesandariseonly dueto a volumetricpropertyof theobject(anidealsurfacedoesnot exhibit bendingforces).Hence,therearebasicallytwopossibilitiesof deriving bendingforces.First,wecansimplyaddsomebendingforcesto thein-planeforces.Second,theclothcanbemodelledasa thin volumetricobject.

In orderto addbendingforces,we addan energy that isalsoderived from a volumetricmodel.Typically we choosethethin plateenergy, whichwe projectontothesurfacenor-maln:

f � 12

�n ∂ 1 B1s2

uu � B2s2vvdudv� (12)� �

n B1suuuu � � B1 � B2 suuvv � B2svvvv� �B1 andB2 aretheelasticmaterialconstants,calledbendingmoduli, for the respective directions.With this model, thein-planeandbendstrainaredecoupledandprovidea simplemodelfor computation.

A more comprehensive descriptionis obtainedby mod-elling clothasthin volumetricobjects.Shelltheoryprovidesthe appropriatemechanism.Shells are thin objectswhichspanover surfaces.The shell is parameterisedby a mid-surfaces:

x � u v w+� s� u v � wd � u v(i.e. the objectposition is describedby the mid-surfacepa-rametersu v and the height over the mid-surfacew in thedirectionof a directord thathasunit length.From this descriptiona three-dimensionalstrainandstresstensor is derived. Shells comprise (in-plane) membraneforcesaswell asbendingforces.Someauthors26� 50 modelclothesaccuratelyby a nonlinearshell theory. In order tosolvetheresultingnonlinearPDE’s,thesystemis discretizedby finite elements,andNewton’smethodis usedto compute

c�

TheEurographicsAssociation2002.

Page 10: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

an equilibrium solution. In this processseveral numericalproblemslike forking pointsoccur.

Theseapplicationsof shell theoryhave not beentargetedat animation,but they serve well asa referencesolutionthatanimationsystemscanbecomparedwith.

1.2.4. Description of Clothesin a Linear Theory

A characteristicpropertyof textiles is orthotropy. Linear, or-thotropicmaterialspossesstwo orthogonalsymmetryaxesincontinuummechanics.This reducesthenumberof freeelas-tic materialconstants(entriesin the elastictensor)to fourfor in-planedeformations.Thesymmetryaxesor directionsin a woven materialare the weft andwarp directions.Thetextiles show very differentphysicalbehaviour in thesedi-rections,andthischaracterisesthematerials.Therefore,ma-terial measurementsare carriedout for the two directionsindependently. The transversecontractionis often omittedbecauseit is not apparentin usualscenesin which clothesareworn by a virtual avatar. This allows us to setthePois-son numberto zero, i.e. Cii j j � 0 i 2� j . Only two Youngmoduli k1 : � C1111 andk2 : � C2222 andtheshearmodulusµ : � C1212 remainaselasticconstantsto modelthein-planestress.Additionally, thebendingmoduli B1 andB2 describethecurvatureelasticityin theweft andwarpdirections.

Unfortunately, thestrain/stressrelationin textile materialsis highly nonlinear, andapproximationsto thesenonlinearpropertieshave beenan issuein computeranimation.Gen-erally, the nonlinearstress-strainrelation is modelledby apiecewiselinearfunction.Thiscanbeachievedeasilyby up-datingthetheelastictensoraccordingto thecurrentslopeofthe strain/stresscurve24. The updatingis carriedout beforeeachtimestep.

1.2.5. Continuous Theory and Particle Systems

As wehaveseen,is is notpossibleto modelclothobjectslin-earlybecauseCauchy’sstresstensorcannothandlelargedis-placements.Green’s straintensor, however, impedesa rapidnumericalsolutionandmakesimplicit time integrationverydifficult (seechapter2).

In thissection,wewill locally linearisethediagonalcom-ponentsof the strain tensorto alleviate the solutionof theODE. Fromthis modelwe canderive a particlesystemthatmodelscontinuousobjectsby a finite differencediscretisa-tion. Thiselasticmodelwill besummarisedherebriefly. Fordetailswe referto thefull article27.

Thekey is anapproximationof thestresstensor. Giventhedeformedsurfaces� u v , we approximatethe stresstensorby

σ � , k1 �(� su � � 1 12µ 3 su sv 4

12µ 3 su sv 4 k2 ��� sv � � 1 - (13)

wherek1, k2, andµ aretheelasticmaterialconstants.

Thistensoris pluggedinto theequationof motionfor con-tinuousobjects(11). In particular, in the strain tensorthedominatingdiagonalcomponentshave beenlinearisedwithrespectto a local restframe.Thus,thenumericalsolutionisalleviated.

Fromthediagonalcomponentsof thestresstensorwede-rive the following expressionfor the stressby finite differ-encediscretization:

σii � k1 ' 2l2

�(� xi � x j � � l 0wherel is the restdistancebetweenthe particlesat xi andx j . Thesheartermσ12 � µ

2 3 su sv 4 asgiven in equation(13) is also approximatedby finite differences.It is com-putedfrom thefour directneighboursof thecentralparticlein themeshasfollows:

σ12 � µ8l2

3 xupper� xlower, xright � xleft 4�The shearstrain is measuredby the scalarproductof theanglesformedby all edgesincidentto aparticleverysimilarto theparticlesystemalreadypresentedin section1.1.2.

Linearspringforcesresultfrom approximatingthediver-genceof thediagonalentriesin thestresstensor

fi ' j � k1 ' 2l2 5 � xi � x j � l

xi � x j� xi � x j �76 (14)

Notethatthe fi ' j areactuallyforcedensitiesaswehavecon-tinuousobjects.Analogouslyto thediagonalcomponentsofthe stresstensor, the correspondingforce terms are com-putedas ∂σ12

∂v18su

8 su and ∂σ21∂u

18sv8 sv (for a derivationsee27).

Additionally to the stretchand shearforces,which arederived from the stresstensor(13), we adda thin plateen-ergy accordingto equation(12). Theresultingforcescanbediscretizedagainby finite differences,i.e. the fourth orderderivativesarecomputedby fourth orderdifferenceopera-tors.The surfacenormaln at a particleis computedastheusualvertex normal.

For rectangularmeshesit canbe verified that this parti-clesystemapproximatestheaccuratecontinuummodelwithlinearprecision,i.e.wehaveconvergenceto theaccurateso-lution whenthe resolutionis increased.For generalquadri-lateralmeshes,thesolutionstill converges,but doesnotpos-sesstheapproximationproperty.

1.2.6. Viscosity

Figure5 shows a typical strain/stresscurve thatcanbemea-suredwhen a textile patch is stretchedand relaxed. Hys-teresiseffects as in this figure are due to energy dissipa-tion. Whenthe materialdeformsunderexternal forces,thestrain/stressrelationis describedby theupperbranchof the

c�

TheEurographicsAssociation2002.

Page 11: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

hysteresis.Whenit is releasedandcontractsagain,this re-lationshipis describedby thelower branchandtheareabe-tweenbothbranchesis proportionalto thedissipatedenergy.

Elongation

Force

loss ofenergy

Figure5: Hysteresis

Thereareseveralcausesfor energydissipationwhenmod-elling deformableobjects.We will focusexclusively on in-trinsic effects,i.e. thosethat do not dependdirectly on ex-ternal forceslike friction dueto fluid flow (wind). Internalfriction dependson the relative motion of partsof the de-formableobject, that is, on the strain rate.The strain ratetensoris definedas

νi j � dεi j

dt � (15)

Theforcesgeneratedby internalfriction areoftencalledvis-cousin analogyto Newtonianfluids.A viscousstresscanbecomputedanalogouslyto equation(10):

σvi j � Di jkl νkl (16)

wherethe“viscosity tensor”D hasthesamestructureastheelastictensorC. The viscousstressis addedto the purelyelasticstress.In most implementationsthe viscosity tensorD is chosenconstantand proportional to the elastic ten-sorC. This producesa materialcalleda Kelvin-Voigt solid,the simplestviscoelasticsolid. Note that the springdamp-ing forcesasstatein equation(4) canbe derived from thismodel.

In orderto fit thetypical behaviour of cloth,a morecom-plex andvisco-elasticmodelhasto bechosen.For instanceaconstantQ modelallows to reproduceameasuredhysteresiscurve quiteelegantly36.

2. Numerical Simulation(MichaelHauth)

2.1. Methods for Numerical Integration

As wehaveseenin theprevioussectionmechanicalsystemsareoftengivenasa secondorderordinarydifferentialequa-tion accompaniedby initial values

x9 9:� t �� fv ; t x � t 0 x9 � t :<=x � t0 �� x0 x9 � t0 �� v0 � (17)

Thedifferentialequationcanbetransformedinto afirst ordersystemby introducingvelocitiesasa separatevariable:

5 x � t v � t 6 9 � 5 v � t

fv ; t x � t 0 v � t < 6 5 x � t0 v � t0 6 � 5 x0

v0 6 �(18)

For thenext few sectionsit will beconvenientto write thisODE in themoreabstractform

y9 � t �� f ; t y � t < y � t0 �� y0 (19)

beforewewill comebackto thespecialsetting(18) for even-tually gainingcomputationaladvantages.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

1

2

3

4

5

6

7

8

t

y

Figure 6: Solutionsof example1 for λ � 2 (dashed)andλ � � 15 (solid)

Throughoutthe following discussionwe will usethe fol-lowing examples:

1. y9 � λy, y � 0+� 1 with λ � 2 � 15for t >@? 0 1A (figure6).2. The overdampedwave equationy9 9 � λ B 2y � λy9 with

λ � 5 for t >C? 0 � 10A and starting values y � 0@�0 y9 � 0D� 1. It has the analytical solution y � t D�1B 15 E 15e1F 2 �:G 5H�I 15 t � 1B 15 E 15eG 1F 2 � 5H�I 15 t

3. This example is basedon a simple mechanicalsystem(figure7(a)): A particle p with massm connectedto theorigin usinga springwith stiffnessk, dampingd andrestlength l0, is pulled down by gravity. This settingis de-scribedby theODE

d2zdt2 � k � l0 � z

m � dm

dzdt

� gz � (20)

We set the parametersm � 0 � 1 k � 100 l0 � � 1 d �1 g � � 10v0 ' z � � 5 andsimulatethe interval t >J? 0 2A(figure7(b)).

2.1.1. Explicit methods

Theoldestandmostsimplemethodof integrationis thesocalledforwardor explicit Eulermethod.Time is discretisedinto slicesof length h. To get a formula for advancing a

c�

TheEurographicsAssociation2002.

Page 12: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

KLKLKLKLKLKLKKLKLKLKLKLKLKKLKLKLKLKLKLKMLMLMLMLMLMLMMLMLMLMLMLMLMMLMLMLMLMLMLM

x

z

y

k N d N l0m

(a)Themechanicalsystemof example3.

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−5

−4

−3

−2

−1

0

1

2

3

4

t

z/v

(b) Exact solution of example 3: z (solid), zO(dashed)andanimplicit Eulersolution(seebe-low) for largetimesteps.

Figure7: Example3.

timestep,h thedifferentialquotienton the left handsideof(19) is replacedby theforwarddifferencequotient

y � t � h � y � t h P y9:� t �� f � t y � t ( � (21)

Thuswe get the integrationformula for advancinga singletimestep

y � t � h�� y � t � hf � t y � t ( � (22)

Iteratingthismethodgivesasequenceof numericalapproxi-mationsYn P y � tn +� : y � t0 � nh . Geometricallythismethodcanbe interpretedasstraightlyfollowing the tangentof thesolutionandthenrecalculatingtheslopefor thenext step.

There are several criteria for evaluating an integrationmethod:Q

convergenceQaccuracy

QstabilityQefficiency

Convergencemeansthat for h R 0 the numericalsolutionsYn meetthe analytical.All usefulmethodsmustbe conver-gent,sowewon’t discussnon-convergentmethodsorcriteriafor convergence.Moreinterestingis theaccuracy or orderofamethod.By thiswemeanhow fastamethodconvergesforh R 0, or with otherwordshow accuratethesolutionis foragivenh. By usinga taylorexpansionfor theexactsolutionaftera singletimestep

y � t � h�� y � t � hy9 � t � h2 B 2y9 9 � t � O � h3 (23)

wefind thatfor thenumericalapproximationY1 producedbyanexplicit Eulerstep

y � t1 � Y1 � O � h2 � (24)

If we continuethe methodusingthe numericalsolutionY1asastartingvaluefor thenext timestepwe lose38 apower ofh for theglobalerror

y � tn � Yn � O � h � (25)

Thismeansthattheexplicit Eulermethodconvergeslinearlyor hasorder1.Wewill analysestabilityandefficiency of themethodlater.

As a next stepwe will introducemethodsof higherorder.For thisacentereddifferenceestimationfor y9 � t � hB 2 (19)is used

y � t � h � y � t h P y9 � t � hB 2S� f � t y � t � hB 2( � (26)

andthusasaniterationscheme

YnH 1 � Yn � f � t y � tn � hB 2( � (27)

But how do we find y � tn � hB 2 ? For an estimationwe useanexplicit Eulerstepto get

k1 � Yn � h2 f � t Yn (28)

YnH 1 � Yn � hk1 (29)

the so calledexplicit midpoint rule. The estimationby for-ward Euler, althoughnot very accurateis goodenough,asthe function evaluationis multiplied by the timestepto ad-vanceto the next approximation.So by a taylor expansionwefind a localerrorof O � h3 leadingto a globalerrorof

Yn � y � tn �� O � h2 (30)

for theexplicit midpointrule.

Generalizingthe idea of using function evaluationsat sintermediatepointst � c jh leadsto theRunge-Kuttamethodsdefinedby aRunge-Kuttamatrix � ai j , weightsbi , abscissae

c�

TheEurographicsAssociation2002.

Page 13: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

c j andtheequations

ki � Yn � hs

∑j ) 1

ai jk9 jwith k9i � f � tn � cih ki for i � 1 ����� s

YnH 1 � Yn � hs

∑i ) 1

bik9i (31)

Thecoefficientsetcancomfortablybespecifiedlike in table2. If thematrix � ai j is strictly upper, all innerstageski only

c1 a11 a12 � � a1sc2 a12 a22 � � a2s...

.... . .

...cs as1 as2 � � ass

b1 b2 � � bs

Table2: General Runge–Kutta method

dependon k j with j 3 i andthuscanbecomputedoneaftertheother.

Themostfamousoneis themethodby RungeandKuttagiven in (3) togetherwith the explicit midpoint rule inter-pretedasaRunge-Kuttamethod.Themethodby RungeandKuttapossessesorder4.

0 0 012

12 0

0 1

01B 2 1B 21B 2 0 1B 21 0 0 1

1B 6 2B 6 2B 6 1B 6

Table3: Explicit midpointand"the" Runge-Kutta method

By usingalgebraicrelationsfor thecoefficients,it is pos-sibleto constructexplicit Runge-Kuttamethodsof arbitraryhigh order resultingin many inner stageswith many func-tion evaluations.But for mostpracticalapplicationsorder4is sufficient.

Having constructedall thesemethodwenow will try themonour examples.

Thediagramsin figure8 wereproducedby solvingtheex-amplesusingdifferenttimestepsandmeasuringthenumberof floatingpoint operationsneededfor achieving thespeci-fiedaccuracy whencomparedwith the(analytical)referencesolution.In thework-precisiondiagramthey-axisshows theerror � Ytend � y � tendT� asa functionof therequirednumberof floating point operations.The first examplewith λ � 2(figure 8(a)) shows exactly the expectedbehaviour: whenreducingthe time stepand thus investingmore work, the

numericalsolutionsconvergeagainstthereferencesolution.Moreover theslopeof the curvesin thedoublelogarithmicplot exactly matchthe order of the method.But in all theotherexamples(figure8(b)-8(d)) this behaviour only showsup after an initial phase,where the solver producescom-pletelywrongresults.This is thepointwherestabilitycomesin. We will now analysethis by usingthesimplestexamplewhereit occurs,i.e. example1 with λ 3 0.

2.1.2. Stability

Theequationfor example1 is calledDahlquist’s testequa-tion

y97� λy λ > C � (32)

Its exactsolutionto aninitial valuey � 0S� y0 is givenby

y � t �� eλty0 � (33)

This equationis a tool for understandingandevaluatingthestability of integration methods.We have seen,that in thedampedcasecharacterisedby Reλ 3 0 convergenceis onlyachievedby very small timesteps.In this case,sincetheex-ponentis negative, the analytical solution is boundedfort RVU . Thereforea meaningfulnumericalmethodis re-quiredto deliver a boundedsolution.An integrationschemethatyieldsa boundedsolutionis calledstable.

If we apply theexplicit Euler’s methodwith a fixedstepsizeh to (32) then-thpoint of eachsolutionis givenby:

Yn �W� 1 � hλ ny0 (34)

For the explicit Euler schemethe numericalsolutiongivenby (34) is boundedif andonly if X 1 � hλ XY3 1, i.e. for hλ intheunit ball around-1. A similaranalysiscanbecarriedoutfor the othermethodsandalsoresultsin restrictionsof theadmissiblestepsize.

Thisanalysisexplainsthesharpbendin figures8(b)-8(d).Only when the step size drops below a certain limit dic-tatedby λ (by h 3 λ G 1 in caseof theforwardEulermethod)thenumericalsolutionscanconverge. If thedampingis in-creased,i.e. Reλ R � U , thenfor theexplicit Eulerneces-sarilyh R 0 for thesolutionto bestable.Thismeansthestepsizeis artificially limited andit cannotbe increasedbeyondthestability limit in orderto savework sacrificingsome- butnotall - accuracy.

2.1.3. The implicit Euler method

To constructamethodthatbettersuitsourneedswegobackto (19) andsubstitutethedifferentialquotientby abackwarddifferencequotientfor y � t � h

y � t � h � y � t h P y9:� t � h�� f � t � h y � t � h( � (35)

This time this resultsin theintegrationformula

YnH 1 � Yn � hf � t � h YnH 1 0 (36)

c�

TheEurographicsAssociation2002.

Page 14: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

101

102

103

104

105

10−12

10−10

10−8

10−6

10−4

10−2

100

102

work (flops)

prec

isio

nexplicit Euler explicit MidpointRK4

(a) Example1a:yO � 2y

101

102

103

104

105

10−15

10−10

10−5

100

105

work (flops)

prec

isio

n

explicit Euler explicit MidpointRK4

(b) Example1b:yO � ! 15y

101

102

103

104

105

106

10−20

10−15

10−10

10−5

100

105

1010

work (flops)

prec

isio

n

explicit Euler explicit MidpointRK4

(c) Example2: yO O � ! 5yO ! 5y

102

103

104

105

106

107

10−15

10−10

10−5

100

105

1010

1015

1020

work (flops)

prec

isio

n

explicit Euler explicit MidpointRK4

(d) Example3

Figure8: Work precisiondiagramsfor theexplicit Euler, explicit midpointandRK4methods.

thesocalledbackward or implicit Eulermethod.As its ex-plicit variantthismethodcanbeshown to haveorder1. Nowthenumericalsolutiononly is givenimplicitly asthesolutionof thepossiblynonlinearequation

YnH 1 � hf � t � h YnH 1 � Yn � 0 � (37)

If weapplythismethodto theDahlquistequationwegettherecurrenceformula

Yn �Z� 1 � hλ G ny0 � (38)

The numerical solution Yn remains bounded for X[� 1 �hλ G 1 X+3 1. If we assumeλ 3 0, this holds for arbitraryh 4 0. Thusthereis no restrictiononstepsize,themethodisunconditionallystable. Figure10 shows thework-precision

diagramsfor the implicit Euler methodandour examples.We observe that we never loosestability andwe especiallydonomissthesolutionby severalordersof magnitudecom-paredto theexplicit methods,althoughwe loosesomeaccu-racy whenthetimestepsbecomelarge.

As apracticaltool for graphicallyvisualizingthestabilitypropertiesof a methodwe definethe stability region \ tobe the setof parameters,for which the integrationmethodyieldsa boundedsolution:\ : �^] z : � hλ > C : thenumericalintegration

of equation(32) withstepsizeh and

parameterλ is stable_ � (39)

c�

TheEurographicsAssociation2002.

Page 15: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

−2 −1 0 1 2

−2

−1

0

1

2

explicitEuler

implicitEuler

(a)Eulermethods

−2 −1 0 1 2

−2

−1

0

1

2

explicitmidpoint

implicitmidpoint

(b) midpointrules

−4 −2 0 2 4−4

−2

0

2

4

(c) BDF(2)

`�acb(d0e fhgjik�lcm(n0o phqhrJs�tcu�v0w xy�zc{(|0} ~��� ����(����(������0�0���c������� �� �� � � �� ��  ¡ ¢

(d) RK methods

Figure9: Stabilityregions(shaded)of themethods.

Methodsthat containthe completeleft half-planein \ arecalled A-stable or unconditionally stable. They are wellsuited for the stable integration of stiff equations.Obvi-ously, theimplicit Eulerschemeis A–stable,whereasits ex-plicit counterpartis not.Thestabilityregionsof all presentedmethodsareshown in figure9.

After reviewing theprocessthatledusto thedefinitionofthestability region, we canoutlinea moregeneralideathatwill allow us to determineeasilythestability of morecom-plex methods.The idea for analysingboth Euler methodsappliedto (32) was to find a closedexpressiondescribingthestability function £ . This functionmapstheinitial valuey0 to thevalueY1, performinga singlestepof themethod£ : y0 ¤R Y1 � (40)

ThusYn � R� hλ ny0. For theexplicit Eulermethodwefoundin (34) £¥� z�� 1 � z (41)

for theimplicit versionin (38)£¥� z�� 11 � z � (42)

Thedefinitionfor thestability region now reads\.�^] z > C : X £¥� zTX=3 1_ � (43)

2.1.4. Methods of higher order

To find a higherordermethod,we go backto equation(27)anddo not replacethey � t � hB 2 but take theformulaasanimplicit definition of y � t � h . We get the implicit midpointrule

Y1 � Y0 � hf ¦ Y1 � Y0

2 § � (44)

Furtheron we usea simplified notationfor advancingonestep,writing Y0 andY1 insteadof Yn andYnH 1.

Alternatively themidpointrule canbederivedasa collo-cationmethod39 with s � 1 internalnodes,i.e. by construct-ing a polynomial interpolatingthe particle trajectoriesat agiven, fixed setof s nodes39. This ideaallows for the con-structionof implicit Runge-Kuttamethodswith arbitraryor-der. In contrastto explicit methodsthematrix � ai j ceasestobestrictly lower triangular. Thesemethodsarecomputation-ally moreexpensive,sowejuststickto themidpointrule.Itsstability functionis givenby£¨� 1 � zB 2

1 � zB 2 � (45)

As £ª© 1 for any Rez 3 0 the implicit midpoint rule is A-stable.

As anotherpossiblechoicewe now introducemultistepmethods. They are computationally inexpensive becausethey have no inner stagesand someof them are A-stable.A multistepmethodwith k stepsis of thegeneralform

k

∑j ) 0

α jYk G j H 1 � hk

∑j ) 0

β j fk G j H 1 (46)

with fnH j : � f � tnH j YnH j . Here we also have ‘historypoints’ with negative indices.Thecoefficient αk is requiredto be nonzero;for variabletime stepsizesthe coefficientsdependonthelaststepsizes,whichwehaveomittedhereforthe easeof demonstration.Importantspecialcasesare theclassof Adamsmethodswhereα0 � � � � αk G 2 � 0:

Y1 � Y0 � hk

∑j ) 0

β j fk G j H 1 (47)

and the classof BDF–methods(backward differentiationformulas)with β0 � � � � βk G 1 � 0:

k

∑j ) 0

α jYk G j H 1 � hβk f1 � (48)

If theformulainvolvestheright-handside f1 at thenew ap-

c�

TheEurographicsAssociation2002.

Page 16: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

101

102

103

104

10−5

10−4

10−3

10−2

10−1

100

101

work (flops)

prec

isio

nexplicit Euler implicit Euler implicit MidpointBDF(2)

(a) Example1a:yO � 2y

101

102

103

104

10−10

10−8

10−6

10−4

10−2

100

102

work (flops)

prec

isio

n

explicit Euler implicit Euler implicit MidpointBDF(2)

(b) Example1b:yO � ! 15y

101

102

103

104

105

106

10−15

10−10

10−5

100

105

1010

work (flops)

prec

isio

n

explicit Euler implicit Euler implicit MidpointBDF(2) Verlet

(c) Example2: yO O � ! 5yO ! 5y

102

103

104

105

106

10−10

10−5

100

105

1010

1015

1020

work (flops)

prec

isio

n

explicit Euler implicit Euler implicit MidpointBDF(2) Verlet

(d) Example3

Figure10: Work precisiondiagramsfor theimplicit Euler, implicit midpoint,BDF(2)andVerlet (whenever possible)methods.Theresultsfor Euler are for comparisonandthesameasin figure 8.

proximationpointY1 themethodis saidto beimplicit. BDF-methodsarealwaysimplicit. The coefficientscanagainbeconstructedby a collocationapproach.BDF-methodsexistup to order 6, higher order methodslooseconsistency forany choiceof coefficients39.Thestabilityregionsof implicit andexplicit Adamsmethodsareboundedandlocatedaroundtheorigin, thusthey arenotinterestingfor largetimesteps.BDF-methodswerethefirst to bedevelopedto dealwith stiffequationsandpossessanunboundedstability region cover-ing a sectorwithin thenegative complex half-plane.There-fore they areamongthe mostwidely usedmethodstoday.For k � 1 points,thesemethodspossessorderk � 1 andonly

onenonlinearsystemhasto be solved, whereass coupledsystemshave to be solved for an s-stageimplicit Runge-Kuttamethod.

The BDF-methodfor k � 1 is just the implicit Eulermethod,for k=2 themethodis givenas

Y1 � 43

Y0 � 13

YG 1 � 23

hf � t � h Y1 (49)

The coefficients for higher order methodsare given in ta-ble 4. Thestability region of BDF(2) andtheotherimplicitmethodsareshown in figure9.

c�

TheEurographicsAssociation2002.

Page 17: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

α0 α1 α2 α3 α4 α5 α6 β32 � 2 1

2 1116 � 3 3

2 � 13 1

2512 � 4 3 � 4

314 1

13760 � 5 5 � 10

354 � 1

5 114760 � 6 15

2 � 203

154 � 6

516 1

Table 4: BDF Methods

2.1.5. The Verlet method

As a last methodwe will discussa schemecommonlyre-ferredto asleapfrogor Stoermer-Verletmethod.It is espe-cially efficient if (17) is given as the secondorder system

x9 9�� t �� fv ; t x � t < (50)

i.e. fv ; t x � t � x9 � t < � fv ; t x � t < . It is notapplicableto gen-eralfirst ordersystemsof theform (19).

«j¬ ­j® ¯±° ²±³ ´±µ¶j· ¸ ¹ º¼»[½ ¾¿¼À[Á Â Ã Ä Å ÆÇ�È É�Ê ËÍÌ ÎÍÏ Ð+ÑÒÔÓ Õ Ö ×YØ[Ù ÚÛYÜ[Ý Þ ßáà â ã

Figure11: Staggeredgrids for theVerletmethod.

To derive it, we usecentereddifferencesat a staggeredgrid (figure11) i.e.wenow approximatev at t � � 2i � 1 hB 2andx at t � ih by centereddifferences

vnH 1F 2 � vn G 1F 2h

� f � xn (51)

xnH 1 � xn

h� vnH 1F 2 (52)

thus

vnH 1F 2 � vn G 1F 2 � hf � xn (53)

xnH 1 � xn � hvnH 1F 2 � (54)

Themethodpossessesorder2 asonecanseeby substituting(53) into (54) resultingin the secondordercentereddiffer-ence

xnH 1 � 2xn � xn G 1

h� f � xn � (55)

From this equationan alternative formulationof the Verletschemeasa multistepmethodcanbederived

vn � vn G 1 � hf � xn (56)

xnH 1 � xn � hvn (57)

which omits thehalf stepsandstaggeredgrids from above.

Now for secondorderequationswhich do not possesstheform of (50) one may replace f � xn by f � xn vn G 1 at theexpenseof somestability. Correctlythereplacementhadtobewith f � xn vn but this would resultin a implicit method.Now wecanapplythemethodto examples2 and3.

Figure10 shows thework precisiondiagramsfor theim-plicit methods.Evenfor largetimestepsthesemethodsgiveapproximationsto theexactsolution.After a somewhatun-even convergencephaseall the explicit methodsconvergesmoothlyfor decreasingtime stepto theexactsolutionwithaslopegivenby their order.

Up to now we have omitteda discussionof the stabilitypropertiesof theleapfrogmethod.Fromtheexamplesit canbeobserved that themethodcannotbeunconditionallysta-ble. Indeedsomemoredelicatecomputationsshow that themethodonly deliversa boundedsolutionfor arbitraryh 4 0for purely oscillatoricequations,i.e. for secondorderordi-narydifferentialequationsof the form (50) (with no damp-ing term)anda contractive right handside.Neverthelessthemethodremainswell behaved in thepresenceof low damp-ing. This explainsits importancein molecularandcelestialdynamics,whereall systemsareconservative. In figure 12we appliedtheVerlet methodto theundampedwave equa-tion y9 9 � 5y andit is clearlyoneof thebestchoicesover awiderangeof accuracy requirements.

101

102

103

104

105

106

10−6

10−4

10−2

100

102

104

106

work (flops)

prec

isio

n

explicit Euler implicit Euler implicit MidpointBDF(2) Verlet

Figure 12: Work precisiondiagram for the explcit/implicitEuler, implicit midpoint,BDF(2) andVerlet methodsfor thewaveequationy9 9 � � 5y withoutdamping.

2.1.6. Selectingan efficient method

Which methodis bestfor a certainapplication?This ques-tion is nearlyimpossibleto answera priori. Theonly choiceis to try asetof methodsandto evaluatewhichoneperformsbest.Choosingthemethodsto try, thoughcanbedonebasedon theoreticalconsiderationsandobservationsof the prob-lemat hand.A possiblestrategy is shown in figure13.

Thesamestatementholdsfor predictingtheefficiency of

c�

TheEurographicsAssociation2002.

Page 18: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

ä�å�æ ç è¼éëê æcæ ì�í:í�î:æ�èjïç îñð�èóò�î ò(ô[æ ç ê õ õ÷öø æúùjûüû¼ì�ý÷ùjû¼å7é+î ý÷èê é7í�î ý ç ù¼ò:ç�ç þ�ù¼òÍõ ùüæ[çûjî é7í(ì:ç ù¼ç ê î ò7ç ê é�èüæ�ÿ

������� � �� �� ��� ����� ���������� ���� � ������������ ������ ���������� ����� ��� ����� �� � ���� ��!�!������ "#!�� ����� $��%� ����'&(�*)+ , - ./�0(1 2 3�465 171 8�9�9�:'1�3�;2 : <(3 1 2 5 = =?>@ A�3B2 C'3 1D:�E 8�2 5 :�F(1F'3�G�A�E 0�:'1DH5 E E G�2 :�A 5 H�I

J K�L M�N�O�P�L Q�O�R�STVU�W?X U�Y Z\[�]_^�` a b�c�d�e�`c�f�c�d g�h a b�c�d'i�c�b�e�j�a c�ff�^�^�k�^�k�lm f�h ^�n�`�c�h e�`Do�pm ]rq(d a ba h�s ['d ^�`m ]rq(d a ba h�tua k�q(e�a f�hvBwyxzr{�{�|�}?~�� ��� ��� ����}�~�� ��}D��������(� � { � �(� � ��� � � ���z � ~��_��B�y� ����� �(� ��� ��������� ������� �¡�¢(£ ¤ ¥¤ �( �¦�£ ��� �¡�¢(£ ¤ ¥¤ �(§u¤ ¨�¢���¤ ���© ¨���ª_�

«7¬�­ ®�¯°7±�² ³7´�µ¶�· ¸�¹

Figure13: Selectinga method.

amethod.Generallyimplicit methodsrequiremorework perstep.Ontheotherhandonemaybeableto usetimestepsthatareseveralmagnitudeslargerthantheonesexplicit methodswould allow. Although accuracy will suffer, the integrationwon’t be unstable(seefigure for example7(b)). If evalua-tions of the right handsidefunction arecheap,a stepwithRK(4) is fasterthanan implicit stepwith BDF(4). On theotherhandif it is cheapto computea goodsparseapproxi-mationto thejacobian,it maybemoreefficient to solve thelinearsystemwith a few cg iterationsthanto perform4 fullfunctionevaluations.

2.2. Solving nonlinear systems

All implicit methodsrequirethesolutionof a nonlinearsys-tem.Theimplicit Eulermethodfor examplereducesour in-tegrationproblemto thesolutionof thenonlinearsystem

Y1 � hf � Y1 � Y0 � 0 � (58)

Theothermethodsyield a systemof similar form, namely

Y1 � hf � 1

2� Y1 � Y0 ( � Y0 � 0 (59)

Y1 � 2

3f � Y1 � ¦ � 4

3Y0 � 1

3YG 1 § � 0 (60)

for themidpointandBDF(2)rule,respectively. Thisis anon-linearsystemof dimension6N. This systemmustbesolvedwith Newton’s methodto allow for arbitrarystepsizesinde-pendentof λ. Simplermethodsfor nonlinearsystemswouldcompensatethe advantageof A-stability becausethe num-ber of iterationswould increaseproportionallyto the stiff-nessparameterX λ X . We now will work out an approachforimplementingNewton’s methodefficiently.

2.2.1. Newton’s method

For thenonlinearsystemG � Y �� 0 wecomputeanumericalsolutionby thefollowing algorithm:

Algorithm 1: Newton’ s Method

(1) for k � 1 2 ����� until convergence do(2) Compute G � Y º k» .(3) Compute J

ºk» � ∂

∂Y G � Y º k» .(4) Solve J

ºk» sº k» � � G � Y º k » .

(5) Yºk¼ 1» : � Y

ºk» � s

ºk »

end

Applying Newton’s methodreducesthe problemto thesuccessive solutionof linearsystems.In a classicalNewtonmethodthis is achievedby Gaussianelimination.This intro-ducesa lot of non-zeroelementsinto the factors.Althoughreorderingtechniquesalleviate the effects,this approachistooexpensive for thepresentapplication.A lot of authors2 � 86 useiterative methodsto solve thelinearsystem.Wewill alsousetheconjugategradientmethodhereto solve the linear systemsin eachNewton step.Unfortu-natelythis changesthe convergencebehaviour of the outerNewton method,which is referredto asan inexact Newtonmethod78, givenby algorithm2.

Algorithm 2: Inexact Newton Method

(1) for k � 1 2 ����� until convergence do(2) Compute G � Y º k» .(3) Compute J

ºk» � ∂

∂y � Y º k» .(4) Find s

ºk » with J

ºk» sº k» � � G � Y º k » ( � r

ºk » ,

c�

TheEurographicsAssociation2002.

Page 19: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

such that � r º k» � © ηk � G � Y ºk» T� �

(5) Yºk ¼ 1» : � Y

ºk » � s

ºk»

end

2.2.2. Residualcontrol

Theerrorof theiterative solutionof thelinearsystemis for-mulatedin termsof the residual,which is easilycomputa-tionally accessible,whereastheactualerrorcannotbecom-puted.Thetoleranceof thelineariterationis decreasedpro-portionally to the monotonicallydecreasingresidualof thenonlineariteration.An analysisof this method78 shows that it convergesunderratherweak additionalassumptions.If the classicalNew-ton methodconvergesandthescalartolerancesη

ºk » areuni-

formly boundedby anη 3 1, theinexactmethodconverges.In literaturethe η

ºk» are referredto as forcing terms. Note

thatthis additionalassumptionis alsonecessary:For η � 1,sºk » � 0 would be admissibleand the iterationwould stag-

nate.Theinexactmethodthenat leastconvergeslinearly, whereasNewtonconvergessuperlinearly. By choosingtheηk to con-verge to zerosufficiently fast78, the convergenceof the in-exact Newton methodcanbe forcedto have an order 4 1.In a neighbourhoodof the solution the convergenceusu-ally speedsup.By extrapolatingthesolutionof theprevioustime stepwe obtaina goodinitial valuefor thenew solutionandthemethodconvergesquickly usingtheconstantboundη � 0 � 02without imposingatoostricttoleranceonthelinearsolver.

2.2.3. Inexact simplified Newtonmethods

The efficiency of the Newton methodcan be further im-proved by anotherapproximation.In the simplified versionof Newton’smethodtheJacobianJ

ºk» isapproximatedbyJ

º0» .

Sucha schemecan be rewritten in the form of an inexactNewton method,if the linear systemis written as followsandJ is chosenasapproximationto J

ºk»

Jsºk » � � G � Y º k» � � J � J

ºk» sº k » � r

ºk »� : � G � Y º k » � r

ºk » (61)

The residualrºk » is replacedby the larger r

ºk » , which can

be boundedif J P Jºk» . By choosingη

ºk» appropriately, the

methodstill converges.In fact,we tradesomeaccuracy ap-proximatingJ

ºk» againstaccuracy in solving the linear sys-

temandup to a certainlimit themethodstill behavesasbe-fore.

This degreeof freedomcanbe further exploited be evennot computingJ

º0» but a sparserapproximationof it. In our

system41 we modelledcloth usingthe continuity basedap-proachfrom section1.2.5. The choiceof the approximatedJacobianis motivatedby observingthatthedominatingstiff-nessis inducedinto thesystemby linearspringforcesfrom(14). Thesearesplit into a linearanda nonlinearpart.

Weapproximatetheright-handsideof thesystemby thelin-earexpression

Flin � x v�� ∑j ½ ¾ i ' j ¿�À E

Áki j

l2i j

� xi � x j � di j

l2i j

� vi � v j � (62)

Writing thisequationin matrix notation

Flin � x v+� Kx � Dv (63)

we approximatethefull Jacobianof thesystemby theJaco-bianof Flin � x v . Thenwe apply(61) with

J � I � hγ , 0 0K D - (64)

whereh is the time stepand γ dependson the integrationmethodused.In the implementationthis systemof dimen-sion 6N can be reducedto a systemof dimension3N byexploiting the linear relationbetweenpositionandvelocity(section2.3).This choiceof theJacobianhastwo majoradvantagesoverthefull Jacobian.First,J is inexpensive to computeandonlychangeswheneitherthe materialconstantsor the stepsizechanges.Second,we reducethe entriesin the Jacobiantoapproximatelya third of the entriesin the sparsitypatternof the full Jacobian.Hencean iterationof the linear solveronly requiresa third of the original time. Obviously this isa major speed-upfor the solver. The resultingalgorithmissurprisinglysimple.

Algorithm 3: Inexact Simplified Newton’ s Method

(1) Compute J P ∂∂Y G � Y º 0» .

(2) for k � 1 2 ����� until convergence do(3) Compute G � Y º k» .(4) Find s

ºk » with Js

ºk» � � G � Y º k » ( � r

ºk » ,

such that � r º k» � © ηk � G � Y ºk» T� �

(5) Update Yºk¼ 1» : � Y

ºk» � s

ºk»

end

2.2.4. Adaptive time stepping

Newton’s methodcanalsobe usedto control the stepsizeof theODE solver. If theconvergenceof Newton’s methodis poor, the time steph is reducedsuchthat thesolutionofthe previous time stepis a betterstartvaluefor the currenttime stepand achieves a fasterconvergence.On the otherhand,thenumberof Newtoniterationsnecessaryis acriteriafor thebehaviour of theintegratorandhasalreadybeenusedfor anorderselectionalgorithm40 of theRadauintegrator. Inourimplementationthenumberof Newtoniterationsdecideswhetherto increaseor decreasethetimesteph.

2.3. Assemblyof a solver

All toolshave beenpresentedto assemblea numericalinte-gratorandspecialiseit to mechanicalsystems.As anexam-ple we provide a solver basedon BDF(2) andthesimplified

c�

TheEurographicsAssociation2002.

Page 20: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

inexactNewtonmethodwith adaptivetimestepping.Wefirstderive theschemewith fixedstepsize

32

Y1 � 2Y0 � 12

YG 1 � hf � Y1 � (65)

SplittingY � ? x vA T and f � ? fx fv A T into positionandve-locity part

x1 � 43

x0 � 13

x G 1 � 23

hv1 (66)

v1 � 43

v0 � 13

v G 1 � 23

hfv � x1 v1 � (67)

Substitutingfor x1 leavesoneequation

v1 � 43

v0 � 13

v G 1� 23

hfv ; 23

hv1 � 43

x0 � 13

x G 1 v1 < � (68)

For applyingNewton’sMethodwehaveto differentiatewithrespectto v1 obtainingtheequationfor theupdate¦ I � 4

9h2 ∂

∂xfv � x v � 2

3h

∂∂v

fv � x v § sºk »� � g � xº k»1 vº k»1 (69)

with theright handside

g � x1 v1 �� v1 � 43

v0 � 13

v G 1 � 23

hfv � x1 v1 � (70)

We also updatethe spacepart x during Newton iteration,simplifying thefunctionevaluation

xºk¼ 1»1 � 4

3x0 � 1

3x G 1 � 3

2hvºk¼ 1»1 � x

ºk »1 � 3

2hsºk » � (71)

Now weintroducetheapproximationto theJacobian,rewrit-ing thesystem(69) to� I � 4

9h2K � 2

3hD sº k» � � g � xº k»1 vº k»1 � (72)

We omittedthe variablestepsize.If h changes,equation(65) andderivedscalarschangeto

Y1 � � 1 � ω 21 � 2ω

Y0 � ω2

1 � 2ωYG 1 � hnew

1 � ω1 � 2ω

f1 (73)

with ω � hnewhold

. In particular(72) (resp.(69)) changesto¦ I � ; 1 � ω1 � 2ω

< 2h2K � 1 � ω

1 � 2ωhD§ s

ºk»� � g � xº k»1 vº k »1 (74)

with

g � x1 v1 �� v1 � � 1 � ω 21 � 2ω

v0 � ω2

1 � 2ωv G 1� 1 � ω

1 � 2ωhfv � x1 v1 � (75)

Theupdatefor x becomes

xºk¼ 1»1 � � 1 � ω 2

1 � 2ωx0 � ω2

1 � 2ωx G 1 � 1 � ω

1 � 2ωhnewv

ºk¼ 1»1� x

ºk»1 � 1 � ω

1 � 2ωhnews

ºk» � (76)

Thuswehave thefollowing completeintegrator.

Algorithm 4: BDF2-Solver

(1) ω � 1(2) // timestepping loop

while t 3 tend do(3) t � t � h(4) Update if necessary K and D.(5) If K, D or h changed precompute

A � I � ; 1H ω1H 2ω < 2

h2K � 1H ω1H 2ω hD

(6) v G 1 � v0, v0 � v1(7) Precompute the constant terms in the

integration formula (73) and (75)(8) Initialise the starting values x

º0»1 vº 0»1 by

extrapolation andcompute g � g � xº 0»1 vº 0»1

(9) //Newton loopwhile � g � xº k »1 vº k »1 � 4ÄÃyÅ%Æ

and k 3ÈÇ#É7Ê _ ËyÌ7Í Ã(10) Solve As

ºk» � � g

such that � g � Asºk» � © η � g � �

(11) Compute vºk¼ 1»1 and x

ºk¼ 1»1 using (76)

(12) Update g � g � xº k¼ 1»1 vº k ¼ 1»

1 (13) k � k � 1(14) end while(15) If k 3ÏÎ _ Ð%Ñ increase h

If k 4 Î _ Ò Å Í%Ë decrease hω � hnew

hold

(16) end do

2.4. Comparisonof methods

After we have establishedthis theoreticalbackgroundwearenow ableto describemany of thecurrentsimulationap-proachesfor clothsimulationin a unifying way.

Baraff and Witkin2 formulatenonlinearconstraintsanduse their linear approximationfor the constructionof animplicit solution method commonly referred to as linearimplicit Euler. This way the systemto be solved also be-comeslinearandcanbe solved efficiently by a cg-method.This methodcorrespondsto thesolutionof a nonlinearsys-temwith only oneNewton iteration.Becausethe nonlinearpartis not integrated,with high stiffnessonemayencounterproblems41� 25.

Desbrunet al.22 usedProvotsmodel76 (section1.1.1) andalinearimplicit method.But insteadof linearizingthewholesystem,they split it in a linear andnonlinearpart anduse

c�

TheEurographicsAssociation2002.

Page 21: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

a precomputedinverseof A for solving the linear part oftheequations.They don’t aim at solving theequationcom-pletely, as they don’t integrate the nonlinearterm explic-itly. Insteadthe angularmomentumis correctedto accountfor the nonlinearpart. With this algorithmonecanneitherchangethe stepsizeh nor dealwith an Jacobiandependingon t.

Debunneet al.21 usea simplified versionof a linear im-plicit Euler method.To solve the differentialequationaris-ing from their geometricnonlinearGreenmodel,they applyan implicit Euler methodusing a single Newton iteration.TheJacobianis approximatedby the3x3 block-diagonalofthe linearCauchytensor, allowing a very fastinversionandapplication.

3. Collisions(BerndEberhardt)

3.1. Intr oduction

In thephysically-basedsimulationof rigid or non-rigidbod-ies therearethreemain stepsto be solved asefficiently aspossiblebut alsoasaccuratelyasnecessary:Computationofthedynamicsof any object,detectionof collisionsbetweenobjects,and computationof the collision response,i.e. offorcestakingeffect by collisions.

Thus,an importantissuein modellingcloth is to deter-mine the interactionor penetrationof the cloth with itselfand its surroundings.In fact, it would be only half of thestorywithout it.

Theuseof particlesystemsin calculatingtextiles enablesrealistic modelling close to experimentaldata.This phys-ically basedmodelling provides a realistic interactionbe-tweenobjectsin a system.Thefirst andarguablymostim-portantstepin settingup a physicallybasedmodellingsys-temis anaccuratecollisiondetection.

As describedin the previous tutorial sectionswe calcu-late the trajectoryof a particlevia an integrationof textile-specificdifferential(difference)equationssolvingan initialvalueproblem.The initial values,i. e. locationsandveloc-ities of the particles,arewell-definedbeforethe start of asimulationvia an implicit/explicit Euler-, Runge-Kutta- oranotherintegrationscheme.Thenwe detectpenetrationandhave to reactaccordingto thesituationandadjustvelocitiesand/orlocations,i. e. thenew initial values.

Basedon our intuition peoplecaneasilydistinguishbe-tween a physically correct or insufficient treatmentwhencollision is detected.Textiles, or more generaldeformablematerials,areparticularin collision detection.We may en-counterarbitraryfolding andhencewe have to considerbe-sidesthe classicalcollision with other objectsalso possi-ble self-collisionsof the textile itself. Therefore,we needapartfrom thephysicallaws for themotionequationsa fast

and very generaltreatmentof collision effects for cloth-modelling.

Hence,wehave two problemsto solve:first, thedetectionof proximities wherewe find trianglescloseto eachotherandsecond,thereactiononthisproximity wherewewanttocorrectandprevent interferenceof our objects.

Thefirst problemof collisiondetectionandotherproxim-ity querieshasattractedsubstantialresearchduring the lastyears;seee.g. Lin and Gottschalk67 for a survey. Mostlybounding-boxor -spheretestsare usedto breakdown thecomplexity of checkingeachtriangle with eachother. Forexampleif our moving objectsareconvex polyhedra fastal-gorithmshave beendevelopedthatwork in expectedlineartime, seee.g. 37� 73. Other methodsthat overcomethe re-striction of convexity have beendevelopedon the basisofvarioushierarchicalboundingvolumeapproaches:orientedboundingboxesusedin OBBtrees33, sweptspherevolumes64, anddiscretelyorientedpolytopes(k-DOPs)60.

In addition, possiblycolliding objectsare identified bySweep-and-Prunestrategies10. As opposedto boundingvol-umehierarchies,regular grids partition the sceneinto vox-els4� 93. Alternatively, graphicshardware1 canbeemployedto detectcollisionsin image-space,which waseven investi-gatedfor cloth modelling84.

By theseapproachesinteractive responsetimes arepos-sible on presenthardware for modelsconsistingof severalthousandtriangles.To achieve interactive responsetimesinsimulationsthat aregovernedby ODEsmoresophisticatedtechniquesareneededthatallow for fastdistancecomputa-tionsin evenshortertime.

3.2. The Situation in Cloth Modelling

The situationfor simulatingaccuratelya cloth-like surfaceis somewhatmoredifficult to dealwith thanausualdistancecomputationof anensembleof rigid bodies.

For calculatingtextiles we have complicatednonlineardifferentialequationsto solve andthe surfacecanadapttoalmostany imaginablesurfacetopologymakingthecalcula-tion of possiblecollisionsdifficult. Thuscollision andself-collision detectionareoften the most time consumingpartof thesimulationalgorithm.

In the past yearsvery fast cloth simulation techniqueshave beendevelopedto drive the cloth throughsimulationusing large time-stepsachieving almost real-timecalcula-tions. Having to deal with theselarge time-stepscollisiondetectionandits responseis anevenmoredifficult problemto solve becausethe cloth movementwithin one time-stepcanbequitelarge.

Moreover, calculationtime canbe dramaticallyaffectedby introducingcollision-detectionand-response.Sincead-ditional stiffnessmaybeintroducedwhenreactingon a col-lision, thenumericalsolutionof thedifferential(difference)

c�

TheEurographicsAssociation2002.

Page 22: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

equationsmay becomeinstableusing the large time-stepsand hencewe have to use smaller time-stepssometimesdramaticallyincreasingcalculationtime. Therefore,specialcareshouldbetaken in theresponse.This leadsto collisionforeseeingand preventing considerationsformulatingcon-straintson themovementof cloth-particles.

Accuratecollision responseis only possiblewith a mea-sureof distancebetweenclosemeshsurfaces.Usingthedis-tanceanadaptive, constraintbasedapproachfor a collisionresponsecanbeemployedto avoid inter-penetrations.

Thebasicgeometricelementsfor a collision detectional-gorithm may be the triangles(or polygons)of our virtualobjectsin the scenewe are considering.Every surfacein-volved in thesimulationprocess,beingpart of the cloth it-self or being part of the scenery, can also be assumedtobetriangulated.For collision detectionwe basicallyhave tomake distancecomputationsfor eachpossiblepair of trian-gles.Clearlythismakesupanunrealistictaskmakingupthesocalledcomplexity problem.

A lot of possiblesolutionshow to breakdown this com-plexity problemhavebeenproposedin therecentyears.Theideais explainedquickly: ‘Do not testall thetriangles’.Buthow do we find thetrianglesto betested?Q

Embedcomplex objects into bounding volumeswhichwe caneasilycheckon intersections.Moore alreadyde-scribedthis fundamentaltechniquein 198874.QDo not checktrianglesfar away from eachother usinggridsor hierarchicalstructures.

Thesetwo aspectsmake up a fastcollision detectionalgo-rithm andin the literaturewe find a whole variety of ‘f ast’androbustimplementations.

3.3. Preliminary Tests,Bounding Volumes

Reducingcomplexity by using fast and not so many testsfor complicated,complex objectsis the basic idea and tothisend.MooreandWilhelm introducedBoundingVolumes(BV) in which they embedtheobjectsto betested.

TheseBoundingVolumesaregeometricobjectscontain-ing a groupof objects,primitivesor just onesinglecomplexobject.Collision detectionis then performedin two steps:Firstwedetectonly intersectingboundingvolumes,thenwecheckfor collisionsinsidethevolumes.

Many differenttypesof geometricobjectshave beenpro-posedto playtheroleof boundingvolumeseachhaving theirprosandconsdependingon thegeometricpropertiesof thecolliding objects.However, therearesomepointsto becon-sideredwhenchoosingthe right boundingvolumefor yourapplication:Q

Is the collision testbetweentwo differentboundingvol-umesefficient andfast?

QIs the constructionof the many boundingvolumessur-roundinga complex objecteasyto perform?Canwe dothis on thefly?QAre alot of boundingvolumesneededfor thegeometryofour complex objects?QDo I needalot of storageto describeanindividualbound-ing volume?QHow well doestheboundingvolumesfit themodel?

At this point we should mention at least BoundingBoxes(BBs)possiblybeingboundingvolumes(BVs). Well,boundingboxescomein severalvariations:

AABB Axis aligned boundingboxes, where we use theusualboundingboxalignedto theworld spacecoordinatesystem83. Two three-dimensionalcoordinatesareenoughdescribingsucha AABB: Simply calculatemaximalandminimal point of theobjectto beencompassed.For theseBVs teston intersectionis performedvery easilyby sim-ply checkingthegiven maximalpoints.Two AABBs in-tersect,if andonly if we have interval intersectionsalongall of thethreecoordinateaxes.

OOBB Objectorientedboundingboxes,whereweallow inadditionrotatedandtranslatedboundingboxes33.

SpheresBoundingspheres,wherewetry to encompassourobjectby smallspheres.Again teston intersectionof thespheresareeasilycomputedandhave just radiusandcen-ter to bestored.But it is not easyto find a goodcoveringandarenoteasilybuild on thefly.

k-DOPs Discreteorientedpolytope,which is is a convexpolyhedrondefinedbyk half-spacesenclosingtheobjects.This is thetypeof boundingvolumewewill considerfur-ther. Advantagesareobviously fastconvergenceandeasychecksincewe have thesametestasfor AABBs by sim-ply checkinginterval intersectionsof thek half-spaces60.

For collisiondetectionin clothmodellingwehave to con-sider the ever changingshapeof our textile. Hencehavingbuild oncean encompassingof our cloth for onetime-stepwill not bea sufficient covering for thenext. Therefore,be-causearbitraryobjectdeformationscannotbeexpressedbyrigid rotationsandtranslations,orientableboundingvolumeslike OBBs33, QuOSPOs42, or DynamicallyAligned DOPs92

arenot suitablefor clothmodelling.

We follow the ideasof Mezger et al. 72 and thereforechoosecommonk-DOPs60 asthey show betterconvergencethan spheres49 or ordinary AABBs83. By convergencewemeanthe hierarchicalseriesof boundingvolume approxi-mationof thesurface(or object)to bechecked.

3.3.1. k-DOPs

A k-DOP60 (discreteorientedpolytope)is a convex polyhe-drondefinedby k half-spacesdenotedas

Hi �^] x >ÔÓ m X nTi x © b ni > N bi >ÕÓ _ �

c�

TheEurographicsAssociation2002.

Page 23: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

The normals ni of the correspondinghyper-planesof all k-DOPs are discrete and form the small setN � ] n1 ����� nk _×ÖÄÓ m � For arithmetic reasonsthe entriesof the normal-vectors are usually chosen from the set] � 1 0 1_ . In order to turn the intersectiontest for thepolyhedronsinto simple interval tests, the hyper-planeshave to form kB 2 parallel pairs. E.g. an axis alignedboundingbox (AABB, 6-DOP) in Ó 3 is given by N6 �] ��Ø 1 0 0��� 0 �Ø 1 00�� 0 0 �Ø 1�_ , anoctahedron(8-DOP)isgeneratedby settingall normalcomponentsto Ø 1. We usu-ally use14-DOPs(N14 � N6 ˙Ù N8) or 18-DOPs(AABB withclippededges).

Theeasiestway to build thek-DOPboundingvolumefora setof points is insertingtheminto a primarily empty k-DOP by updatingits k B 2 intervals accordingly. The over-lap test betweentwo k-DOPs is implementedby intervaltestssimilar to the commonAABB, indicatingdisjointnessassoonasonepairof intervalsis disjoint.Thus,themaximalnumberof interval testsis kB 2 (in theoverlappingcase).

3.4. Hierar chy, Spatial Subdivision

Boundingvolumesbreakdown considerablytheamountoftrianglesto betested.However, wewantto checkonly thoseobjects(hencethe triangles)which arecloseto eachother.How do I quickly determinethoseobjectswithin onepartic-ular region in space?This is a commonproblemin com-puter graphicsnot only in (physically based)simulations.Two waysof tacklingtheproblemarewell known:Q

Grid subdivision andvoxel-structures.QHierarchicalsubdivision suchasoctrees.

Hierarchicalstructuresare known to reducecomplexityenormouslyandthusshouldalsobe our choicein collisiondetectionfor cloth-modelling.Grid subdivision is the sim-plestway to divide space.The insertionof verticesinto thegrid cellscanbeperformedeasilyandoneshouldusehash-ing to storethesparseoccupiedvoxel cells.

Howeveraspromised,wewill build uphereahierarchicalspacepartitioning.In additionwehaveto build thehierarchi-calspacestructurefor eachtime-stepdynamicallyandthere-forehaveto havesomesortof updatemechanism.If wehavearbitrarily moving objectsthis updatecanbe very compli-cated.Octreesarehierarchicalstructuresdividing spacebyfilling objectsinto thestructure.Why not doing it theotherway round.We take our objectsandbuild up a hierarchicalstructurein space.

Theadvantageis obvious if we considerobjectswith noconstantgeometricstructurebut having constantlocal topol-ogy suchasdeformablematerials.However, asthe objectsfreely move aroundthehierarchyhasto bebuild efficientlyon thefly in ordernot to generatea bottleneckandto gener-atenew proximity informationamongtheobjects.

3.4.1. k-DOP Object Hierar chy

Let BVk bethetightestk-DOPenclosingasetof verticesandÚÛtheoperationformingthetightestk-DOPenclosingoutof

a setof k-DOPs.Then,like AABBs alsok-DOP boundingvolumessatisfytheequation

BVk � V ��ÝÜÞp À P ¾ V ¿ BVk � p (77)

for asetof verticesV andanarbitrarypartitionP � V . Hence,theoptimalboundingvolumefor anodein thehierarchycanbeeasilycomputedby merging its child boundingvolumes.Vice versathehierarchycanbeefficiently built usinga top-down splittingmethod.Figure(14) showstwo hierarchylev-elsfor the18-DOP-hierarchyof anavatar.

(a) (b) (c)

(d)

Figure 14: Two levelsof an 18-DOP-hierarchy. (a) and(c)showthe18-DOPs,(b) and(d) thecorrespondingregionsonthesurface.

3.4.2. NodeSplit

As for the usualoctreeswe have to definehow we arego-ing to split a large k-DOP into smallerones.As usualtheboundingvolumesare split accordingto the longestside.The longestsideof a k-DOP is determinedby the facepairwith the maximumdistance.The k-DOP is split parallel tothisfacepair throughits center. As generallysomepolygonsarecut by thesplitting plane,they areassignedto thatchildnodewhichwouldcontainthesmallestnumberof polygons.In the lower hierarchylevels, if all polygonshappento becut,eachof themis assignedto its own node.Finally, asthe

c�

TheEurographicsAssociation2002.

Page 24: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

correspondingverticesfor thenodeareknown, thek-DOPscanbeoptimally fitted to theunderlyingfaces.

Althoughthismethodis simple,it turnsout to beefficienton the onehandandto producewell balancedtreeson theotherhand.The completehierarchysetupfor objectshold-ing several thousandsof polygonscanbeperformedwithinmerelya second,allowing to addobjectsdynamicallyto thescene.To achieve optimal collision detectionperformance,thesplitting continuesuntil onesinglepolygonremainsperleaf.

3.5. Collision, Self-Collision,and Heuristics

The above collision detectiontechniqueis now appliedtoan actualcloth surface.For this we considereachpolygonof our cloth-surfaceasa separate,individual objectpartici-patingin the simulation.Upon theseobjects,togetherwiththe objectsthe cloth may collide with, we build the hierar-chicalstructuredescribedabove. In goingdown to theindi-vidual polygonswe may processcollision regardlessif wehave polygonsof differentobjectsor polygonsof the same(deformable)object.

In addition to this ‘usual’ setupwe have for cloth addi-tional informationwe we will useto speedup computation.Adjacency andsurfacecurvaturearetwo criteria which al-low for additional information on possiblecollisions (weeasilysort out triangleswhich cannot collide). This is thebasicideaof theingeniouscollisiondetectionalgorithmpro-posedby P. Volino and N. Magnenat-Thalmann.In addi-tion they observe thehistoryof closeregionsto guaranteeaconsistentcollision response12. Recentpublications87 addi-tionally addressk-DOPsasboundingvolumes.Provot77 de-scribesasimilarapproachfor thesurfacecurvatureheuristic.

Theobservationbasicallyis thefollowing: Following thebasicdetectionprocedurewe seekthoseboundingvolumesthat overlap and will checkagainthe child-boundingvol-umesbeingleft with individual polygonsto bechecked.Forcloth we consideras said the individual polygonsas indi-vidual objectsandhencetheir enclosingboundingvolumeswill intersect.Adjacentpolygonshowever will never self-intersect.For efficiency we thereforeshouldexclude thosedirectlyadjacentpolygons.

Canwe extend the region of non-self-intersectingtrian-gles?"A flat surfacecannothave self-collisions.If a surfacehasself-collisionsit mustbe bentenoughto form a loop."88 A vectoris searchedthathaspositive dot productwith allnormalsof theregion. If sucha vectorexistsandtheprojec-tion of theregionontoaplanein directionof thevectordoesnotself-intersect,theregion cannotself-intersecteither.

This is animportantoptimizationto theself-collisionde-tection problemand shouldbe included in the algorithm.However keepin mind that this is only possiblebecauseofthespecialsituationin clothmodelling.To do this,a coneis

maintainedfor every region representinga supersetof thenormal directions.The conecan be calculatedduring thebottom-uphierarchyupdateby very few arithmeticopera-tions.Theapex angleα of theconerepresentsthecurvatureof theregion, indicatingpossibleintersectionsif α ß π.

Still thereremainstheproblemthathierarchyregionscanhave severe non-convex shapeand thereforecompromisetherobustnessof thesurfacecurvaturecriterion.Figure(15)shows sucha surfacethat self-intersectsalthoughthe apexangleof its normalconeis rathersmall.Mezgeret al.72 di-

Figure 15: Self-intersectingmeshwith correlatednormalsbut concaveshape.

vide sucha meshinto several facegroupsandbuild an ad-jacency matrix for thegroups.Thecurvatureheuristicis notappliedto non-adjacentgroupsduringtheself-collisiontest.

3.6. Proximity, Distanceand Collision Response

Whenever two colliding hierarchyleaveshave beenfound,the distancebetweeneachpair of facesis calculated,andcandidatepairs are detectedand passedto the collisionresponse.This problem has beenextensively studiedandcanbecalculatedvia theGilbert-Johnson-Keerthyalgorithm31� 8. Alternatively the Lin-Canny type algorithms(68� 69� 73)canbeused.

Thesimplestresponseto acollisionwouldbejust to relo-catethe colliding particles.Henceimposingvirtual springshaving almostinfinite stiffnessanddiscontinuities.Clearlythisaffectsthenumericalperformance.For animatedscenesan efficient collision responsemethodis crucial. In partic-ular, numericalstability andperformancein the context oflargetimestepshave to bepreservedandnoadditionalstiff-nessshouldbeintroducedinto thesystem.

Therefore,for an implementationwe suggestthe useofconstraintsbasedon theefficient implementationpresentedby Baraff andWitkin 3.

To allow large time stepsandpreserve stability collisiondetectionand responseaims at avoiding collisions beforethey occur. Therefore,notonly colliding facesshouldbede-tectedbut also proximities, that is facescloserthan a dis-tanceεclose. In this case,thecollisiondetectionreturnspairsof colliding or closefacestogetherwith the closestpointson thesefaces.While thecollision detectionprocessreturns

c�

TheEurographicsAssociation2002.

Page 25: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

candidatefaces,anadequatecollisionresponsehasto becal-culatedfor eachinvolvedparticle.For thatpurpose,thecol-lisionsaresortedby theestimateddistanceof thetwo facesafter the next time step.This distanceis estimatedby thecurrentdistanceandtherelative velocity.

Wemaynow constrainthevelocity in thenormaldirectionof thecloseobjectasin 41� 77. If thevelocity is constrained,it hasto bepresetwith appropriatevalues.Thecollision re-sponsedistinguishesbetweentwo differentcases:

1. Collisionsof two deformablefaces.2. Collisionsbetweena deformablefaceanda faceof the

pre-computedrigid environment.

In both casesonly facesmoving towardseachotherarehandled.Their velocity in theconstraineddirectionis settoasserta minimum distancedmin. This velocity is scaledbyγ � vrel B dmin

∆t to simulatea restingcontact,wherevrel is therelative velocity of the two facesand∆t is thecurrenttimestep.

In thefirst casenovelocityandthereforenomomentumistransferredbetweenthetwo facesof theobject.In thesecondcaseadditionallyto thevelocity usedto asserttheminimumdistance,the velocity of the rigid object in the constraineddirectionhasto be addedto the velocity of the deformableobject.

Onemaynow constrainthevelocity of thecolliding par-ticles in thedirectionns of thenormaldirectionof thecloseobjectandpresetit to

v � 1∆t

γ � dmin � d � π � vr (78)

whereπ is the projectiononto the orienteddirection ns, dis thedistancebetweenthe two facesandvr is the velocityof the rigid object.If inter-penetrationsoccur, the facesareseparatedagain,as long as their distanceis smallerthanapresetvalue.

Sinceonly onedirection of the particlevelocity is con-strained,the particle is still free to move accordingto theforcesactingon it in the otherdirections.Henceit is easyto model stiction by constrainingthe other directionsandreplacingthe projectedvelocity of the rigid object by theentirevelocity of therigid objectin equation(78) suchthatthe cloth moveswith the rigid object.Collision constraintsmustbe releasedwhen forcesdrag the particleaway fromthecollisionobject.Thesereleaseforcesareestimatedat thebeginningof every integrationstep.

4. BTF Acquisition & Rendering

(Reinhard Klein, RalfSarlette, Mirko Sattler)

This subsectionof thetutorial is structuredin threeparts.In thefirst partthetermBTF BidirectionalTextureFunctionis explainedand a short overview of the previous work is

(a)

(b)

(b)

Figure16: Performedcollisiondetectionfor a complex mul-tiple layercloth. 28

given.Thesecondpartdealswith theautomaticacquisitionof BTF dataandin detail theBTF dataof clothing.Thelastpartgivesanoutlookoncompressionandrenderingthisdataonarbitrarymeshes.

4.1. Intr oduction & BTF definition

In order to visualizereal world objectswith high fidelity,onehasto acquireandrenderthe physicalreflectionprop-ertiesof anobjectsurface.Thereforeviewing andillumina-tion directionshave to betakeninto accountwhenrenderinganobject.Furthermore,aninteractivechangeof theviewingposition and the lighting conditionsshouldbe possible,toallow theuserto simulatea desiredscene.Currently, phys-ical reflectionpropertiesarecapturedusinglight field tech-niques32� 66� 19� 90� 89. Thedrawbackof mostlight field render-ing approachesis that themeasuredmaterialpropertiesarecoupledwith a fixedgeometry, thusnot allowing to changethegeometryor thematerialwithout remeasuringtheobject.Thesemethodsutilize eithera fixedlighting environmentor

c�

TheEurographicsAssociation2002.

Page 26: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

Figure17: Apair of trousersrenderedusingBTFdata(Pro-poste dataset).

afixedcamerapositionandarehenceonly suitablefor staticscenesor environments.ThetermBRDF(BidirectionalReflectionDistributionFunc-tions)wasintroducedby Nicodemus29 in 1970.In computergraphicsmeasuredBRDF datais usuallyusedto fit thepa-rametersof different theoreticalmodels62� 65 or to createalookuptable.By definiton,a BRDF doesnot containany geometryinfor-mation.Thereforethesefunctionsdo not includeself shad-owing causedby the microstructuralgeometryof the sur-face,subsurfacelight transport,etc, becausethe surfaceistreatedasif it consistsof only onematerial.Hendrik et al.45 proposeda methodto capturespatialvarying materials,which is againboundto themeasuredobject.Polynomialtexture maps(PTM) asdescribedby Malzben-deretal.71 areanextensionto standardtexturemaps.As op-posedto storingacolorperpixel, thesePTM’sstoresecond-orderbi-quadraticpolynomialcoefficientsper pixel. Thesepolynomialsmodelthechangesthatappearto a pixel colorbasedoneitherlight sourcepositionor viewing direction.Anothermethodto capturereflectionpropertiesis theusageof BTFs.ThetermBTF (bidirectionaltexturefunction)was

introducedby Danaet al. 14� 13 in 1999.Thetermrepresentstheappearanceof a textureasa functionof viewing andil-luminationdirection,hencecapturingeffectscausedby themacroscopicroughnessof asurface,likeself-shadowing,oc-clusion,inter-reflectionsor view-dependentreflections(seefigure 18). On the other hand,by measuringflat material

Figure18: A texturedcubeusingCUReT46 data.Thesam-ple "crumpledpaper"is used.In this figure, fromtop to bot-tom, the cubeis spinningaroundhis vertical axis.Theleftcubeshowsnormaltexturing , while theright cubeusestheBTFdata.

samples,BTFsaregeometryindependent.Ignoring wavelengthand fixing time, henceignoring timedependenteffects like fluorescence,a BTF can be consid-eredasa specific6D reflectancefield:

BTF � f � θi φi x y θr φr (79)

with incident(θi φi) andreflectedflux (θr φr ) at a specificsurfacepoint (x y) 70� 14.

4.2. Acquisition of BTF data

The work of Danaet al. resultedin a 61 sampledatasetof real-world surfacespublicly available in the CUReT46

database.The databasewas createdto investigatethe vi-sualappearanceof real-world surfaces,but doesnot satisfyall of therequirementsfor high quality cloth rendering.Be-sidesthe insufficient quality of someimages,not all neces-saryviewing andillumination directionson thehemisphereweretaken into account.Basedon this work we build up a

c�

TheEurographicsAssociation2002.

Page 27: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

measurementsetupasdescribedin 4.2.1. Thequality of themeasurementsontheotherhandhasto beimprovedin someparts.

4.2.1. MeasurementSetup

Theequipmentfor theacquisitionof theBTF datais mainlycomposedof a lamp,a camera,a robotanda personalcom-puter. For therealisticreproductionof cloth appearance,thelamp has to approximatedirectional sunlight. To achievethis,weuseaHMI-light source

�, whichis widely usedin the

professionalfilm- andphoto-industry, in combinationwith aFresnel-lens.As capturingdeviceweutilize aprogrammablehigh resolutionCCD-camera

�. Thepositioningof the sam-

ple is doneby arobotarm�. All thesepartsarecontrolledby

a personalcomputer.

Figure 19: Picture of the laboratory. Theblack casingsoftherobotandlight sourceare removed.

To reducetheinfluenceof scatteredlight, thelab is dark-enedand the hardware usedfor measurementsis coveredwith dark casings.In the centerof a semicircle-rail-system(170cmradius)the robot is placedon a laboratorybench.The camerais mountedon a wagonwhich resideson therail-system.Thelight sourceis fixedon oneendof therail-systemasshown in figure19.This computercontrolledsetupallows the reproductionofeveryconstellationof theview/light-directionwith referenceto the samplesurface(10cm x 10cm).Seefigure 20 for asketchof themeasurementsetup.

4.2.2. MeasurementProcedure

To achieve a sufficient measurementquality for rendering,theequipmenthasto becalibrated.à

bronimagingHMI F575áKodakDCS760âIntelitekSCORBOT-ER 4u

Figure 20: Illustration of the measurementsetup.A fixedlight sourceanddifferentcamera positionsare shown.Q

To reducethe positioningerror causedby deviationsbe-tween the robot and the rail-system,the sampleholdermountedon therobot is tracked throughthecamera.De-pendingon thepositionof thecameraon therail-system,a correctionmovementfor therobothasto becomputed.To reducethe positioning error further, marker points,placedon thesampleholder, aredetectedduringthepost-processing,allowing asoftwarejitter correction.QA geometriccalibration79 hasto be appliedto the cam-erato reducegeometricdistortion,which is causedby theopticalsystemof thecamera.QFor eachsampleto bemeasured,theapertureof thecam-erahasto beadjusted.Becausetheaperturestaysfixedforall imagesof a sample,saturatedanddarkpixelshave tobereducedasmuchaspossible.

QTo achieve thebestpossiblecolor reproductionthecom-binationof thecameraandthelight sourcehasto becolorcalibrated14. Becauseof the useof products,often usedfor professionalcolor photography, therearesomesolu-tions on the market. For the measurementof the cameracolor profile a specialCCD-Camerastandardcardshouldbeused.

A set of view/light-directionshasto be chosen,fitting thereflection propertiesof the samplesurface (e.g. seetable5). This canbe a setof nearlyequidistantlydistributeddi-rections,or their distribution canbe denserin areaswith arapidly changingdegreeof reflection.During the measure-mentfor everypositionof thedata-setanimageis takenandstoredfor post-processing.Thereafter, anotherimageof theCCD-Camerastandardcardhasto betakento detectdevia-tionsoccurredduringthemeasurementprocess.

4.2.3. Post-processing

Every capturedimageis transformedfrom the camerarawformat to RGB-color spaceusing the cameracolor profileandthetransformationprofilesdeliveredby thecameraman-ufacturer. Usingthejitter correctionderivedfrom themarkerpointson thesampleholder, thepixelscoveredby thesam-

c�

TheEurographicsAssociation2002.

Page 28: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

pleareextractedfrom eachimageto generatenormtextures,describedin section4.3.

4.3. The demonstrationBTF database

Figure 21: Samplenormtextures from the demonstrationdatabase. Thetop row shows(from left to right) IronLady,Stone, Proposte with θl � 0ã , φl � 0ã and θv � 34ã , φv �240ã . Thebottomrow views useθl � 51ã , φl � 280ã andθv � 66ã , φv � 144ã .

For a startup we have createda demonstrationBTFdatabase.For this,weuseda tileabletexturemapswith theircorrespondingheightfield. All imageswererenderedusingthefreewareraytracerPOV-Ray48 at a resolutionof 512by512 pixels. Thereafter, theseimageswere post-processed,creatingnormtextures. Thatis mappingtherenderedimagesontoa frontalviewedsquarefor furtheruseasa texturemap(Figure22). Theresolutionof thenormtexturesis 128by128pixels.Muchof theresolutionof theraw imageis lostduetotheextractionof theregionof interest.Thereforecuttinghasto be doneon a centeredinner areaof the raw image.Thecreationof normtexturesallows blendingof the texturesata triangleasdescribedlater. To have a consistentsamplingdensityover thehemispherewe chose∆θ � 17ã for eachofthe viewing andillumination directions.This yields in dif-ferent∆φ shown in Table5 andadifferentnumberof imagesper usedθ segment.The samplinghas81 viewing and81illuminationdirectionsor 6561imagesfor all combinations.For practicalmeasurementswe have only 6480images,be-cause81 positionswould be occupiedby both, the cameraandthelight source,andthereforecannotbemeasured.An-othermethodto generatea databaseis thesynthesis,asde-scribedin 16� 18� 35� 70.

Figure23 shows the generalterminologyusedfor mea-suring.At the vertex X we have a local coordinatesystemwith the vertex normal N and a preferentialdirection W.Thedirectionto the light sourceL is givenby θl andφl ; totheviewing positionV by θv andφv.The data in our demonstrationdatabasecan easily be

Figure22: Creatingnormtexturesbyremappingthecut im-age ontoa square.

θ [ ä ] ∆φ [ ä ] No. of images

0 - 117 60 634 30 1251 20 1868 18 2085 15 24

Table 5: Samplingdensityof viewing and illumination an-glesof theBTF database.

replacedby measuredreal-world data. The handling ofdenser data sets is possible, only limited through theamountof availablememory. Thedatabaseis indexedandalookup tablecontaininganglesandimagenumbersis gen-erated,allowing an easydatabaseaccessat runtime.Threedata sets were created: Ir onLady, Stone and Proposte(seefigure 21). Eachdatasetis convertedinto the JPEG47

formatandneedsabout27megabytesdiskspacefor storage.

4.4. Renderingof BTF data

Thispartdescribestherenderingof aBTF datasetonagivengeometry. This involvesthesolutionof therenderingequa-tion 52. Following thenotationof 51 gives:

Lo � x Våw�� Le � x �åw (80)� 1S

fr � x x9ÔR x åw Li � x9ÔR x V � x x9j G � x x9h dA9with:Lo: outgoingradiance[WmG 2sr G 1]Le: emittedradiance[WmG 2sr G 1]Li: incidentradiance[WmG 2sr G 1]fr : BRDF [sr G 1]åw: outgoingdirectionx: surfacelocationx9 : anothersurfacelocationV: visibility information(canx9 beseenby x?)

c�

TheEurographicsAssociation2002.

Page 29: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

Figure23: General geometryused.

G: geometryfactor

We assumeLe � x Våw to bezero.For creatingrealisticillu-mination conditions,imagebasedlighting techniques34� 44

can be applied.The usageof high-dynamicrangeimageseven improvesthis results20. Usinganhemicube11 method(figure24) pre-computedvisibility informationcalculationsandintegrationover the incomingradiancecanbe doneasshown in 30.By colorencodethepositionof anenvironmentmapinto thevisibility map (figure 26) and usethis asa lookup for thecurrentlyusedenvironmentalillumination,weareableto doa fastevaluationof theterm:

Li � x9ÔR x V � x x9h G � x x9h (81)

in (80). Weapproximatetheintegral partof(80) asfollows:1S

fr � x x9 R x Våw Li � x9ÔR x V � x x9¼ G � x x9¼ dA9 (82)P ∑i

fr � x pi R x Våw Li � pi R x V � x pi G � x pi P ∑i

fr � x pi R x Våw Li

with i astheindex of thepixels pi of thehemicube(figure25) andLi as

Li �çæ Li � pi R x V � x pi G � x pi : i f pi è environmentmap0 : i f pi è geometry

(83)

Self-shadowing is handled with the second case(pi è geometry). This could also be replaced by acolor encodedgeometrystoring illumination intensitiestohandleinter reflections.We interpret our BTF databaseas discreet solutions tothe integral part of (80). The reflection properties fr arenaturally storedin eachBTF image.We use(81) as inputfor the lookup into thedatabase.The main challengeusingthis approachis themultitexturing of all BTF imagesof all

Figure24: Thehemicubemodelat surfacepointx with nor-maln. pi are hemipixels.Image modifiedfrom80.

Figure 25: 2D sketch of figure 24. A hemicubeat surfacepoint x. With hemicubepixel pi è environmentmap andp9i è geometry.

Figure 26: Visibility map.Black is the meshcolor, colorencodedis the positionon an environmentmap(shownontheright).

visible light directionsper vertex. Which meansthat forall pixels of the visibility map, which are not marked asoccludinggeometry, thecorrespondingBTF imagehasto beweightedwith thepixel color andin a secondstepall thesepictureshave to be combined.This cannot be handledbytoday’s graphicshardwareanda suitablere-parametrizationof theBTF datais necessary.

c�

TheEurographicsAssociation2002.

Page 30: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

For this reasonuntil now the following implementationwasdone.The illumination of the geometryis provided byassuminglight coming uniformly from all directionsandadditionalpoint light sources.At runtime, for each frame, for all vertices,all relevantanglesare computed: θv, φv, θl , φl . Using n point lightsources,θl , φl becomesθl � n , φl � n .With the above mentionedlookup table, the texture mapscan be extracted out of the database,which are nearestto the currentanglesand usedfor blending.This is doneonce for every vertex. Figure 27 shows the blending andweightingof anarbitrarytrianglewith verticesV1 V2 V3 andcorrespondingvertex normalsN1 N2 N3. I is the intensitydependentof the regarded light source. To determine,

Figure27: Blendingthreelookedupnormtexturesfor usageona triangle. Weightingoccursaccordingto thegrey shadedtriangles.

whetherthe light sourceis visible from a specificvertex,the world coordinatesof the light sourceare transformedinto thelocalcoordinatesystemof thevertex. With asimplelookup into the visibility maps the visibility of the lightsourcescan be determinedfor eachvertex. Naturally thismethodworksonly, aslong asthelight sourceis not withinthe convex hull of the mesh. This disadvantagecan beovercomeby usingalsoa depthtestwith theprojectedlightsource.Sincethe correctillumination is storedin the imagesfromthe BTF databaseno further illumination calculationsarenecessary. The weightingderived from the visibility mapsandthethreeimagesshown in figure27 is computedin onestep.To approximatethe term causedby the light cominguniformly from all directions the correspondingtextureswith light direction θ � 0 and φ � 0 are used.Theseareweighted by the calculatedbrightnessderived from thevisibility mapsandblendedin a secondpasswith the firstretrievedtextures30.

Figure 28: Two viewsof a pair of trousers usingthe Iron-Lady dataset.

Figure 29: Two viewsof a pair of trousers usingtheStonedataset.Thesinglepoint light sourceis markedasa yellowdot.

Using this methodgeometryinducedself-shadowing isautomaticallydeterminedduring the evaluationof the visi-bility maps.Thisisessentialin orderto visualizefoldswhichhaveamayorimpactontherealisticoutlookof clothing.Foranexampleseefigures28 and29, which shows severaldif-ferentviews of thea pair of trousersusingtheIronLadyandtheStonedataset.To texture an arbitrary geometrywith a BTF dataset foreachvertex theviewing angle(θv φv) andfor all point lightsources,the light direction (θl ' i φl ' i) is computedfor eachframe. Static geometrywith 4200 verticescan be viewedandilluminatedby several point light sourcesat around20

c�

TheEurographicsAssociation2002.

Page 31: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

framespersecondon an1,4 GHz Athlon usinga GeForce3graphicscard.To handledynamicmeshesthementionedvis-ibility mapsmustbeupdatedtoo, which cannot bedoneatinteractive ratesby now.

5. AdvancedLocal Illumination(Katja Daubert,Jan Kautz)

Traditionally hardware renderersonly support the Phong light-ing model in combinationwith Gouraudshadingusingpoint lightsources.However, thePhonglighting modelis strictly empiricalandphysicallyimplausible.Gouraudshadingalsotendsto undersamplethehighlightunlessahighly tessellatedsurfaceis used.

Advancedlighting algorithmsallow theusageof othermorecom-plex reflectancemodelsto simulatemorecompellingmaterialssuchasvelvet andbrushedmetal.

Todaysgraphicshardwaresupportsper-pixel lighting with whichdiffuseandspecularbumpmapscanberenderedat interactive rates.New algorithmshave beenproposedthat can even renderbumpmapswith betterreflectancemodelsandincludingshadows.

Thesetopicswill beaddressedin this partof thetutorial.

5.1. Lighting Models

First we would like to explain whata lighting modelreally is, andthendefineit mathematically.

When light hits a perfectly reflective surface,i.e. a mirror, thereflectedlight leavesthesurfaceat thesameangleit hit thesurface.However, perfectmirrors do not exist in reality. In contrast,mostsurfacehave a very complex micro-structure.This micro-structuremakesdifferentmaterialsappeardifferently.

Whenlight hitssuchasurface,it is not reflectedtowardsasingledirection,but ratherto a coneof directions.If the surfaceis com-pletelydiffuse,light evenscattersequallyin all directions.

In computergraphicsthe bidirectional reflectancedistributionfunction (BRDF or alsoreflectancemodel) is usedto describetheway a surfacereflectslight. A reflectancemodelcanbe seenasamaterialdescriptionthatmodulatestheintensityof thelight thatar-rivesatthesurface.For everylight incidentdirectionit tellsyouhowmuchlight is beingscatteringto whichexitant direction.For exam-pletheBlinn-Phongmodelthatis usedby OpenGLcanbedescribedas:

fr � ωo & ωi " � kd é ks� n ê h" Nn ê ωi &

h � ωi é ωoëωi é ωo

ë &whereωi is theincidentlight direction,ωo is theexitant light direc-tion (i.e.viewing direction),h is thehalf-wayvectorbetweenωi andωo, all of whicharein coordinatesrelative to thesurface,i.e.relativeto the local tangentframeconsistingof thenormaln, thetangentt ,andthebi-normalb. Theparameterskd, ks, andN describethedif-fusecoefficient, thespecularcoefficient, andthePhongexponent.

This not a completelighting model,sincethe BRDF only tellsyou how light is scattered.A lighting model includesmuchmore:how the light intensity decreaseswith the distancefrom the lightsource(e.g.quadratically),whatkind of light sourcesaresupported

(e.g.point light or parallellight), if shadowsareincluded,andsoon.We will usethe following simplelighting modelfor the restof thechapter(which is similar to theOpenGLlighting model):

L � ωo " � fr � ωo & ωi " Li � ωi ":� n ê ωi " & (84)

Li � ωi " �íì Ir2 for point lights

I for parallellight

This lighting modelusesonly a singlepoint or parallellight sourcethat hasthe brightnessI , andis r units away from the illuminatedsurface.L � ωo " describestheradianceleaving at thesurfacepoint indirectionωo towardstheeye; this is thenperceivedby theeye.

The standardOpenGLlighting modeldoesnot allow to changethe function fr , it always usesthe Blinn-Phongmodel introducedabove.In thenext section,wewill explainhow thiscanbechanged.FurthermorestandardOpenGLonly evaluatesL � ωo " ateveryvertexandusesGouraudshadingto interpolatevalueswithin thetriangle.

5.2. Renderingwith Arbitrary ReflectanceModels

In computergraphics,when we talk about materialsor materialproperties,whatwe arereally talking aboutis thereflectanceprop-ertiesof a surfacethat definehow light arriving at the surface isscattered.In this part of the tutorial we will explain how surfaceswith almostarbitrarymaterialscanberenderedat interactive rates.

The main idea is to approximatea given reflectancemodel(e.g. for velvet or brushedmetal) so that it can be used withOpenGL.A new algorithmcalled“separabledecomposition”is em-ployed54.

Eachof thetwo directionsthata BRDF usescanbemodeledasa 2D parameter, hencea reflectancemodel usually dependson 4parameters.For an accuraterepresentationthis 4D function couldjust besampled,but graphicshardwaredoesnot support4D textureanda lot of memorywould beneededfor this representation.

Insteada separabledecompositionis used,which approximatesthe4D functionwith aproductof two 2D functions.

fr � ωo & ωi " � g � ωo " ê h � ωi " &L � ωo " � g � ωo " h � ωi " Li � ωi "(� n ê ωi " &Using texture mappingthe equationfor L � ωo " caneasilybe eval-uatedon thegraphicshardware.Eachof these2D functionsg � ωo "andh � ωi " canbe sampledandstoredin a texture map.For everyvertex of every polygonyou have to computeωo andωi anduseitastexture coordinates.Thenthe polygonhasto be texture mappedwith thetexturescontainingg � ωo " andh � ωi " andthecomputedtex-turecoordinates.Blendinghasto besetto modulate,so thatg � ωo "andh � ωi " aremultiplied together. The term Li � ωi "(� n ê ωi " can bemultiplied to theresultof g � ωo " ê h � ωi " by enablingOpenGLlight-ing with only adiffusecomponent.

Renderingof arbitrarymaterialsusingthisapproximationis veryfast becauseit boils down to computingtexture coordinatesandblendingtwo texturemapstogether.

The main trick is to reparameterizethe original 4D reflectancemodelin a smartway, suchthat theapproximationworkswell. Werefer the readerto 54, 56, or 91 for moredetaileddescriptions.SeeFigure30 for anexamplerenderedwith this techniqueat real-timerates.

c�

TheEurographicsAssociation2002.

Page 32: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

Figure 30: Hardwareaccelerated(>60Hz) renderingof ananisotropicmarbleteapot.

5.3. Bump Mapping

Blinn 5 hasshown how wrinkled surfacescanbesimulatedby onlyperturbingthenormalvector, without changingtheunderlyingsur-faceitself. The perturbednormal is thenusedfor the lighting cal-culationsinsteadof the original surfacenormal.This techniqueisgenerallycalledbumpmapping.

If wehaveanotherlook atthelighting modelequation(seeEqua-tion 84), we canseea dependenceon the normal n. As mentionedin Section5.1, thelighting is usuallyonly evaluatedat every vertexandnot within a triangle,sothenormalsfrom theverticesareusedto evaluatetheEquation84.

In orderto simulatewrinkles,bumpmappingrequiresaper-pixelnormal,which is usedfor the evaluationof this equation.Graph-ics cardsnow supportcomplex per-pixel operationwhich allow toperformthisbumpmappingtechniqueat interactive rates58.

Bumpmappingis fairly simpleto implementwith thesenew fea-tures.Thesefeaturesincludeper-pixel dot-products,multiplication,addition,subtraction,solighting modelsusingonly theseoperationscanbeusedto dobumpmapping.For everypixel wesimplyhave toevaluatethelighting model.

Usually the Blinn-Phong model that was introducedin Sec-tion 5.1 is usedto do bump mapping,becausethis model onlymainly usesdot-products.Let us have a look at the lighting modelusingtheBlinn-Phongreflectancemodel:

L � ωo " � kdI � n ê ωi " é ksI � n ê h" NIf this is usedin conjunctionwith bump mapping,thefirst termofthe sum is usually entitleddiffuse bump mappingand the secondterm is entitled specularbump mapping.Using the new per-pixeloperations,thisformulacanbeeasilycomputedateverypixel. First,thenormalsareencodedin a texture map.Thenωi andh arecom-putedonaper-vertex basis(will beinterpolatedacrossthetriangle).Now, thegraphicscardhasto beconfigured,suchthat it computestheequationabove.For moredetails,pleasesee58.

5.4. Bump Mapping with a Spatially VaryingReflectanceModel

As just mentioned,bump mappingusually usessimple lightingmodelsuchastheBlinn-Phongmodel6 for thelighting calculations.

While this is anappropriateandfastmethodto dobumpmapping,itis notveryflexible. TheBlinn-Phongmodeldoesnothavemany pa-rametersthatcanbetweakedto changetheappearanceof thebumpysurfaceandthe chosenparameters(i.e. at leastthe exponent)haveto remainconstantovera polygon.

Wewill introduceanew bumpmappingtechnique55 whichusesa modified versionof the Blinn-Phongmodel,which offers moreflexibility concerningthe parameters.And what’s more, thosepa-rameterscanevenchangeon a per-pixel level. SeeFigure31 for anexampleof whatcanbedone.

Figure 31: Marble spherewith elevated“veins” using thespatiallyvaryingmodifiedBlinn-Phongmodel.

The lighting modelusing the modifiedBlinn-Phongmodelcanbewritten asfollows:

L � ωo " � kd � n ê ωi " éks îï 1 !Ýð h ê t

αx ñ 2 !óò h ê b

αy ô 2 õö*÷This lighting modelsusesnew parameters.The specularpart doesnotdependonthenormaln anymore,but onthetangentt andthebi-normalb. Thesetwo vectorsaredividedby αx resp.αy, whichhaveto be in the range ø 0 & 1ù . The smallerthesevaluesare,the smallerthe highlight will be.The model is anisotropic,which means,thattheshapeandtheorientationof thehighlight dependson theorien-tation of the surface.If differentαx andαy arechosen,the modelis anisotropic,otherwiseit is isotropic.In the anisotropiccase,thetangentandbi-normaldefinethemainorientationof thehighlight.

Theimplementationof thisnew lighting modelworksverymuchlike standardBlinn-Phongbumpmapping,only thatthe t ú αx hastobestoredin onetexturemap,andbú αy hasto bestoredin a secondtexture map.Of course,the graphicscardhasto be setup, that itperformsthenecessarydot-productsetc.,but thiscanbedoneusingOpenGLextensionsor DirectX 8.

OtherBRDFscanbe usedaswell, if they canbe implementedwith thesupportedper-pixel operations.If notthananupcomingfea-turecalleddependenttexturelookupcanbeusedto implementarbi-trary functionson thegraphicshardware.Dependenttexturelookup

c�

TheEurographicsAssociation2002.

Page 33: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

usesthe valuesfrom a texture mapto lookup into anothertexturemap,which nothingelsethanevaluatingan arbitraryfunction.Wereferthereaderto 55 for moredetails.

6. A Spatially Variant BRDF Model for Textiles(Katja Daubert,Jan Kautz)

Oneof the challengesof modelingandrenderingrealisticcloth orclothing is that individual stitchesor knits can often be resolvedfrom normalviewing distances.Especiallywith coarselywovenorknittedfabric,thesurfacecannotbeassumedto beflat, sinceocclu-sion andself-shadowing effects becomesignificantat grazingan-gles.Thisrulesoutsimpletexturemappingschemesaswell asbumpmapping.Similarly, modelingall thegeometricdetail is prohibitiveboth in termsof thememoryrequirementsandrenderingtime. Ontheotherhand,it seemspossibleto composea complex fabricsur-facefrom copiesof individual weaving or knitting patternsunlesstheviewer getscloseenoughto thefabricto noticetheperiodicity.

In this section we will explain a fast and memory-efficientmethodfor modelingandrenderingfabricsthat is basedon repli-catingweaving or knitting patterns.The methodassumeswe haveoneor a small numberof stitch types,which arerepeatedover thegarment.Usinga geometricmodelof a singlestitch,we first com-putethelighting (includingindirectlighting andshadows) usingthemethodsdescribedin 15. By samplingthe stitch regularly within aplanewethengenerateaview dependenttexturewith per-pixel nor-malsandmaterialproperties.

In thenext sectionswe will first take a look at theBRDF modelwe useto capturethe light andview dependentdatafor a stitchorweave.Wewill thenexplainhow to renderclothingusingthismodelandthenbriefly sketchhow to acquiredataandfit themodelto it, tocapturedifferentstitchesor weaves.More informationcanbefoundin 17.

6.1. Representation

We employ a spatiallyvaryingBRDF representationto capturethevariationof theopticalpropertiesacrossthematerial.Thetwo spa-tial dimensionsarepoint sampledinto a 2D array. For eachentryin thearraywe storedifferentparametersfor a Lafortunereflectionmodel61, a lookuptable,aswell asthenormalandtangent.

An entry’s BRDF fr ��ûl & ûv" for thelight direction ûl andtheviewingdirection ûv is givenby thefollowing equation:

fr ��ûl & ûv" � T � ûv" ê fl ��ûl & ûv" & (85)

where fl ��ûl & ûv " denotesthe LafortunemodelandT � ûv " is the lookuptable.TheLafortunemodelitself consistsof a diffusepartρ andasumof lobes:

fl � ûl & ûv" � l Oz ê ò ρ é ∑i üCxi l OxvOx é Cyi l OyvOy é Czi l OzvOzý Ni ô (86)

Beforeevaluatingthe lobe we transformthe light andviewing di-rectioninto thelocal coordinatesystemgivenby thesamplepoint’saveragenormalandtangent,yielding ûl O and ûvO . For moreinforma-tion ontheparametersreferto 17. ThelookuptableT � ûv" storescolorandalphavaluesfor eachof theoriginal viewing directions.Valuesfor directionsnotstoredin thelookuptableareobtainedby interpo-lation.

Thealphavaluestoredin thelookuptableis usedto evaluatethe

transparency. It is not consideredin the multiplication with fl , butusedduringrenderingto determineif thereis a holein themodelata certainpoint for a given viewing direction.The alphavaluesareinterpolatedsimilarly to thecolor values.

Figure32: TheBRDFto rendertheweaveof thisdresscon-sistsof one lobe. Althoughit is possibleto renderBRDFswith more thanonelobe, more passesare requiredto doso.

6.2. Rendering

Now let’s assumewe have thegeometryof a garment,givene.g.asa trianglemeshwith normals,tangentsandtexturecoordinates,andwish to renderit usingtheappearanceof astitchor weave,capturedin themodelexplainedabove.Onmoderngraphicscardstherender-ing canbedonein hardware,without readingbacktheframebuffer.However, themodelis toocomplex to beevaluatedin a singlepass.We have to split the computationinto several passesandcombinetheresultsat theend.Westoreintermediateresultsasimagesof thegarment,in which eachpixel on thegarmentcolor-codestheresultof this pass.At the endwe rendera viewport filling quadandusemulti-texturing with the intermediateresultsto obtainthefinal im-age.

First, let’s take a look at how to evaluatethe color tableT � ûv" .The valuesstoredin the color table resemblea stackof textures,with eachtexture correspondingto a differentviewing direction ûv.We canthink of the color tableasa 3D texture, with the viewingdirectionvaryingin thethirddimension.Thetextureslices,however,arecomputedfor thesettingin which theunderlyingsurfaceis flat,

c�

TheEurographicsAssociation2002.

Page 34: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

with thenormalpoint straightup.Obviously, for ageneralgarment,this is not true.This againmeanswe have to computetheviewingdirectionrelative to the garmentnormals,or, in otherwords,maptheglobalviewing directioninto texturespace,which is definedbythegarment’s per-vertex tangents,bi-normalsandnormals.

Fromthemappedviewing directionwethenneedto decidewhichslice in thetexturestackto use.Thetextureslicesin thelookupta-blearecomputedfor afixed,known, setof directions.Wesetthethevertex’s texturecoordinatefor thethird dimension(r-coordinate)topoint to the slice correspondingto the directionnearestour trans-formedviewing direction.

�What happensthough,if the normalsfor the threeverticesof a

garmenttrianglediverge strongly, anddifferent slicesareselectedacrossthe triangle?Clearly, this would lead to incorrect interpo-lationsacrossthethird texturedimension.We take careof this caseusingmulti-texturing in thefollowing way. For eachvertex wespec-ify threedifferentsetsof texturecoordinates.Thefirst setmapsallverticesof atriangleinto thetexturesliceneededfor thefirst vertex,thesecondsetof texturecoordinatesmapsthetriangleinto theslicecorrespondingto the secondvertex andso forth. Whenrendering,we blendthethreetexturesin sucha way, thata texture is fadedtozeroaswe approachthe two verticesnot correspondingto thecur-rent slice.This way, in a trianglewith stronglydiverging normals,theresultingslicesareblendednaturallyoverthetriangle.Theresultof thispassis animageof thegarment,in whicheachgarmentpixelholdstheresultfor T � ûv" .

Next, we have to evaluatethe lobes.The main problemhere,isthatcurrentgraphicshardwareis notcapableof computingxNi onaper-pixel basis.Thesolutionhereis to precomputeatextureholdingtheresultsfor xNi andusedependenttexturing,asexplainedin 55.

The remainingstepssimply combinethe resultsfor T � ûv" , thelobesevaluationwith ρ and l Oz, which is easyto do usingregistercombiners.

6.3. Data Acquisition and Fitting

Now we know how to rendera garmentusinganalreadycomputedBRDF model, let’s take a look at how we can fit parametersfora modelrepresentingour own stitch. We will needa modelof thestitchesmicro-geometryto doso.

Then we are readyto obtain the requireddata.As mentionedabove, thespatialvariationsof thefabricpatternarestoredasa 2Darrayof BRDF models.Apart from radiancesamplesr ��ûl & ûv " for allcombinationsof viewing andlight directions,wealsoneedanaver-agenormal,anaveragetangent,andanalphavaluefor eachviewingdirectionfor eachof theseentries.

We useanextensionof Heidrichet al.’s algorithm43 to trianglemeshes15, which allows usto computethedirectandindirect illu-minationof a trianglemeshor parametricsurface(representingthestitch geometry)for a given viewing andlight directionpervertexin hardware(for detailssee15). In orderto accountfor maskingandþ

In principle,on moderngraphicscards,themappingandsettingof the r-coordinatecan be computedin a vertex program,whichwould resultin betterrenderingrates.However, computingtheap-proximationof thearccosandarctanfunction,aswell asanintegercastin avertex programis quitetricky to code.

Figure 33: Woolen sweaterrendered using our approach(knit andperl loops).

partsof therepeatedgeometrybeingvisible throughholes,wepastetogethermultiplecopiesof thegeometry.

Figure 34: Computingthesamplinglocationsfor the radi-ancevalues.Left: topview, middle:projection,right: result-ing samplinglocations,discarding samplesat holes.

Now weneedto collecttheradiancedatafor eachsamplingpoint.Weobtainthe2D samplinglocationsby first definingasetof evenlyspacedsamplingpoints on the top faceof the model’s boundingbox, ascanbeseenon the left in Figure34. Thenwe projectthesepointsaccordingto thecurrentviewing direction(seeFigure34 inthemiddle)andcollect the radiancesamplesfrom thesurfacevisi-ble throughthese2D projections(seeFigure34 right), similarly toobtaininga light field.

As thestitchgeometrycanhave holes,theremight beno surfacevisible at a samplingpoint for a certainviewing direction.Westorethis informationasa booleantransparency in thealphachannelforthatsample.Multiple levelsof transparency valuescanbeobtainedby super-sampling,i.e. consideringtheneighboringpixels.

In orderto computethe normals,we displaythe sceneonceforeachviewing directionwith thenormalscodedascolor values.Anaveragenormal is computedby addingthe normalsseparatelyforeachsamplingpointandaveragingthemat theend.

Oncewehaveacquiredall thenecessarydata,weuseit to find anoptimalsetof parametersfor theLafortunemodelfor eachentryinthearrayof BRDFs.This fitting procedurecanbedivided into twomajorstepswhichareappliedalternately. At first, theparametersofthe lobesarefit. Then,in thesecondstep,theentriesof the lookuptableareupdated.Now thelobesarefit againandsoon.

c�

TheEurographicsAssociation2002.

Page 35: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

Givena setof all radiancesamplesandthecorrespondingview-ing andlight directionsacquiredfor onesamplingpoint, thefittingof the parametersof the Lafortunemodel fl requiresa non-linearoptimizationmethod.As proposedin 61, weappliedtheLevenberg-Marquardtalgorithm75 for this task.

After fitting the lobeparameters,we needto adaptthesamplingpoint’s lookup tableT � ûv" . Eachentry of the tableis fit separately.This time only thoseradiancesamplesof the samplingpoint thatcorrespondto theviewing directionof thecurrententryareconsid-ered.Theoptimalcolor for oneentryminimizesthefollowing setofequations:ÿ

r ��ûl1 & ûv " & ÷�÷�÷ & r ��ûlR & ûv"�� T � T � ûv" ÿ fl ��ûl1 & ûv" & ÷�÷�÷ & fl ��ûlR & ûv"�� T(87)

wherer � ûl1 & ûv" & ÷�÷�÷ & r � ûlR & ûv" aretheradiancesamplesof thesamplingpointwith thecommonviewing direction ûv andthedistinctlight di-rections ûl1 & ÷�÷�÷ & ûlR. The currentlyestimatedlobesareevaluatedforevery light directionyielding fl � ûli & ûv" . Treatingthe color channelsseparately, Equation87 canbe rewritten by replacingthe columnvectoron its left sideby ûr � ûv" , the vectoron its right sideby ûf � ûv" ,yielding ûr � ûv " � T � ûv" ê ûf � ûv " . The leastsquaressolutionto this equa-tion is givenby

T � ûv" ��� ûf � ûv" ë ûr � ûv"��� ûf � ûv" ë ûf � ûv"�� (88)

where � ê ë ê � denotesthedotproduct.Thisis doneseparatelyfor everycolor channelandeasilyextendsto additionalspectralcomponents.

To further improve the resultwe alternatelyrepeatthe stepsoffitting the lobesandfitting the lookup table.The iterationstopsassoonastheaveragedifferenceof thepreviouslookuptable’s entriesto thenew lookuptable’s entriesis below acertainthreshold.

In additionto thecolor, eachentry in the lookup tablealsocon-tainsanalphavalueindicatingtheopacityof thesamplepoint.Thisvalueis fixedfor every viewing directionandis not affectedby thefitting process.Insteadit is determinedthroughray-castingduringthedataacquisitionphase.

6.3.1. Mip-Map Fitting

Thesamefitting wehavedonefor everysinglesamplepointcanalsobeperformedfor groupsof samplepoints.Let a samplepoint beatexel in a texture.Collectingall radiancesamplesfor four neighbor-ing samplepoints,averagingthe normals,fitting the lobesandtheentriesof thelookuptablethenyieldstheBRDFcorrespondingto atexel on thenext highermip-maplevel.

By groupingeven more samplepoints, further mip-maplevelscanbe generated.The overall effort per level staysthe samesincethesamenumberof radiancesamplesareinvolvedat eachlevel.

Figure 35: A roughlywoventablecloth.Left: Aliasingarti-factsare clearly visible if no mip-mappingis used.Right:usingseveral mip-mappinglayers.

References

1. G. Baciu,W. Wong,andH. Sun. Hardware-AssistedVirtualCollisions. In Proceedingsof theACM Symposiumon VirtualRealitySoftwareandTechnology, VRST, Taipei,Taiwan, pages145–151,1998. 17

2. David Baraff andAndrew Witkin. LargeStepsin Cloth Sim-ulation. In MichaelCohen,editor, SIGGRAPH98ConferenceProceedings, Annual ConferenceSeries,pages43–54.ACMSIGGRAPH,AddisonWesley, 1998. 4, 14, 16

3. David Baraff and Andrew Witkin. Large Stepsin ClothSimulation. Computer Graphics, 32(Annual ConferenceSeries):43–54,1998. 20

4. R. Bigliani andJ. W. Eischen. Collision Detectionin ClothModeling.In ClothandClothingin ComputerGraphics. ACMSIGGRAPH,1999. 17

5. J. Blinn. Simulationof Wrinkled Surfaces. In ProceedingsSIGGRAPH, pages286–292,August1978. 28

6. J. Blinn. Modelsof Light ReflectionFor ComputerSynthe-sizedPictures. In ProceedingsSIGGRAPH, pages192–198,July1977. 28

7. DieterBraess.Finite Elemente. Springer, 1997. 4

8. S. Cameron.EnhancingGJK: ComputingMinimum Penetra-tion DistancesBetweenConvex Polyhedra.In ProceedingsoftheInt. Conf. OnRoboticsandAutomation, pages3112–3117,1997. 20

9. PhilippeG. Ciarlet. MathematicalElasticity. Vol. I. North-HollandPublishingCo.,Amsterdam,1992. 4

10. J. D. Cohen,M. C. Lin, D. Manocha,and M. Ponamgi. I-COLLIDE: An Interactive andExactCollisionDetectionSys-temfor Large-ScaleEnvironments.In Symposiumon Interac-tive3D Graphics, pages189–196,218,1995. 17

11. M. F. CohenandD. P. Greenberg. Thehemicube:A radiositysolutionfor complex environments.Symposiumon Computa-tional Geometry, 19(3):31–40,22–26July1985. 25

12. Martin Courshesnes,Pascal Volino, and Nadia MagnenatThalmann.VersatileandEfficient Techniquesfor SimulatingCloth andOtherDeformableObjects.In RobertCook,editor,SIGGRAPH95 ConferenceProceedings, Annual Conference

c�

TheEurographicsAssociation2002.

Page 36: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

Series,pages137–144.ACM SIGGRAPH,AddisonWesley,1995. 20

13. Kristian J. DanaandShreeK. Nazar. 3D Textured SurfaceModeling. WIAGMORWorkshopCVPR’99, 1999. 22

14. Kristian J. Dana,Bram van Ginneken, ShreeK. Nazar, andJanJ. Koenderink. Reflectanceand Texture of Real-WorldSurfaces.ACM TransactionsonGraphics, 1999. 22, 23

15. K. Daubert,W. Heidrich,J. Kautz,J.-M. Dischler, andHans-PeterSeidel. Efficient Light TransportUsing PrecomputedVisibility. TechnicalReportMPI-I-2001-4-003,Max-Planck-Institut für Informatik,2001. 29, 30

16. KatjaDaubert,HendrikP. A. Lensch,WolfgangHeidrich,andHans-PeterSeidel. Efficient cloth modelingand rendering.pages63–70. 24

17. KatjaDaubert,HendrikP. A. Lensch,WolfgangHeidrich,andHans-PeterSeidel. Efficient Cloth Modeling andRendering.In Proc.of EurographicsWorkshoponRendering, 2001. 29

18. Katja DaubertandHans-PeterSeidel. Hardware-basedvolu-metricknit-wear. Eurographics’02, 2002. 24

19. P. Debevec,T. Hawkins, C. Tchou,H.-P. Duiker, W. Sarokin,andM. Sagar. Acquiring thereflectancefield of ahumanface.Proceedingsof ACM SIGGRAPH2000, 2000. 21

20. Paul Debevec. Renderingsyntheticobjectsinto real scenes:Bridging traditionalandimage-basedgraphicswith global il-luminationandhigh dynamicrangephotography. In MichaelCohen,editor, SIGGRAPH98 ConferenceProceedings, An-nual ConferenceSeries,pages189–198.ACM SIGGRAPH,AddisonWesley, July1998. ISBN 0-89791-999-8.25

21. Gilles Debunne, Mathieu Desbrun,Marie-Paule Cani, andAlan H. Barr. DynamicReal-TimeDeformationsusingSpaceandTime Adaptive Sampling. In ComputerGraphics(SIG-GRAPH01Proceedings), 2001. 17

22. MathieuDesbrun,PeterSchröder, andAlan Barr. InteractiveAnimationof StructuredDeformableObjects.In GraphicsIn-terface, pages1–8,June1999. 2, 16

23. ManfredoP. DoCarmo. Differential Geometryof CurvesandSurfaces. Prentice-HallInc., Englewood Cliffs, New Jersey,1976. 4

24. B. Eberhardt,A. Weber, and W. Straßer. A Fast,Flexible,Particle-SystemModel for Cloth Draping. IEEE ComputerGraphicsandApplications, 16(5):52–60,September1996. 6

25. Bernhard Eberhardt, Olaf Etzmuß, and Michael Hauth.Implicit-Explicit Schemesfor Fast Animation with ParticleSystems.In N. Thalman-Magnenat,D. Thalman,andB. Ar-naldi, editors, Proceedingsof the Eurographics Workshopon ComputerAnimationand Simulation(EGCAS-00), pages137–154.Springer, 2000. 16

26. Jeffrey W. Eischen,ShiganDeng, and Timothy G. Clapp.Finite-ElementModelingandControlof Flexible FabricParts.IEEE Computer Graphics and Applications, 16(5):71–80,1996. 5

27. Olaf EtzmußandJoachimGroß. Deriving a particlesystemfrom continuummechanicsfor the animationof deformable

objects.to appearin IEEE Transactionson VisualizationandComputerGraphics, 2002. 6

28. Olaf Etzmuß,MichaelKeckeisen,StefanKimmerle,JohannesMezger, MichaelHauth,andMarkusWacker. A Cloth Mod-elling System for Animated Characters. In ProceedingsGraphiktag, 2001. 21

29. J. J. Hsia I. W. Ginsberg F. E. Nicodemus,J. C. Richmondand T. Limperis. Reflectancenomenclatureand directionalreflectanceandemissivity. AppliedOptics, pages1474–1475,1970. 22

30. B. Ganster, R. Klein, M. Sattler, andR. Sarlette. Real-timeshadingof foldedsurfaces.CGI 2002Proc., 2001. 25, 26

31. E. G. Gilbert,D. W. Johnson,andS.S.Keerthi.A FastProce-dure for Computingthe DistanceBetweenComplex Objectsin Three-DimensionalSpace. IEEE Journal of RoboticsandAutomation, 4(2),1988. 20

32. Steven J. Gortler, RadekGrzeszczuk,RichardSzeliski, andMichael F. Cohen. The lumigraph. ComputerGraphics,30(AnnualConferenceSeries):43–54,1996. 21

33. S.Gottschalk,M. C. Lin, andD. Manocha.OBBTree:A Hier-archicalStructurefor RapidInterferenceDetection.ComputerGraphics, 30(AnnualConferenceSeries):171–180,1996. 17,18

34. NedGreene.Environmentmappingandotherapplicationsofworld projection.IEEEComputerGraphicsandApplications,6(11):21–29,November1986. 25

35. EduardGröller, RenéT. Rau,andWolfgangStraßer. Model-ing textiles as threedimensionaltextures. In Xavier Pueyoand PeterSchröder, editors,EurographicsRenderingWork-shop1996, pages205–214,New York City, NY, June1996.Eurographics,SpringerWien. ISBN 3-211-82883-4.24

36. JoachimGroß, Olaf Etzmuß,Michael Hauth, and GerhardBueß. Modelling viscoelasticityin soft tissues.In Int. Work-shop on DeformableModeling and Soft TissueSimulation,2001. 7

37. LeonidasJ. Guibas,David Hsu, andLi Zhang. H-walk: hi-erarchicaldistancecomputationfor moving convex bodies.inproceedingsof the fifteenthannualsymposiumon computa-tional geometry. pages265–273,Miami, FL, USA, January1999.Associationfor ComputingMachinery. 17

38. E. HairerandG.Wanner. SolvingOrdinaryDifferentialEqua-tionsI & II. Springer-Verlag,Berlin, 1996. 8

39. E. HairerandG.Wanner. SolvingOrdinaryDifferentialEqua-tionsII. Springer-Verlag,Berlin, 1996. 11, 12

40. ErnstHairerandGerhardWanner. Stiff differentialequationssolved by Radaumethods. J. Comput.Appl. Math., 111(1-2):93–111,1999. 15

41. MichaelHauthandOlaf Etzmuß.A High PerformanceSolverfor theAnimationof DeformableObjectsusingAdvancedNu-mericalMethods.In Proc.Eurographics2001, 2001. 15, 16,21

42. TaosongHe. FastCollision DetectionUsingQuOSPOTrees.Proceedingsof the1999symposiumon Interactive3D graph-ics, pages55–62,1999. 18

c�

TheEurographicsAssociation2002.

Page 37: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

43. W. Heidrich,K. Daubert,J. Kautz,andH.-P. Seidel. Illumi-natingMicro GeometryBasedon PrecomputedVisibility. InProceedingsSIGGRAPH, July 2000. 30

44. Wolfgang Heidrich. View-independentenvironment maps.In Proceedingsof Eurographics/SIGGRAPHWorkshop onGraphicsHardware ’98, 1998. 25

45. P. Hendrik andJ. Kautz. Image-basedreconstructionof spa-tially varyingmaterials.Proceedingsof EurographicsRender-ing Workshopt’01, 2001. 22

46. http://www.cs.columbia.edu/CAVE/curet/. 22

47. http://www.ijg.org/. Independentjpeg group. 24

48. http://www.povray.org. 24

49. Philip M. Hubbard. ApproximatingPolyhedrawith Spheresfor Time-Critical Collision Detection. ACM TransactionsonGraphics, 15(3):179–210,1996. 18

50. LukasyJanskiandVolker Ulbricht. Numericalsimulationofmechanicalbehaviour of textile surfaces.Zeitschrift für Ange-wandteMathematikundMechanik, 80(S2):S525–S526,2000.5

51. HenrikWannJensen.RealisticImage SynthesisUsingPhotonMapping. A. K. Peters,Natick,MA, 2001. 24

52. J. T. Kajiya. Therenderingequation.volume20,pages143–150,August1986. 24

53. Young-Min Kang, Jeong-HyeonChoi, Hwan-GueCho, Do-Hoon Lee,andChan-JongPark. Real-timeAnimation Tech-nique for Flexible andThin Objects. In WSCG, pages322–329,February2000. 2

54. J.KautzandM. McCool. Interactive Renderingwith ArbitraryBRDFsusingSeparableApproximations.In 10thEurograph-icsRenderingWorkshop1999, pages281–292,June1999. 27

55. J.KautzandH.-P. Seidel.TowardsInteractive BumpMappingwith Anisotropic Shift-Variant BRDFs. In Hardware Work-shop2000, pages51–58,August2000. 28, 29, 30

56. J. Kautz, C. Wynn, J. Blow, C. Blasband,A. Ahmad, , andM. McCool. Achieving Real-Time Realistic Reflectance.GameDeveloperMagazine, January2001. 27

57. S.Kawabata.TheStandardizationandAnalysisof HandEval-uation. TheTextile MachinerySocietyof Japan,Osaka,1980.3

58. M. Kilgard. A PracticalandRobustBump-mappingTechniquefor Today’s GPUs. NVIDIA Corporation,April 2000. Avail-ablefrom http://www.nvidia.com. 28

59. E. Klingbeil. Tensorrechnung für Ingenieure. BI Wis-senschaftsverlag,1989. 4

60. JamesT. Klosowski, Martin Held, JosephS. B. Mitchell,Henry Sowizral, and Karel Zikan. Efficient Collision De-tection Using Bounding Volume Hierarchies of k-DOPs.IEEE Transactionson VisualizationandComputerGraphics,4(1):21–36,1998. 17, 18

61. E. Lafortune,S. Foo, K. Torrance,andD. Greenberg. Non-Linear Approximation of ReflectanceFunctions. In SIG-GRAPH’97 Proceedings, pages117–126,August1997. 29,31

62. Eric P. F. Lafortune,Sing-ChoongFoo, KennethE. Torrance,and Donald P. Greenberg. Non-linearapproximationof re-flectancefunctions. Proc. SIGGRAPH97, pages117–126,1997. 22

63. L. D. Landau and E. M. Lifschitz. Elastizitätstheorie.AkademischerVerlag,1989. 4

64. Eric Larsen,Stefan Gottschalk,Ming C. Lin, and DineshManocha.Fastproximity querieswith sweptspherevolumes.TechnicalReport TR99-018,Departmentof ComputerSci-ence,Universityof North Carolina,ChapelHill, 1999. 17

65. GregoryJ.WardLarson.Measuringandmodelinganisotropicreflection.Proc.SIGGRAPH92, pages265–272,1992. 22

66. Marc Levoy andPat Hanrahan.Light field rendering. Com-puter Graphics, 30(AnnualConferenceSeries):31–42,1996.21

67. M. Lin andS. Gottschalk.Collision DetectionbetweenGeo-metricModels:A Survey. In Proceedingsof IMA ConferenceonMathematicsof Surfaces, 1998. 17

68. M. C. Lin andJ. F. Canny. A FastAlgorithm for IncrementalDistanceCalculation. In IEEE International ConferenceonRoboticsandAutomation, pages1008–1014,1991. 20

69. M. C. Lin andD. Manocha. FastInterferenceDetectionBe-tweenGeometricModels. TheVisual Computer, 11(10):542–551,1995. 20

70. Xinguo Liu, YizhouZu, andHeung-YeungShum.Synthesiz-ing BidirectionalTexture Functionsfor Real-World Surfaces.SIGGRAPH2001, 2001. 22, 24

71. Tom Malzbender, Dan Gelb, andHansWolters. Polynomialtexture maps. In EugeneFiume, editor, SIGGRAPH2001,ComputerGraphicsProceedings, Annual ConferenceSeries,pages519–528.ACM Press/ ACM SIGGRAPH,2001. 22

72. JohannesMezger, Stefan Kimmerle, and Olaf Etzmuß.Progressin Collision DetectionandResponseTechniquesforClothAnimation. (Submitted),2002. 18, 20

73. B. Mirtich. VClip: Fast and Robust PolyhedralCollisionDetection. ACM Transactionson Graphics, 17(3):177–208,1998. 17, 20

74. M. MooreandJ. Wilhelms. Collision detectionandresponsefor computeranimation.volume22of AnnualConferenceSe-ries, pages289–298.ACM SIGGRAPH,July1988. 18

75. W. Press,S. Teukolsky, W. Vetterling,andB. Flannery. Nu-merical Recipesin C: The Art of ScientificComputing(2nded.). CambridgeUniversityPress,1992. ISBN 0-521-43108-5. 31

76. Xavier Provot. DeformationConstraintsin a Mass-SpringModel to DescribeRigid Cloth Behavior. In GraphicsInter-face’95, pages147–154,1995. 2, 16

77. Xavier Provot. CollisionandSelf-CollisionHandlingin ClothModel Dedicatedto DesignGarments.In GraphicsInterface’97, pages177–189,1997. 20, 21

78. W. C. Rheinboldt.Methodsfor SolvingSystemsof NonlinearEquations, volume70 of CBMS-NSFregional conferencese-ries in appliedmathematics. SIAM, secondedition,1998. 14,15

c�

TheEurographicsAssociation2002.

Page 38: Tutorial T3: Cloth Animation and Rendering

Hauth,Etzmuss,Eberhardt, Daubert,Kautz/ ClothAnimationandRendering

79. Luc Robert. Cameracalibration without feature extrac-tion. ComputerVision and Image Understanding: CVIU,63(2):314–325,1996. 23

80. FrancoisSillion andClaudePuech.RadiosityandGlobal Illu-mination. MorganKaufmann,SanFrancisco,CA, 1994. 25

81. HansStephaniandGerhardKluge. Theoretische Mechanik.SpektrumAkademischerVerlag,1995. 4

82. D. TerzopoulosandK. Fleischer. Deformablemodels. TheVisual Computer, 4:306–331,1988. 4

83. G. vandenBergen. Efficient Collision Detectionof ComplexDeformableModelsusingAABB Trees.Journal of GraphicsTools, 2(4):1–14,1999. 18

84. T. Vassilev, B. Spanlang,andY. Chrysanthou.FastCloth An-imation on Walking Avatars. In ComputerGraphicsForum(Proc.of Eurographics), 2001. 17

85. P. Volino and N. Magnenat-Thalmann.Developing simula-tion techniquesfor an interactive clothing system. In Inter-national Conferenceon Virtual Systemsand Multimedia’97,pages109–118,1997. 4

86. P. Volino and N. Magnenat-Thalmann. ImplementingfastCloth Simulation with Collision Response. In ComputerGraphicsInternationalProceedings, 2000. 14

87. P. Volino and N. Magnenat-Thalmann. ImplementingfastCloth Simulation with Collision Response. In ComputerGraphicsInternational, June2000. 20

88. P. Volino and N. Magnenat-Thalmann. Virtual Clothing.Springer, 2000. 20

89. M. H. ChuW-C.Chen,J-Y. BouguetandR.Grzeszczuk.Lightfield mapping:Efficient representationandhardware render-ing of surfacelight fields. Proceedingsof ACM SIGGRAPH2002, 2002. 21

90. DanielN. Wood,Daniel I. Azuma,KenAldinger, Brian Cur-less,Tom Duchamp,David H. Salesin,andWernerStuetzle.Surfacelight fields for 3D photography. In Kurt Akeley, ed-itor, Siggraph 2000,ComputerGraphicsProceedings, pages287–296.ACM Press/ ACM SIGGRAPH/ AddisonWesleyLongman,2000. 21

91. C. Wynn. BRDF-BasedLighting. Technicalreport,NVIDIACorporation,2000. 27

92. G. Zachmann. Rapid Collision Detectionby DynamicallyAligned DOP-Trees.Proc.of IEEE,VRAIS’98Atlanta, 1998.18

93. DongliangZhangandMatthew M.F. Yuen. Collision Detec-tion for ClothedHumanAnimation.Proceedingsof thePacificGraphics, 2000. 17

c�

TheEurographicsAssociation2002.