A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for...

14
A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra Johannes Mezger, Bernhard Thomaszewski, Simon Pabst and Wolfgang Straßer email: [email protected] [email protected] [email protected] [email protected] WSI-2007-01 July 2007 Graphisch-Interaktive Systeme Wilhelm-Schickard-Institut Universit¨ at T¨ ubingen D-72076 T¨ ubingen, Germany WWW: http://www.gris.uni-tuebingen.de c WSI 2007 ISSN 0946-3852

Transcript of A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for...

Page 1: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

A Finite Element Method for InteractivePhysically Based Shape Modelling with

Quadratic TetrahedraJohannes Mezger, Bernhard Thomaszewski, Simon Pabst

and Wolfgang Straßeremail: [email protected]

[email protected]@gris.uni-tuebingen.de

[email protected]

WSI-2007-01July 2007

Graphisch-Interaktive SystemeWilhelm-Schickard-Institut

Universitat TubingenD-72076 Tubingen, Germany

WWW: http://www.gris.uni-tuebingen.de

c© WSI 2007ISSN 0946-3852

Page 2: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

A Finite Element Method for Interactive Physically Based ShapeModelling with Quadratic Tetrahedra

J. Mezger, B. Thomaszewski, S. Pabst and W. StraßerGraphical-Interactive Systems (GRIS)

Wilhelm Schickard Institute for Computer Science, Tubingen, Germany

mezger,thomaszewski,pabst,[email protected]

Figure 1. Plastic deformation of a toy. On the second model the plastic strain is visualised. The twomodels on the right show the approximation with the quadratic finite elements.

Abstract

We present an alternative approach to standard geometric shape editing using physically-based simulation. Withour technique, the user can deform complex objects in real-time. The enabling technology of this approach is a fastand accurate finite element implementation of an elasto-plastic material model, specifically designed for interactiveshape manipulation. Using quadratic shape functions, we avoid the inherent drawback of volume locking exhibited bymethods based on linear finite elements. The physical simulation uses a tetrahedral mesh, which is constructed froma coarser approximation of the detailed surface. Having computed a deformed state of the tetrahedral mesh, thedeformation is transferred back to the high detail surface. This can be accomplished in an accurate and efficient wayusing the quadratic shape functions. In order to guarantee stability and real-time frame rates during the simulation,we cast the elasto-plastic problem into a linear formulation. For this purpose, we present a corotational formulationfor quadratic finite elements. We demonstrate the versatility of our approach in interactive manipulation sessionsand show that our animation system can be coupled with further physics-based animations like, e.g. fluids andcloth, in a bi-directional way.

CR Categories: I.3.5 [Computer Graphics]: Physically based modeling

Keywords: Mesh deformation, quadratic finite elements, plasticity

1

Page 3: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

1 Introduction

With the advent of 3D data acquisition devices suchas structured light scanners, highly detailed geomet-ric surface models are now easily available. The lastten years have seen many approaches for editing suchsurfaces, all of which somehow strive to achieve glob-ally smooth deformation while preserving surface de-tails and shape volume. It is however remarkable thatall of the recent methods depart from a purely geomet-ric view of this problem leading to approaches whichare rather detached from the actual problem. Insteadof taking such a circuitous route, we propose to con-sider this problem as one of elasto-plastic modelling,which means resorting to physically-based simulation -a simple and direct approach.

The reason why this way of editing highly detailedsurfaces has not been considered before is probablydue to a common misconception. For physical sim-ulation, mass-spring systems remain the most widelyused technique in the computer graphics community.Although they allow for efficient implementations, itis a well known fact that they are inherently unableto reproduce even simple isotropic materials correctlyand fail to preserve volume. In contrast, (higher order)finite elements excel at these challenges. However, itis commonly believed that finite elements interchange-ably stand for high computation times. In this work,we show that even a highly accurate non-linear ap-proach can run at interactive rates, thus overcomingany justification for unwieldy mass-spring models.

Our approach originates from the theory of elasto-plasticity and is thus completely based on physical de-formation, allowing for the most intuitive interaction.The plasticity model accounts for permanent deforma-tions, which we think approximates the real problem ofshape manipulation best. We allow the user to interac-tively assign different elastic and plastic properties aswell as constraints to selected regions of the object. Inthis way, material resilience and reversibility of defor-mations can be adapted to the current editing objec-tives. We emphasise that no artificial enforcing of vol-ume preservation is needed since this property directlyfollows from the physical approach. Additionally, thereis no need for explicitly distributing deformations in-duced by handles. Deformation automatically propa-gates through the body according to the forces appliedby the user through different interaction tools. Due tothe physical nature of our approach, the integration ofshape manipulation within complex animations comesat no extra cost. As we show in our examples, thesoft body simulation and manipulation can directly becombined with fluid or cloth simulation.

The work presented in this paper is not the firstto address interactive physically-based simulation. Forthe sake of computational efficiency, existing FE-basedapproaches rely on linear finite elements, which sufferfrom volume locking. This greatly reduces their appli-cability in the context of shape editing, where volumepreservation is highly important. In contrast, our ap-proach uses quadratic finite elements, which excel atpreserving volume and offer good accuracy even witha smaller number of elements. To guarantee stabilityand real-time frame rates during simulation, a linearproblem formulation is indispensable (see Sec. 5).

