Macroscopic and microscopic deformation coupling in up‐sampled cloth simulation

Various methods of predicting the deformation of fine‐scale cloth from coarser resolutions have been explored. However, the influence of fine‐scale deformation has not been considered in coarse‐scale simulations. Thus, the simulation of highly nonhomogeneous detailed cloth is prone to large errors. We introduce an effective method to simulate cloth made of nonhomogeneous, anisotropic materials. We precompute a macroscopic stiffness that incorporates anisotropy from the microscopic structure, using the deformation computed for each unit strain. At every time step of the simulation, we compute the deformation of coarse meshes using the coarsened stiffness, which saves computational time and add higher‐level details constructed by the characteristic displacement of simulated meshes. We demonstrate that anisotropic and inhomogeneous cloth models can be simulated efficiently using our method. © 2014 The Authors. Computer Animation and Virtual Worlds published by John Wiley & Sons, Ltd.


INTRODUCTION
There is strong demand for the efficient simulation of detailed clothing in the computer graphics animation industry, especially for interactive applications such as games. However, because they must concentrate on computations such as rendering and human interaction, games should ideally not have to expend significant processor time simulating cloth. Highly detailed cloth simulation is currently too expensive, and thus its interactive use is strictly limited. Besides, in the real world, cloth is usually inhomogeneous, which causes anisotropic deformations. The coarsening of heterogeneous cloth while retaining anisotropy is one of the most difficult problems in cloth simulation. This is because cloth moves in 3D space, but the material properties are determined in 2D. An appropriate coarsened stiffness is required for cloth simulations using current up-sampling techniques [1][2][3]. However, in these cloth models, there is no relation between fine and coarse simulations.
In this paper, we propose an effective down-sampling and up-sampling method applicable to heterogeneous structures using homogenization theory. With our technique, we can simulate highly detailed cloth in real-time using a number of coarse meshes. As a precomputation step, to prevent the coarsened cloth losing its macroscopic property (i.e., anisotropy), we homogenize unit cells, which are defined as small square patches of periodically patterned cloth. Using microscopic deformations called "characteristic displacements," which correlate coarse mesh deformations to fine mesh deformations, the equation of energy conservation can be solved in the region of each coarse mesh. From the characteristic displacements, we compute the effective elasticity tensor that approximates the material stiffness in the coarse simulation.
At every time step, we compute the microscopic deformation from the macro strain on the coarse meshes and then superimpose this on the deformed coarse meshes. The most important part of our method is the calculation of in-plane strain metrics under large deformation in the 3D space. To compute in-plane strain without complicated, expensive treatment, we adopt conventional tensor metrics. This up-sampling method succeeds in preserving the microscopic in-plane deformation of the original fine detailed cloth.
To simplify the introduction of a homogenization method, efficient and stable linear elasticity is adopted for the in-plane deformation. To avoid the typical visual artifacts of linear elasticity, we modify the warping stiffness method for a thin shell. This enables us to simulate homogenized cloth robustly and efficiently, even for anisotropic cloth.
In summary, our method makes the following contributions: (1) the proposed down-sampling technique enables heterogeneous cloth to be coarsened, taking into account its macroscopic character without losing the internal energy of the original highly detailed cloth; (2) our up-sampling technique superimposes physically feasible microscopic detail to coarsened meshes by considering the internal strain at runtime; (3) an anisotropic cloth is more robustly and efficiently simulated with linear elasticity and warped stiffness, so that its rotational matrix conforms to the current configuration.

