Optimized linear FEM for modeling deformable

0 downloads 0 Views 576KB Size Report
higher degree of accuracy and visual realism, which affect the interactivity of ... Inteligencia Artificial, U. Rey Juan Carlos, c/Tullpın, S/N. 28933 Móstales, Madrid ...
COMPUTER ANIMATION AND VIRTUAL WORLDS Comp. Anim. Virtual Worlds 2006; 17: 393–402 Published online in Wiley InterScience (www.interscience.wiley.com). DOI: 10.1002/cav.142 *******************************************************************************************************************

Optimized linear FEM for modeling deformable objects ´ sar Mendoza, Luis Pastor and Angel Rodrı´guez By Marcos Garcı´a*, Ce *********************************************************************************************

The main contribution of our work is a technique to accelerate the real-time simulation of deformable objects using a stable finite element method. Our purpose is to construct a preconditioner matrix for the coefficient matrix of the implicit integration scheme based on the global rotation matrix of the object. We describe some required steps to compute an optimal preconditioner in an off-line step. Our technique can be used to accelerate the element stiffness warping method and could be used to solve the system directly for objects with small deformations or for objects that appear outside of the users’ interest zone. Copyright # 2006 John Wiley & Sons, Ltd. Received: 10 April 2006; Revised: 2 May 2006; Accepted: 10 May 2006 KEY WORDS:

real-time simulation; deformable objects; robust linear FEM

Introduction The real-time physical simulation of deformable objects has been an extensively researched topic in computer graphics during the last two decades. This research has mainly been applied to the simulation of soft tissue for surgery simulators, computer games, cloth, and hair simulation. These applications constantly demand a higher degree of accuracy and visual realism, which affect the interactivity of the simulations. Hence, much research has been focused on developing physical models to trade fast computation that generate about 20 frames per second, for accuracy, leading to physically approximated but visually plausible simulations. Nowadays, there is a wide variety of physical models that can be used to simulate deformable objects in realtime, for example, mass-spring systems,1,2 mesh free methods,3 finite elements,4,5 finite differences,6 finite volumes,7 and boundary element methods.8 None of them can be considered as the best since they depend on *Correspondence to: Marcos Garcı´a, Dpto. de Arquitectura y Tecnologı´a de Computadores, Ciencias de la Computacio´n e Inteligencia Artificial, U. Rey Juan Carlos, c/Tullpı´n, S/N. 28933 Mo´stales, Madrid, Spain. E-mail: [email protected] Contract/grant sponsor: Spanish Ministry of Education and Science; contract/grant number: TIC2003-08933-C02. Contract/grant sponsor: Government of the Community of Madrid; contract/grant numbers: GA/SAL/0940/2004, S-0505/DPI/0235.

the specific application and on the inherent characteristics of the object. An extensive survey can be found in Reference [9]. In this work we deal with deformable models based on a finite element approach. Finete element method (FEM) is physically more accurate than most methods, due to its strong mathematical background, although the resolution of its governing equations is computationally expensive and its use in real-time simulations has been limited. Nevertheless, due to the performance of the latest computers and the availability of simplified approaches, FEM is experiencing a growing use in realtime applications where visually plausible results are considered to be good enough. We present a technique to accelerate the resolution of the warped stiffness finite element approach,10 while maintaining high levels of simulation robustness. The idea is to use precalculated data to reduce the computational cost of the solver which is used to sort out the implicit integration scheme of our FEM approach.

Related Work Many approaches for deformable object real-time simulation use simplified and/or precomputed models of the FEM. An excellent and complete treatment of the FEM theory can be found in Reference [11]. We will discuss some recent papers that propose simulating

*******************************************************************************************************************

Copyright # 2006 John Wiley & Sons, Ltd.

M. GARCI´A ET AL. *******************************************************************************************************************

decomposition of the deformation gradient. The polar decomposition gives a unique rotation for each element that is used to move back the triangle to its unrotated configuration, where the forces are computed, and then move it again to its rotated configuration. Later, Mu¨ller et al.10 extended the idea of extracting rotations from elements rather than from vertices, and applied the stiffness warping method to simulate elasto-plastic materials. In this way, they avoid any ambiguity problem and guarantee no ghost forces since the sum of the momentums at each vertex of the tetrahedral mesh is zero.

deformable objects in real-time and using finite elements. Bro-Nielsen and Cotin12 were among the first to present detailed work to simulate real-time deformations of a volumetric linear elastic object using finite elements. They reduced the computation time required by the volumetric model, only using the surface nodes of the mesh. However, it was not possible to simulate dynamic behaviors due to the quasi-static nature of their model (a succession of static poses solutions). Debunne et al.13 used a Green strain tensor, as in Reference [4], to deal with non-linearities. This allowed to simulate large deformations since Green strain is invariant to rigid body movements. To obtain real-time simulations they partitioned the object in a multiresolution hierarchy of tetrahedral meshes and applied an adaptive automatic technique based on space and time level of detail. To increase stability, they applied a semi-implicit integration scheme.14 In the same way, Wu et al.15 use a dynamic progressive mesh to simulate both strain tensor and material non-linearities of different subdomains of the object. Picinbono et al.16 have also simulated material non-linearities using a set of local stress tensors, so the model was named non-linear tensor-mass model. They decoupled the motion of all of the nodes using a masslumping approach so the force could be computed for each vertex. For each tetrahedron, the force at its vertices depends on the force created by the vertex displacement and the force produced by the displacements of its neighbors. They used an explicit integration scheme to solve the dynamics of the model. Lately, to provide robustness to the simulations, implicit integration schemes have been implemented in different model approaches. However, due to the computational cost of the implicit integration, most works deal with linear elasticity to simplify the model governing equations and use a combination of different techniques to realistically simulate large deformations. Mu¨ller et al.17 precompute the stiffness matrix of each mesh element using a linear strain model. These matrices are warped via the mesh node rotations at every step simulation to compute elastic forces in the local unrotated coordinate frame of each vertex. However, the rotation of each vertex has to be computed from the location of its adjacent vertices which constitutes an ambiguous problem. Additionally, some ghost forces may appear since the sum of the momentum in the vertices could be different to zero. In a similar approach, Etzmuss et al.18 extract the rotations of the triangle elements rather than the rotation of vertices. At each time step the rotations are recalculated before computing the deformation forces using of the polar