The rest of this paper is organised as follows. Thenext section reviews previous work from related fields.Sec. 3 provides the mathematical and physical back-ground for this work, while the fourth section ex-plains our novel finite element approach. The sub-sequent section presents our implicit integration ofelasto-plasticity. Results are presented in Sec. 7 andthe paper concludes with a discussion and an outlookon future work.

2 Related Work

Geometric Mesh Editing The problem of meshediting can most simply be formulated as finding waysto create globally smooth and visually pleasing defor-mations while preserving surface details. Disturbingartefacts like surface distortion or significant change involume have to be avoided. As a further requirement,a practically useful shape deformation algorithm hasto be fast enough to deliver real-time frame rates andmust offer intuitive interaction facilities [BK04].

The first approaches relied on multi-resolution rep-resentations, decomposing a model into low frequencycomponents and detail displacements [ZSS97, KCVS98,BK03]. A global deformation technique like free formdeformation [SP86] is first applied to the coarse repre-sentation and the geometric detail is then transferredback to the deformed mesh. Because this manipula-tion technique is inherently local, artefacts are likelyto occur in highly deformed regions.

A more recent approach to preserving surface detailsunder global deformations is based on differential co-ordinates [Ale03]. In this context, detail preservationcan be formulated as the minimization of an energyfunctional which is related to the change in differentialcoordinates after deformation [SLCO+04, LSCO+04,YZX+04]. The deformation (i.e. the editing objective)itself is incorporated as a set of positional constraintson the solution of the linear system arising from theminimization problem. Unfortunately, differential co-

2

Page 4: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

ordinates are not rotation-invariant, which means thatlarge rotational deformations lead to disturbing surfacedistortions. In the case of shape blending these rota-tions can be factored out locally [ACOL00]. However,for general shape editing the problem is significantlyharder since the final state is not known in advance.In this context, pyramid coordinates [SK04] offer in-variance under rigid body transformations but lead toa non-linear equation system with the associated com-putational and stability related problems. As an alter-native, the rotation-invariant differential coordinatesproposed by Lipman et al.[LSLCO05] only require thesuccessive solution of two linear systems. However, sur-face and volume distortion still occurred for large defor-mations - a problem which was resolved in [LCOGL07]using a quasi-linear approach.

Another important deformation constraint is thepreservation of volume [RSB96]. Combining differ-ential coordinates with an approach for explicit vol-ume preservation, Zhou et al. [ZHS+05] minimiseboth the change in surface details and shape vol-ume. The latter was further improved in [HSL+06]by allowing for general non-linear constraints within aquasilinear approach. Lastly, the skeleton constraint[WG97, HSL+06] is also of interest when manipulatingarticulated shapes.

Real-time Physically-based Simulation Phys-ically-based simulation of deformable objects in real-time has first been investigated in the context of gen-eral animation [JP99]. As another important applica-tion, virtual surgery simulation poses most stringentrequirements on both speed and accuracy. The lat-ter requirement has spurred the development of ap-proaches based on continuum mechanics [PDA00] andfinite elements [MDM+02, HGS03]. In order to reducethe computational complexity the problem is usuallyrecast into a linear formulation using linear finite ele-ments and a small strain measure coupled with meth-ods for extracting rotations [MDM+02, HS04]. Unfor-tunately, linear finite elements are very susceptible tolocking (see Fig. 2), which degrades accuracy substan-tially and lets soft objects appear overly rigid. Thisproblem can be greatly alleviated using higher orderbasis functions as demonstrated in [MS06]. The lat-ter approach, however, uses Newton iterations to han-dle geometric non-linearities and can therefore fail infinding a solution within a given period of time. An-other problem that can be encountered during simu-lation is the inversion of tetrahedra due to excessiveforces. A way to deal with this issue has been pro-posed in [ITF04].

(a) (b)

Figure 2. Visualisation of pressure in a softtoy exposed to gravity with 1200 linear (a)and 234 quadratic tetrahedra (b). Both sim-ulations are real-time, but the linear modelsuffers from significant locking.

Plasticity The existing literature on mathematicaland numerical plasticity is abundant and we refer theinterested reader to [ZT00] and the references therein.In computer graphics, Terzopoulos et al. [TF88] werethe first to incorporate plasticity and fracture effectsinto deformable object simulation. A simple linear elas-tic material with kinematic hardening was mapped totheir computational framework combining viscoelasticspring-dashpot units and plastic slip units. O’Brien etal. [OBH02] resorted to the more accurate continuum-mechanics setting, using the von-Mises yield criterionwith linear plasticity and a second elastic regime whichlimits the plastic strain. They used an explicit integra-tion scheme, which greatly simplifies implementationbut leads to high computation times and only con-ditional stability. In [MG04] Muller et al. extendedtheir approach based on stiffness-warping to accountfor plasticity effects using a model similar to [OBH02].However, since only finite tetrahedra with linear shapefunctions are used, curved surfaces are coarsely approx-imated, and nearly incompressible materials are likelyto suffer from locking. For the plasticity model, webasically draw on the same idea and combine it withkinematic hardening and a prediction step for the elas-tic strain.

3 Background of Physical Soft BodySimulation