RELATED WORK
Advances in physics-based simulations have been successfully applied to realistic clothing animation. In particular, both sheet-based [4][5][6] and yarn-based [7,8] cloth simulations are widely used in the CG animation industry, because these methods can handle nonhomogeneous or anisotropic elasticity, making the animation more realistic. However, these techniques are often computationally intensive. In contrast, mass-spring models [9][10][11] and position-based approaches [12][13][14] simulate highly detailed cloth more efficiently and robustly, but typical features such as anisotropy and nonhomogeneity are not appropriately considered.
To accelerate cloth simulation, up-sampling methods are widely used [15,16]. At runtime, plausible fine details are superimposed on the coarse simulation, whose computational cost is much smaller than that of a fine-scale simulation. The fine detail is either computed from geometric information at each time step [1,17] or generated from a set of highly detailed deformations computed in advance by the TRACKS technique [2,3,18]. However, the simulations are not necessarily physically accurate, because microscopic deformations caused by anisotropy or heterogeneity are not accounted for in the material properties of the coarse mesh deformations. In other words, if we want to accelerate the simulation of anisotropic or nonhomogeneous cloth, neither microscopic (heterogeneity) nor macroscopic (anisotropy) factors are reflected in the parameters of the coarse mesh used in the runtime simulation.
It takes noninteractive computations to simulate large deformations in fine-scale models. Model reduction techniques can reduce these large degrees of freedom, enabling faster simulation times. The multigrid method is one model reduction solution, simulating cloth using hierarchical levels and yielding fast convergence at the finest level [19,20]. Although the multigrid framework can be applied to heterogeneous models, at each time step it must simulate a finer level at least once to correct the error in the coarser level, which is still time-consuming. Other researchers have proposed cage-based methods, which enable fine elastic simulation to be controlled by a few handle points and do not require a fine simulation at runtime [21,22]. Cage-based methods are based on homogenization theory, which is widely used in the mechanical engineering industry [23].
In homogenization theory, we decompose the deformation of fine, heterogeneous materials into macroscopic deformation and microscopic deformation. To approximate macroscopic deformation, coarsened mechanical material properties are derived from macroscopic characteristics computed under unit strains. Moreover, such methods enable coarse simulations to approximate fine, heterogeneous materials without losing the microscopic detail. However, these applications have been limited to the deformation of solid materials and have not been applied to thin shells like cloth [24]. Besides, in these methods, the up-sampling scheme occasionally causes visual artifacts, because solid materials in CG animation have few regular patterns. In this paper, we apply homogenization methods to heterogeneous cloth simulation by considering the periodic patterns typical of cloth, thus avoiding inaccurate up-sampling and down-sampling.

OVERVIEW AND NOTATION
This section presents a short overview of our cloth up-sampling method that preserves heterogeneous characteristics. An outline is illustrated in Figure 1. Introducing a homogenization method for highly detailed cloth, our method accelerates the simulation by solving macroscopic deformations on coarse meshes and superimposing precomputed microscopic deformations on fine meshes. As a precomputation step, we homogenize the unit cells in which the anisotropic or nonhomogeneous geometry is embedded. Microscopic deformations are called characteristic displacements and correspond to deformed coarse meshes. Together with these characteristic displacements, an effective elasticity tensor that approximates the same geometry as the fine-scale simulation is computed. At every time step, the coarsened cloth is simulated under anisotropic conditions using an effective tensor obtained in advance, making our approach much faster than the original fine cloth simulations. In addition, we simultaneously compute microscopic deformations from the macro strain on the coarse meshes, and then embed these in the deformed coarse meshes, which is called localization. In the precomputation step, we extract the macroscopic stiffness from the fine-scale simulation, which is called homogenization. At runtime, coarsened cloth is up-sampled so that it includes the heterogeneous microscopic detail.

Notations
Our homogenization technique is based on continuum mechanics, particularly linear elasticity. To simplify the exposition of the homogenization method, we adopt matrix and vector notation instead of higher order tensor notation as possible. In this paper, the "hat" notation indicates a vector expression for a second-order tensor and matrix expression for a fourth-order tensor. Our notation is based on Einstein summation convention.
According to elasticity theory, the linear strain is defined as where u i and u j are the current displacements. The linear strain tensor is the linearized Cauchy strain tensor, which assumes that the derivatives @u i @x j and @u j @x i are sufficiently small. In this paper, we redefine the strain tensor as a vector O D f 11 , 22 , 2 12 g T . Additionally, the gradient operator is defined as Comp and we can obtain the strain from the current displacements as follows: The stress tensor is defined as ij D C ijkl kl , where C is the elasticity tensor. In this paper, we redefine the stress tensor as a vector and the elasticity tensor as a matrix: The diagonal part of O C is related to the stretch stiffness in each direction. The non-diagonal part determines the shear stiffness in each direction. Note that if the material is isotropic, the elasticity tensor satisfies C 1111 D C 2222 and C 1112 D C 2212 D 0.