Background Continuum Elasticity In general, to model a deformable object we characterize the relationship between its undeformed shape (also called equilibrium configuration, rest or initial shape) and its deformed shape. The coordinates x0 2 R3 of a point in the undeformed shape of the object are called material coordinates. When the object is deformed, a point at location x0 moves to a new location x 2 R3. This new location, in the deformed configuration, is known as the spatial or world coordinates of the object. The movement can be characterized by the displacement vector field u ¼ x  x0. We can define strain as the relative displacements of the points of a continuum object. A useful tool to map vectors between the undeformed and deformed configurations is the deformation gradient defined as F ¼ rx ¼ @x/@x0. It is used to compute the symmetric Green–Lagrange strain tensor, eG 2 R3  3, which is a measure of how the object deforms. The Green– Lagrange strain tensor is invariant to all rigid body movements, rotations and translations, and hence suitable to measure large deformations. It is defined as: eG ¼ ½(FTF  I). Since the deformation gradient can also be defined using the displacement vector field as F ¼ I þ ru, where ru is the gradient operator of the displacement field, we can alternatively represent the Green–Lagrange strain tensor as: eG ¼ ½(ru þ [ru]T þ [ru]Tru). Note that eG is a non-linear strain tensor defined with respect of the initial configuration of the object. If we assume small deformations, we can remove the quadratic term and obtain the linear Cauchy strain tensor eC defined as: eC ¼½(ru þ [ru]T). The internal resistance of the object to deformations due to the effects of external loads depends on the material

*******************************************************************************************************************

Copyright # 2006 John Wiley & Sons, Ltd.

394

Comp. Anim. Virtual Worlds 2006; 17: 393–402

OPTIMIZED LINEAR FEM *******************************************************************************************************************

properties and is called stress. Different stress models are available depending on the configuration of the object. The symmetric 2nd order Cauchy stress tensor, s 2 R3  3, represents force per unit area in the deformed configuration. The constitutive equations of an elastic solid describe the relationship between stress and strains. To relate them, we use the strain energy function, which appears when the object is deformed under external forces, storing a quantity of energy called strain energy. When differentiated, it defines the stress of the material. The simplest case is linear elasticity, which assumes a linear relationship between stress and strain which leads to Hooke’s law s ¼ Ce, where C is a tensor of 81 experimental elastic constants. Making assumptions of symmetry and considering isotropic materials, then C only depends on two independent values, m and l, which are the Lame´ constants of the material.

by assembling the element’s stiffness matrices P K ¼ e Ke . Considering linearized elastic forces, the dynamic behavior of the object can be described as: M¨x þ Du þ Kðx  x0 Þ ¼ fext

(1)

where M is the mass matrix, D the damping matrix, fext a vector of externally applied forces, and x˙ and x¨ the first and second derivatives of x with respect to time. Since in our case, we are using linearized elastic forces, the stiffness matrix K is constant and can be precomputed.

Resolution Linear elasticity yields unrealistic results for large deformations because it is not invariant to rotations. It can easily be observed in the animations how the size of the object grows in an unrealistic way. To avoid these artifacts, we use the element stiffness warping technique proposed by Mu¨ller et al.10 They extracted the rotational part of the deformation for each finite element (tetrahedrons) and computed the forces in the non-rotated configuration. Then, the forces are mapped back to the deformed configuration. This is summarized in:

Finite Element Method The Finite Element Method (FEM) replaces the partial differential equations of the continuum object with a set of algebraic equations that are solved numerically. The first step is to discretize the object into a finite number of disjoint elements, in our case, a tetrahedral mesh. To map the displacements of the continuum object to the tetrahedral mesh, we use linear interpolation functions, known as shape functions. In a typical formulation in Computer Graphics, we use mass-lumping to treat tetrahedron nodes like mass points. Hence, for a tetrahedral element, e, the displacement field u is interpolated using a 3  12 matrix, H, which contains the shape functions as: u(x) ¼ Huˆ where uˆ is the displacement of the four vertices of the tetrahedron, that is uˆ ¼ [u1, v1, w1, . . ., u4, v4, w4]T. The shape functions are computed in the rest position of the object. Next, we relate the strains to the nodal displacements using a 6  12 constant matrix Be, as e ¼ Be  uˆ. Recall that for a linear elastic and isotropic material s ¼ C  e ¼ CBeuˆ. The forces fe acting on the nodes can be derived from the derivatives of the strain energy with respect to the nodal R positions. The strain energy is: E ¼ V sdx0 . In general, the relation between nodal forces and nodal positions is non linear. However, in the linear case, making the corresponding substitutions in the previous equation, ^, the force at the tetrahedron nodes is given by fe ¼ Ke u where the 12  12 matrix Ke ¼ VBTe CBe is the stiffness matrix of the tetrahedron and V its volume. Finally, we build the stiffness matrix K 2