In this section we will briefly outline some mathe-matical and physical notions underlying our soft bodysimulator. We start with a short account of continuummechanics.

3

Page 5: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

3.1 Continuum Mechanics

In the most abstract view of continuum mechanics,there are three important concepts: the strain εεε, whichis a dimensionless deformation measure, the stress σσσ,which is a force per unit area, and a material law re-lating the two to each other as σσσ = C(εεε) , where C isthe elasticity tensor. For the simplest case of linearisotropic elasticity, this tensor has only two indepen-dent entries which are related to the well known Lameconstants λ and µ. Quantities in relation to the de-formed state of the body (e.g. strain) are commonlyexpressed in terms of a fixed reference configurationΩ ⊂ R. The configuration mapping ϕϕϕ : Ω × [0, T ]transforming material particles from their reference po-sitions x0 to current positions x can be written as

x(t) = ϕϕϕ(x0, t) = id +u(x0, t) ,

where u is a displacement field from the initial con-figuration. For later use, we define the deformationgradient as

∇ϕϕϕ = ∂ϕϕϕ

∂x0 .

The strain energy of a deformed configuration is de-fined as

W =∫

Ωεεε(u) : σσσ(u) dΩ ,

and the kinetic energy T is a function of the velocityof the object,

T =∫

Ω

12 |u

2|ρ dΩ ,

where ρ is the mass density. Including viscous stresscontributions σσσv, the total energy Π(u) follows as

Π(u) =∫

Ωεεε(u) : σσσ(u) +εεε(u) : σσσv(u) dΩ + 1

2 |u2|ρ dΩ .

Carrying out a variation of the above expression andtaking into account external forces acting on the body,a partial differential equation (PDE) is obtained, whichis the starting point for numerical discretisation.

3.2 Finite Element Discretisation

In order to approximate the solution of the afore-mentioned PDE, a subspace of finite dimension has tobe defined. We employ isoparametric finite elementsthat discretise the problem in 3D space using the Ritz-Galerkin method, which is the favoured technique instructural mechanics.

The discretisation arises from a continuous parti-tioning of the domain into tetrahedra with locally de-fined basis functions N that interpolate the vertices Pand their displacements U, e.g.

ϕϕϕ(x) =N−1∑i=0

PiNi(x) (1)

withN−1∑i=0

Ni = 1, Ni(Pj) = δij

and

∇ϕϕϕ(x) = ∇u(x)+I = U ∇N(x)+I, I = diag(1)3×3 .

This gives the ODE

F(U) + Fv(U) + MU = Fext (2)

with elastic forces F (Sec. 4.3), viscous forces Fv(U),dead external forces Fext and the mass matrix

M =∫V

ρ NNT dV . (3)

The accuracy of this approximation strongly dependson the choice of the shape functions N and the size h ofthe elements. In engineering applications it is usuallyavoided to use linear basis functions as they achievea convergence which is only linear in 1/h. This weakconvergence is caused by ∇ϕϕϕ being constant and con-sequently also F being constant on the whole element.

Especially in the case of almost incompressible ma-terials the linear elements suffer from numerical lockingeffects, i.e. solving (2) results in significantly smallerdisplacements than expected (Fig. 2). Moreover, manysmall elements have to be placed at the object bound-aries in order to approximate irregular shapes. Theapproach presented in the following exploits the bene-fits of quadratic basis functions regarding the demandsof interactive shape deformation, namely good approx-imation of shape and fast convergence in the presenceof plastic, nearly incompressible materials.

4 Real-time Soft Body Simulation

We propose two major improvements to currenttechniques for achieving both the objective of real-timesimulation and the robust handling of substantial de-formations, which are inherent to soft bodies:

• First, real-time is realised by a guaranteed upperbound on the computational costs per frame, whilethe number of elements is reduced to a minimum.

4

Page 6: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

• Second, large deformations are managed usingnon-linear shape functions, and taking non-linearstrain into account.

Implicit time integration with arbitrarily large stepsizes (Sec. 5.2) and a linear system of equations to besolved at each time step serve for both objectives.

4.1 Quadratic Shape Functions

Representing the N shape functions in the generalform

Ni(x) =N−1∑j=0

αij xej11 xej2

2 xej33 ,

i = 0..N−1, 4 ≤ N ≤ 10 ,

with quadratic exponents ejk = 0..2, the conditions (1)define a linear system with N 2 equations that is solvedfor the shape coefficients α. This is performed once forthe (unstressed) reference state of the object, storingthe shape coefficients for later use.

Figure 3. Curved quadratic 10-node tetrahe-dron with curvilinear coordinates.

The number of nodes and shape functions respec-tively can be chosen arbitrarily from four up to ten.For any N > 4 additional nodes are placed on the edgesof the (linear) standard tetrahedron (Fig. 3). We con-struct the nodal positions P0 of the reference state asdepicted later in Sec. 6.

4.2 Volume Integration

Choosing N = 10, the Ni are complete quadraticpolynomials and the error of this Galerkin approxi-mation is bounded to O(h3) [ZT00]. It is crucial topreserve this quadratic convergence by accurately in-tegrating the matrices of (2) over the volume of the

tetrahedron. This is achieved by a four point Gauss-Legendre cubature at the curvilinear coordinates