HOMOGENIZATION OF CLOTHING DEFORMATIONS
To compute the dynamics of cloth using a coarse, homogeneous model instead of a fine, heterogeneous one, the macroscopic character (i.e., anisotropy) caused by the microscopic structure of fine cloth should be extracted from fine-scale simulation. For consistency and clarity, captalized characters refer to macroscopic quantities on the coarse mesh, and small characters refer to microscopic quantities on the fine mesh. Thus, we decompose the displacement u 2 R 2 of each node under .u, v/-plane deformations into separate macroscopic and microscopic displacements according to The macroscopic displacements are expressed by a combination of the macroscopic scale Y 2 R 2 3 and the strain O E D fE uu , E vv , 2E uv g T determined on a unit cell. Likewise, the microscopic displacements are described as a combination of the stain on a unit cell and the characteristic displacement D f uu , vv , 2 uv g T 2 R 3 2 , which is the microscopic deformation under unit strain in each direction (see more detail in Section 4.1).
As a precomputation step, we compute an effective elasticity tensor that approximates the same geometry as the fine-scale simulation. To approximate a fine simulation, we consider the conservation equalities that satisfy the internal energy, stress, and strain on the fine meshes to be equivalent to those of the coarse meshes. In our method, a linear elasticity model is employed for in-plane deformation (i.e., shearing and stretching) (further detail is provided in Section 5). Therefore, these equations can be written as follows: where Y is the internal region of a unit cell, O † and O E are the stress and strain vectors on a coarse mesh, respectively, O 0 is the stress, and O 0 is the strain.

Characteristic Displacements
To compare coarsened unit cells with the corresponding fine, heterogeneous cells using Eqs (7)-(9), the mode of deformation in the coarse meshes should correspond to that of the fine meshes. The fine deformations that have the same mode of motion as those of the coarse ones are defined as the characteristic displacements ˛ˇ. We compute these displacements ˛ˇb y solving the following problem: where K e 2 R 2 2 is an element stiffness matrix, O c y is the elasticity tensor of each element at the fine scale, and B is a deformed gradient tensor given by where N a is an interpolation function on node a. Note that E˛ˇmeans 1 2 .e˛˝eˇC eˇ˝e˛/ . However, K is still not uniquely determined, because it is singular and unstable. We assume that each point on a unit cell deforms periodically. Although this property would make us hesitant to adopt homogenization methods for the acceleration of solid elastic simulation, this assumption is plausible for our simulation because cloth usually exhibits some periodicity, as shown in Figure 2. This periodicity not only prevents the stiffness matrix K from being unstable and singular but also diminishes the gap between two neighboring unit cells, which enables us to up-sample coarsened cloth more smoothly. If nodes i and j on a unit cell are located symmetrically w.r.t. the center of the cell, each displacement įˇ, jˇs hould be the same. Note that this periodic constraint for the nodes on the edges of a unit cell is sufficient. In other words, we can ignore the periodicity inside the unit cell.

Computing Homogenized Stiffness
To obtain the deformation of a coarse mesh that is similar to the down-sampled high-resolution simulation, it is necessary to compute homogenized stiffness considering anisotropy. Because we assume that the deformations are infinitesimal and thus linear, the stress on a unit cell can be computed by aggregating stresses on the fine scale for all deformation modes. Hence, the macro stress on a unit cell satisfies the following equality: where O c .y/ is the elasticity tensor of each fine mesh on a unit cell, and @ y is the macroscopic gradient operator using the same expression as Equation (2). We acquire the coarsened stiffness matrix O C H as where I is a unit matrix.

SIMULATION OF HOMOGENIZED CLOTH
We illustrated the homogenization technique for 2D linear elasticity in the previous section. Whereas linear elasticity is widely used in elastic simulation, its application to large deformations including rotation is still problematic. Therefore, linear elasticity is not sufficient for cloth simulation, because the cloth model usually consists of a 2D thin shell plate that moves dynamically in 3D space. The cloth model we adopt is divided into two components: in-plane deformation and out-of-plane deformation.