ζζζ1 =

rrr

, ζζζ2 =

srr

, ζζζ3 =

rsr

, ζζζ4 =

rrs

with r = 1

4 −120

√5 and s = 1

4 + 320

√5 [Str71] .

Thus e.g. the consistent mass matrix (3) of a tetrahe-dron with vertices P0 is precomputed using

M =1∫

0

(1−ξξξ1)∫0

(1−ξξξ1−ξξξ2)∫0

det(P0 ∇N) ρ NNT dξξξ3dξξξ2dξξξ1

≈ 124

4∑i=1

det(P0 ∇N) ρ N(ζζζi) N(ζζζi)T . (4)

Here the shape functions N interpolate the unit tetra-hedron with volume 1/6.

4.3 Corotated Quadratic Tetrahedra

The elastic forces F(U) generally depend non-linearly on U due to the geometric non-linearity of thestrain tensor even if C is linear. Simply using the linearCauchy strain tensor

εεεC = 12 (∇ϕϕϕ +∇ϕϕϕT )− I (5)

does not produce satisfying results as soon as signif-icant deformations occur. A corotational formulation[Fel00, HS04] linearises (2) by first applying element-wise rotations R to the displacement vector and thensolving the linear system

F(RU) RT + Fv(U) + MU = Fext .

Unfortunately, a single rotation matrix R is not enoughto rotate a quadratic tetrahedron into a configurationthat leaves a rotation-free deformation gradient R∇ϕϕϕ.Hence, we apply a separate polar factorization of ∇ϕϕϕ

at each cubature point to obtain the corotated straintensor

εεεCR = 12 (R∇ϕϕϕ +∇ϕϕϕTRT )− I (6)

and the rotation-invariant stress tensor σσσCR =C(εεεCR)RT . The linear elastic forces at the cubaturepoints simply become

F(RU) RT = ∇N σσσCR

and are calculated efficiently with precomputed ∇N.Furthermore, because of the constant gradient εεεCR

,U theelement stiffness matrix

F,U = ∂F∂U

= R FC,U RT ,

5

Page 7: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

depends only on the current rotation R and a constantmatrix FC

,U.For the viscous forces no corotation is applied. In-

stead, simple linear damping is achieved with the time-derivative of the Cauchy strain tensor using

Fv(U) = ∇N D(εεεC) ,

which is sufficient for shape editing purposes.

4.4 Lazy Corotation

A significant speed-up in the solution of the ODE (2)is achieved by a ”lazy” update of the rotation matrices.It is motivated by the observation that small changesof the stiffness matrix lead to imperceptible changes ofthe static equilibrium and that slightly deferred reval-uations of the stiffness matrix are not noticeable at allin a dynamic simulation.

We roughly estimate the change of the corotationR of an element between the last evaluation at timet1 and the current time t by means of the maximumabsolute row sum norm

d(t) = ‖∇ϕϕϕ(t)−∇ϕϕϕ(t1)‖∞

with respect to the difference of the two deformationgradients. This expression can be evaluated efficiently,and the polar factorization is not necessary in order todetermine whether the rotation changed significantly.Empirically, the stiffness matrix should be recomputedif d(t) exceeds a tolerance value of 0.1 in at least onecubature point.

4.5 Guaranteed Framerate

Obviously, any jerking of the application is annoyingin interactive physically-based modelling. Jerky framerates are produced by explicit time integration withadaptive time stepping when the step-size has to bedecreased due to increasing forces. In contrast, withimplicit time integration the step-size for any dampedproblem can be kept constant while the solution staysstable.

In order to safely limit the computation time of anarbitrarily large time step, we solve the corotated prob-lem with a direct linear solver. In the worst case,the simulation will require recomputing the corota-tions, refactoring the system matrix and solving thelinear system. With our implementation, current CPUcores perform this task within 40 milliseconds for morethan 1500 linear tetrahedra or more than 300 quadratictetrahedra, allowing a frame rate of 25Hz. The lazy

corotation further serves for reducing the CPU load,but of course does not increase the lower bound of theframe rate.

5 Implicit Time Integration of Elasto-Plastic Material

The constitutive law addressed in the previous sec-tions leads to material behaviour independent of thedeformation history (also called a hyperelastic mate-rial). Once the loading is removed the deformation will(possibly delayed by viscous effects) recover a state ofzero deformation. This assumption of ideal elasticity isonly a rough approximation and real world materialsdo not obey this model. In fact, every solid materialwill fail, i.e. undergo irreversible deformation or evenfracture, if the applied loading exceeds a certain thresh-old. The effect of irreversible deformation actually isthe most general definition of plasticity, which we willuse as the basic mechanism for conveying permanentshape deformation in the following.

5.1 Plasticity and Hardening

In order to extend the elastic model to account forplasticity effects we first introduce the decompositionof the total strain εεεtot as

εεεtot = εεεel + εεεpl .

The total strain can be interpreted as the true geomet-ric strain, which is readily evaluated using the finiteelement approximation (see Eq. (6)). As a result, theelastic stress can always be expressed as

σσσ = C : εεεel = C : (εεεtot − εεεpl) . (7)

We will generally assume that the material behavesideally elastic up to a certain point of stress where theplastic deformation regime begins. Using a yield func-tion F , this criterion can be expressed as F (σσσ) = 0which, depending on the current state of stress, indi-cates whether plastic deformation occurs or not. Sim-ilar to [OBH02] we will restrict our considerations toan isotropic von-Mises yielding model, which is partic-ularly simple. In this case F does not depend on thehydrostatic (i.e. volumetric) part of the stress tensorand, hence, plastic deformation does not affect the vol-ume. As a consequence, e.g. twisting of a mesh willnot result in unrealistic loss of volume - an importantaspect which is hard to achieve with previous surfacebased shape editing methods.

6

Page 8: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

(a) (b)

Figure 4. With kinematic hardening the yieldsurface F is allowed to translate by the back-stress κκκ (a). In the exemplary uni-axial load-ing cycle (b) the sense of traversal is indi-cated by arrows. Unloading is always elasticand reveals the stored plastic strain when thestress vanishes.

The condition F = 0 can best be pictured as an im-plicit (yield) surface in stress space (circles in Fig. 4a),where the radius of the surface is a material property.Inside the yield surface the material behaves entirelyelastic. Once the elastic stress reaches the yield surface,it cannot further increase and any additional deforma-tion will result in plastic deformation. In the simplestmodel, the location of the surface (i.e. the centre andradius) stays fixed and as a consequence the plasticstrain will increase while the elastic stress stays con-stant. Because this is impractical for our application,we include the effect of kinematic hardening. Here, thecentre of the yield surface is allowed to move along thedirection of the deviatoric strain.

With the linear kinematic hardening, a resilientplastic strain can be cancelled by a corresponding de-formation in the opposite direction, leading to thestress-strain relationship depicted in Fig. 4b. The slopein the plastic phase is subject to

κκκ = Hεεεpl

with the kinematic hardening factor H. However, itwould still be possible to achieve arbitrarily large plas-tic deformation which turned out to be inconvenient forthe user. For this reason we limit the range of plasticdeformation by another, user-defined threshold, pro-ducing the rightmost branch of the curve. Beyond,purely elastic behaviour is regained. The curve corre-sponds to a rate independent material, i.e. effects dueto viscosity are not considered. Taking into accountviscous stress contributions (4.3) the sharp transitionsare actually smoothed according to the strain rate εεεel.

5.2 Time Integration

With an explicit integration scheme, the time step-ping of Eq. (7) is straightforward, since it requires onlyquantities from the current state, which are triviallyknown. Using implicit integration is more involved be-cause the unknown strains εεεtot(t+ ∆t) and εεεpl(t+ ∆t)are required.

We deal with this issue using a return map algorithmsimilar to [AdV03]. Assuming that the time step will beentirely elastic, we predict the total strain εεεtot(t+ ∆t)in an explicit manner using the current strain rate as

εεεtot = εεεtot(t) + ∆t εεεtot(t) , (8)

where the tilde denotes trial quantities. The predictedelastic strain is computed as

εεεel = εεεtot − εεεpl(t) ,

and the deviatoric strain follows as

εεεdev = εεεel − 13 tr(εεεel) I .

If we further assume that the plastic strain εεεpl remainsconstant we can evaluate the yield function,

F (C : εεεdev) = ||2µ εεεdev − κκκ(t)|| − σy = 0 ,

where σy is the yield stress (cf. Fig. 4). If the yieldfunction signals that in the next step there will be notransition to the plastic range, the assumption holdsand we can safely use the standard implicit formulationto integrate the elastic forces. Otherwise, the plasticstrain for the end of the time step is computed as

εεεpl(t+ ∆t) = εεεpl(t) + λ2µ εεεdev − κκκ(t)||2µ εεεdev − κκκ(t)||

The consistency parameter λ ensures that the yieldcondition is met after the time step and reads

λ = ||2µ εεεdev − κκκ(t)|| − σy

2µ εεεdev +H.

To limit the norm of the plastic stress components byσz, the plastic strain is clamped to σz

/2µ (cf. O’Brienet al. [OBH02]). Finally, we have to compute the newbackstress using

κκκ(t+ ∆t) = H ·(εεεpl(t+ ∆t)− εεεpl(t)

).

Clearly, the method described above is only an ap-proximation which would not be of sufficient accuracyfor engineering applications. However, it is more thansufficient for computer graphics purposes and leadsto considerable computational advantages. Similar to

7

Page 9: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

Muller et al. [MG04] we obtain a linear system of equa-tions which, for the sake of simplicity, we abbreviate as(

M−R ∇FFF RT)

Y = Fconst ,

where the state vector Y is the concatenation of nodalpositions and velocities. Because of the prediction step(8) the plastic strain does not depend on Y and can beconsidered as a dead load during the time step. Hence,we are able to keep the stiffness matrix ∇FFF constantover time. Note that in contrast to explicit time inte-gration schemes the mass matrix M does not have tobe inverted and we can use the non-diagonal consistentmass matrix (4) without computational drawbacks.

5.3 Annealing

In the course of repeated deformation and sculptingby the user, substantial plastic strains can accumulate.While the simulation always remains stable, very largedeformations are likely to degrade computational effi-ciency and accuracy. This problem can be avoided byannealing the solid from time to time. When the userstops deforming the object for a moment, its rest stateis recomputed from the current deformation and thegeometric as well as the plastic strains are reset. Thisprocedure can be carried out as a background opera-tion without the user taking notice of it, or, as shown inthe accompanying video, by manually clicking a buttonto ”commit” the current plastic state and to continuewith further manipulations.