Cloth Model
We treat in-plane deformation (i.e., stretching and shearing) as a continuous model. The physical material properties in continuous models can consider anisotropy and yield more accurate results. Our model is based on linear elasticity because it is stable and easy to handle. In addition, homogenization methods are readily applicable to linear elasticity, as we described in the previous section. The finite element method with linear displacement triangles is employed to solve the governing partial differential equations. However, visual artifacts occur under large deformations, because the stiffness matrix is constant under linear elasticity. To achieve robust and fast simulation of cloth, we apply the existing method of a warping stiffness [25] for a thin shell (Figure 2). In contrast, we adopt a discrete model for out-of-plane deformations (i.e., bending), as a continuous model would be unstable because of its second-derivative term. Specifically, we employ a hinge-based model [26], which is commonplace in the CG industry. Employing a discrete model for out-of-plane deformations does not affect the up-sampling and down-sampling of in-plane deformations. However, in future work, if we introduce homogenization methods to the out-of-plane deformation, we may need to adopt a continuous model, such as [27].

Robust Warping Stiffness
To apply the linear strain tensor for large deformations, co-rotational methods have been proposed [25,28]. However, these have rarely been applied to membrane elements such as cloth, because the rotation matrix of each node will be unstable when computing from a plane in 3D space. To deal with this, methods that rotate the stiffness matrix of each triangle have been proposed [29][30][31], but this is a tedious job compared to rotating the stiffness matrix after assembly. On the contrary, in our experiment, the method described below is approximately six times faster than previous methods.
To obtain a rotation matrix for each node, we follow the oriented particles approach [32]. Moreover, to conform the normal vector z 2 R 3 of the current deformed vertex with the initial normal vector Z 2 R 3 rotated by the current rotation matrix, we add a revision matrix zZ T to a moment matrix A i . Given the rest position x 0j , current position x j , and mass m j of vertex j that neighbors vertex i, and the current and rest mass centers c and c 0 , respectively, A i is computed as 14) where N i is the one-ling neighborhood of node i, M D P j2N i m j , and the inertia moment A j ellip is defined as where a, b, and c are the radii of an ellipsoid with rotational inertia equivalent to the triangles surrounding node i. R i 2 R 3 3 is the rotation matrix defined at each node. Following Muller et al. [33], we choose optimal radii such that the moment matrix A i is neither singular nor unstable. Then, using singular value decomposition [25], A i is written as USW T . The rotation matrix R is computed as Using the rotation matrix R, the elastic force f i can be written as where k ij is the component of the stiffness matrix associated with vertices i and j.

Time Integration
We need to solve the following differential equation to determine the motion of the deformed cloth: where M is a diagonal mass density matrix and D is a damping matrix. To solve this equation, we use an implicit Euler method because of its stability. As our approach dissipates the internal energy, we use the commonly employed Rayleigh damping term.

LOCALIZATION IN IN-PLANE DEFORMATION
With the techniques described earlier, we can obtain the deformation of a coarse mesh that is similar to the down-sampled high-resolution simulation. As the final runtime procedure, we up-sample the fine mesh vertex positions from the coarse mesh deformation by interpolating the precomputed characteristic displacements. Localization is divided into three steps ( Figure 3). First, we compute the in-plane strain from each current unit cell in the 3D space at each time step. Then, using the in-plane strain and characteristic displacements computed in the homogenization process, we determine the in-plane deformation. Finally, the in-plane deformation is transformed to the current position in 3D space.