6 Geometric Model Reduction and De-tail Preservation

In order to provide the user with as much freedomas possible we do not make specific assumptions onthe size and resolution of the input model. We do,however, assume a closed manifold surface mesh of theobject to be deformed. Such meshes can be obtained,e.g. using a geometry acquisition device like a struc-tured light scanner and a subsequent post-processingstep (i.e. reconstruction and triangulation). The res-olution of meshes obtained in this way is usually veryhigh. Since globally smooth deformations can be cap-tured on a much coarser level it is common practice totreat high frequency surface details apart from possiblylarge low frequency deformations.

6.1 Geometric Model Reduction

We adopt this strategy and combine geometricmodel reduction techniques with an elegant detail

(a)

(b) (c)

Figure 5. Automatic generation of quadratictetrahedral meshes in two resolutions (b, c)from a detailed triangle mesh (a). The top rowshows the result of the surface mesh simpli-fication, the bottom row the boundary of theconformed quadratic FE meshes.

preservation algorithm which arises in a natural wayfrom our finite element approach. Low resolution tetra-hedral meshes like the ones in Fig. 5 are created follow-ing a three-step algorithm:

Coarse Surface Generation For the initial meshsimplification we employ standard triangle mesh re-duction techniques available for polygonal modellingsoftware, producing approximate Delaunay triangula-tions. The user defines by vertex painting which re-gions should keep higher resolutions, e.g. ears and tailof the armadillo.

Linear Tetrahedral Meshing The Delaunay prop-erty alleviates the subsequent generation of tetrahedralvolume meshes, which is achieved using standard meshgenerators. In our experience they often fail in generat-ing coarse quadratic meshes for a given smooth surface.For this reason, a standard meshing first produces anFE model with linear 4-node tetrahedra.

Quadratic Surface Conforming Afterwards eachtetrahedron of the coarse tetrahedral mesh is com-pleted by the missing nodes on the six edges. Nowthe surface nodes are adjusted to lie on the initial highresolution surface (Fig. 6a). For this purpose, the clos-est surface face in the normal direction is found. If its

8

Page 10: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

(a) (b) (c)

Figure 6. In the conforming step the surfacenodes of the quadratic tetrahedral mesh areadjusted to lie on the detailed surface. (Sim-plified 2D drawing.)

distance exceeds a specific limit or if the surfaces turnout to be too spiky to determine a consistent normaldirection, the surrounding area is searched for a closerface (Fig. 6b). Care is taken not to invert surface ele-ments if the detailed surface lies inwards (Fig. 6c). Insuch rare cases the node must not be moved and itis advisable to increase the FE mesh resolution in thecritical region.

While the whole reduction algorithm is rather sim-ple, it turned out to be extremely effective and does notdemand any FE modelling knowledge from the user.Curved element edges are preliminarily created at theFE mesh boundaries, but do of course also emerge inthe inside during deformations. Hence, the full degreesof freedom of the quadratic tetrahedra are exploited bythe simulation.

6.2 Detail Preservation

Since the plastic deformations are computed on thecoarse FE mesh, the simulation does affect surface de-tails. Instead, by interpolating the detailed surfacewith the isoparametric shape functions of the associ-ated tetrahedron, the surface deforms realistically andthe details inherit the affine invariance of the FE ap-proach. That is, at any time t by

St = ϕϕϕ(S0, t) =N−1∑i=0

Pti Ni(S0) .

the interpolated detailed surface point St is calculatedfrom the initial position S0 of the vertex. Cracks atthe transitions from one quadratic tetrahedron to thenext are automatically avoided because the FE surfacenodes lie on the detailed surface, which is further in-terpolated smoothly by the curved edges. During an-nealing the rest positions S0 are reset to the currentcoordinates.

The colours c(x, t) for stress visualisations on thedetailed surface first are linearly extrapolated from the

cubature points to the nodes P0i of the reference state.

Afterwards the colours c(St, t) for the detailed surfaceare interpolated likewise by the shape functions using

c(St, t) =N−1∑i=0

c(P0i , t) Ni(S0) .

This is an intuitive and computationally efficient wayof stress visualisation, which, to our knowledge, wasnot addressed in literature so far.

7 Results

The described techniques were applied successfullyto perform several shape editing tasks on a Dual Xeon5140, where only one core was used by our implemen-tation. An implicit second order BDF (backward dif-ferentiation formula) solver ensured stable time inte-gration. The linear system was solved with a directsparse solver, which performed better than the con-jugate gradient method due to the comparably smallsystem matrices.

7.1 Examples

All examples were created in interactive sessionswith a time step size of 40 milliseconds. The abilityof the simulation to preserve volume and to correctlyhandle situations of extremely large deformations canbe observed in Figs. 7 and 8. The surface meshes arecoloured based on the norm of the plastic strain, reddenoting that the plastic stress component is close tothe limit σz. To the right hand side the surface of thetetrahedral meshes is visualised. In Fig. 1 it becomesevident that a complex surface (60.000 vertices) withrich features is interpolated smoothly by the quadraticbasis functions, even when a low-resolution FE mesh(229 tetrahedra) is used. Fig. 11 proves that the vol-ume is preserved even when large deformations are ap-plied to a very detailed model.

A bi-directional integration with other physics basedanimation techniques, namely a grid-based fluid simu-lation and a cloth simulation based on finite elements(Fig. 9), is possible in a straightforward manner. Thisprovides the animator with the opportunity to modelcomplex environments which would be impossible toanimate in the traditional way. Furthermore, the ac-companying video shows interactive changes to elasticand plastic parameters to support a variety of shapemanipulation tasks ranging from large-scale deforma-tions to tweaks of fine features.

9

Page 11: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

Surfacemesh

Tetra-hedra

Tmat Tfac Tsolve Tdef Ttot

Arm 20k 146 10.1 3.9 2.5 1.9 18.4Arm 60k ” ” ” ” 5.3 21.8Arm 20k 229 16.6 6.1 3.5 1.7 27.9Arm 60k ” ” ” ” 5.6 31.8Dragon20k

173 12.6 3.3 2.7 1.9 20.6

Dragon50k

” ” ” ” 4.4 23.0

Dragon100k

” ” ” ” 8.7 27.4

Table 1. Computation times in millisecondsfor the armadillo and the dragon model indifferent resolutions up to 100.000 vertices.Between 30 and 50 frames per second areachieved.

7.2 Benchmarks

Table 1 shows the computation times for two exem-plary deformation tasks: repeatedly dragging one armof the armadillo (Fig. 1) up and down, and stretch-ing and bending the upper part of the dragon model(Fig. 10). For the armadillo model, surface mesheswith 20.000 and 60.000 vertices, and volume mesheswith 146 and 229 quadratic tetrahedra were used. Thedragon model is discretised with 173 quadratic tetra-hedra and consists of up to 100.000 vertices. Computa-tion times per frame (not considering lazy corotation)are separated into corotation with stiffness matrix up-date (Tmat), matrix re-factorisation (Tfac), solution ofthe linear system (Tsolve) and update time of the inter-polated surface mesh (Tdef). From the total time (Ttot)it is evident that time-step sizes from 32ms down to19ms could be used and still real-time simulation wouldbe achieved. Additionally, in more than half of theframes lazy corotation was active, leaving only Tsolveand Tdef for the respective frames, and therefore sig-nificantly reducing the average computation time perframe. Actually in our experiments the frame rate waslimited mostly by the rendering system, which acted asa bottleneck when huge surface meshes were used.

7.3 Future Work

Although our approach does not directly supportskeleton driven deformations, similar effects can beachieved by simply changing local material propertiesin an appropriate way: assigning a stiff material to thelimbs and a comparably soft one to the joints yields the

desired behaviour. However, in future work we hope toextend our system to account for totally rigid regionsand with a more convenient user interface for specifyingskeleton constraints like in the work of [ZHS+05].

References[ACOL00] Alexa, M., Cohen-Or, D., and Levin,

D. As-Rigid-As-Possible Shape Interpolation. InProceedings of ACM SIGGRAPH, 157–164, 2000.

[AdV03] Auricchio, F., and da Veiga, L. B. On anew integration scheme for von-Mises plasticity withlinear hardening. International Journal for Numeri-cal Methods in Engineering, 56(10):1375–1396, 2003.

[Ale03] Alexa, M. Differential coordinates for meshmorphing and deformation. The Visual Computer,19(2):105–114, 2003.

[BK03] Botsch, M., and Kobbelt, L. Multiresolu-tion Surface Representation Based on DisplacementVolumes. Computer Graphics Forum, 22(3):483–483,2003.

[BK04] Botsch, M., and Kobbelt, L. An intuitiveframework for real-time freeform modeling. ACMTransactions on Graphics, 23(3):630–634, 2004.

[Fel00] Felippa, C. A. A Systematic Approach tothe Element-Independent Corotational Dynamics ofFinite Elements. Tech. Rep. CU-CAS-00-03, Collegeof Engineering, University of Colorado, 2000.

[HGS03] Hauth, M., Gross, J., and Straßer, W.Interactive Physically Based Solid Dynamics. InACM Symposium on Computer Animation (SCA),17–27, 2003.

[HS04] Hauth, M., and Strasser, W. CorotationalSimulation of Deformable Solids. In ProceedingsWSCG, 137–145, 2004.

[HSL+06] Huang, J., Shi, X., Liu, X., Zhou,K., Wei, L.-Y., Teng, S.-H., Bao, H., Guo,B., and Shum, H.-Y. Subspace gradient domainmesh deformation. ACM Transactions on Graphics,25(3):1126–1134, 2006.

[ITF04] Irving, G., Teran, J., and Fedkiw, R. In-vertible finite elements for robust simulation of largedeformation. In Proceedings of ACM Symposium onComputer Animation (SCA), 131–140, 2004.

[JP99] James, D. L., and Pai, D. K. ArtDefo: Ac-curate real time deformable objects. In ProceedingsACM SIGGRAPH, 65–72, 1999.

10

Page 12: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

Figure 7. Bunny: 1379 surface vertices, 101 quadratic tetrahedra.