In-plane Strain Metrics
In this section, we explain how to compute the microscopic strain from the macroscopic deformation obtained in the method described in the previous section. The microscopic deformation is obtained with linear combination of characteristic deformations for each modes of strain (Equation (6)). Using the generalized coordinates system, we efficiently obtain the in-plane strain and stress on the triangle meshes [34]. First, to compare the current deformation with the initial deformation, covariant vectors are introduced. Two triangle edges are selected as basis vectors G 1 , G 2 . The other basis vector is the normalized cross-vector of G 1 and G 2 . Note that these basis vectors are not orthonormal. Covariant vectors enable us to compute the in-plane strain E in .u, v/-space as follows: where G i , g i 2 R 3 are undeformed and deformed covariant vectors, respectively, and G i 2 R 3 is the undeformed contravariant vector such that G i G j D ı j i . We can obtain the fine displacement by multiplying the characteristic displacements by the in-plane strains:   Here, is computed in advance during the homogenization step. This quasi-static approach allows us to reduce the computation time without losing fine heterogeneous detail.

In-plane Deformation Transfer
However, as the cloth is deformed in 3D space, we cannot apply Equation (20) directly for interpolation, because the strains and displacements are only defined in the 2D plane. Therefore, we superimpose the microscopic displacements w on the current deformed triangle meshes.
Let v 0 i 2 R 3 and v i 2 R 3 i 2 f1, 2, 3g be the initial and deformed vertices of the triangle, respectively. Following the frame definition on a triangle in [35], we add a fourth initial vertex as Using an undeformed matrix V 0 D˚v 0 Interpolated microscopic deformations on the .u, v/-plane are translated into current deformed coarse triangle in 3D space. The displacement for any vertex x i inside this triangle can be computed as where x 0 is the present position of the vertex on a unit cell that corresponds to a coarse mesh, w i is the displacement of fine mesh vertex i on a unit cell, and x 0 i , x 0 0 are the initial positions of x i and x 0 , respectively. We blend the displacements across adjacent unit cells to avoid discontinuities without any artifacts. In each coarse triangle, however, bending deformation never occurs, giving an unnatural appearance. Therefore, we employ a barycentric interpolation of the normal vectors in the up-sampled cloth. Although we have not considered the addition of plausible wrinkles to the coarse simulation, this framework enables us to add appropriate wrinkles based on mechanical information. Correlating the wrinkles with internal strain will be considered in future work.

RESULTS
We applied our framework to the deformation of an inhomogeneous shell in which soft and hard materials repeat line-by-line (Figure 4). As the results in Figure 5 illustrate, the anisotropic homogenized coarse meshes behaved similarly to the high-resolution simulation using heterogeneous materials. As shown in Figure 6, microscopic deformations are also exhibited on coarse meshes because of localization, thus behaving similarly to nonhomogeneous materials. Although the high-resolution simulation took 1250 milliseconds per time step, the simulation using our method required 19.0 milliseconds for the precomputation step and 2.65 milliseconds per time step during runtime. Note that if the resolution of the coarse meshes increases, the difference in computational times will decrease slightly, because the computation time includes collision handling. The proposed method is about 470 times faster than the naive high-resolution simulation. Note that this comparison is performed with linear solver using naive Gaussian elimination method for full-matrix. As shown in Figure 7, errors in the strain for 1 cm 1 cm unit cells are small enough to be observed, because most cloth simulators allow cloth to deform in up to 10% strain [6]. Therefore, localization is a practical method of simulating cloth that has linear microscopic characteristics. As an application of our method, we tested more complex geometric details made up of three different stiffness parameters ( Figure 8). While the vertices in the unit cell were located constantly without localization, it is shown that the stiffness of the elements affects the microscopic deformation with localization. That is, soft parts of the unit cell stretched widely, and hard parts were prone to remain in their original shape. In this case, the homogenization process took 2400 milliseconds, and the runtime simulation took 4.97 milliseconds per time step. All simulations were performed on a laptop PC with an Intel Core2 DuoTM 3.0 GHz processor.

CONCLUSION AND FUTURE WORK
We introduced an efficient simulation technique for nonhomogeneous elastic cloth and presented a robust and fast simulation method by leveraging a stiffness warping technique. Our application is limited to the up-sampling of in-plane deformations with periodic square unit cells, because our method is based on in-plane homogenization. In future work, we plan to extend the current in-plane homogenization technique to include out-of-plane deformations (i.e., buckling and wrinkling). We expect the proposed technique to prove useful in accelerating yarn-based cloth simulation and other applications.