Figure 8. Elephant: 2578 surface vertices, 234 quadratic tetrahedra.

[KCVS98] Kobbelt, L., Campagna, S., Vorsatz,J., and Seidel, H.-P. Interactive Multi-ResolutionModeling on Arbitrary Meshes. Computer Graph-ics (Proceedings of ACM SIGGRAPH), 32:105–114,1998.

[LCOGL07] Lipman, Y., Cohen-Or, D., Gal, R.,and Levin, D. Volume and shape preservation viamoving frame manipulation. ACM Transactions onGraphics, 26(1):article no. 5, 2007.

[LSCO+04] Lipman, Y., Sorkine, O., Cohen-Or,D., Levin, D., Rossl, C., and Seidel, H.-P.Differential Coordinates for Interactive Mesh Edit-ing. In Shape Modeling International 2004 (SMI),181–190, 2004.

[LSLCO05] Lipman, Y., Sorkine, O., Levin, D.,and Cohen-Or, D. Linear rotation-invariant coor-dinates for meshes. ACM Transactions on Graphics,24(3):479–487, 2005.

[MDM+02] Muller, M., Dorsey, J., McMillan,L., Jagnow, R., and Cutler, B. Stable Real-Time Deformations. In ACM Symposium on Com-puter Animation (SCA), 49–54, 2002.

[MG04] Muller, M., and Gross, M. InteractiveVirtual Materials. In Proceedings of Graphics Inter-face, 239–246, 2004.

[MS06] Mezger, J., and Straßer, W. InteractiveSoft Object Simulation with Quadratic Finite Ele-ments. In Articulated Motion and Deformable Ob-jects (AMDO), F. J. Perales and R. B. Fisher, Eds.,vol. 4069 of Lecture Notes in Computer Science, 434–443. Springer, 2006.

[OBH02] O’Brien, J. F., Bargteil, A. W., andHodgins, J. K. Graphical modeling and animationof ductile fracture. ACM Transactions on Graphics,21(3):291–294, 2002.

[PDA00] Picinbono, G., Delingette, H., and Ay-ache, N. Real-Time Large Displacement Elastic-ity for Surgery Simulation: Non-linear Tensor-MassModel. In MICCAI, 643–652, 2000.

[RSB96] Rappaport, A., Sheffer, A., andBercovier, M. Volume-preserving free-form solids.IEEE Transactions on Visualization and ComputerGraphics, 2(1):19–27, 1996.

11

Page 13: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

Figure 9. Armadillo: 16608 surface vertices, 146 quadratic tetrahedra. Interaction with wind (top),draped with an FE simulated piece of cloth (bottom).

[SK04] Sheffer, A., and Kraevoy, V. PyramidCoordinates for Morphing and Deformation. In Pro-ceedings of the 3D Data Processing, Visualization,and Transmission, 2nd International Symposium,68–75, 2004.

[SLCO+04] Sorkine, O., Lipman, Y., Cohen-Or,D., Alexa, M., Rossl, C., and Seidel, H.-P. Laplacian surface editing. In Proc. Eurograph-ics/ACM SIGGRAPH symp. on Geometry process-ing, 179–188, 2004.

[SP86] Sederberg, T. W., and Parry, S. R. Free-form deformation of solid geometric models. Com-puter Graphics (Proceedings of ACM SIGGRAPH),20(4):151–160, 1986.

[Str71] Stroud, A. H. Approximate Calculation ofMultiple Integrals. Prentice-Hall, Inc., 1971.

[TF88] Terzopoulos, D., and Fleischer, K. Mod-eling inelastic deformation: viscolelasticity, plastic-ity, fracture. Computer Graphics (Proceedings ofACM SIGGRAPH), 22(4):269–278, 1988.

[WG97] Wilhelms, J., and Gelder, A. V.Anatomically based modeling. In Proceedings ofACM SIGGRAPH, 173–180, 1997.

[YZX+04] Yu, Y., Zhou, K., Xu, D., Shi, X., Bao,H., Guo, B., and Shum, H.-Y. Mesh editing withpoisson-based gradient field manipulation. ACMTransactions on Graphics, 23(3):644–651, 2004.

[ZHS+05] Zhou, K., Huang, J., Snyder, J., Liu,X., Bao, H., Guo, B., and Shum, H.-Y. Largemesh deformation using the volumetric graph Lapla-cian. ACM Transactions on Graphics, 24(3):496–503, 2005.

[ZSS97] Zorin, D., Schroder, P., and Sweldens,W. Interactive multiresolution mesh editing. In Pro-ceedings of ACM SIGGRAPH, 256–268, 1997.

[ZT00] Zienkiewicz, O. C., and Taylor, R. L. TheFinite Element Method, vol. 1 and 2. Butterworth-Heinemann, fifth ed., 2000.

12

Page 14: A Finite Element Method for Interactive Physically Based ... · A Finite Element Method for Interactive Physically Based Shape Modelling with Quadratic Tetrahedra J. Mezger, B. Thomaszewski,

Figure 10. Dragon: 100.000 surface vertices, 173 quadratic tetrahedra. The surface colours visualisethe mapping to the boundary tetrahedra.

Figure 11. High quality rendering of the dragon with 250.000 vertices and large deformation.

13