Historical Prospective Objective, scope and limitations



Download 349.66 Kb.
Page4/10
Date20.10.2016
Size349.66 Kb.
#6497
1   2   3   4   5   6   7   8   9   10



Cloth modelling



Cloth modelling is the term used for simulating cloth within a computer program usually in the realm of computer graphics . The main approaches used for this may be classified into three basic types: geometric, physical, and particle/energy.

Most models of cloth are based on "particles" of mass connected together in some manner of mesh. Newtonian Physics is used to model each particle through the use of a "black box" called a physics engine. This involves using the basic law of motion (Newton's Second Law):


\vec{f} = m \vec{a}

In all of these models, the goal is to find the position and shape of a piece of fabric using this basic equation and several other methods.


Geometric methods

Weil pioneered the first of these, the geometric technique, in 1986.[1] His work was focused on approximating the look of cloth by treating cloth like a collection of cables and using Hyperbolic cosine (catenary) curves. Because of this, it is not suitable for dynamic models but works very well for stationary or single-frame renders [1]. This technique creates an underlying shape out of single points; then, it parses through each set of three of these points and maps a catenary curve to the set. It then takes the lowest out of each overlapping set and uses it for the render.



Physical methods

The second technique treats cloth like a grid work of particles connected to each other by springs. Whereas the geometric approach accounted for none of the inherent stretch of a woven material, this physical model accounts for stretch (tension), stiffness, and weight:



E(Particlei,j) = ksEs,i,j + kbEb,i,j + kgEg,i,j

  • s terms are elasticity (by Hooke's Law)

  • b terms are bending

  • g terms are gravity (see Acceleration due to gravity)

Now we apply the basic principle of mechanical equilibrium in which all bodies seek lowest energy by differentiating this equation to find the minimum energy.

Particle/energy methods

The last method is more complex than the first two. The particle technique takes the physical technique from (f) a step further and supposes that we have a network of particles interacting directly. That is to say, that rather than springs, we use the energy interactions of the particles to determine the cloth’s shape. For this we use an energy equation that adds on to the following:



UTotal = URepel + UStretch + UBend + UTrellis + UGravity

  • The energy of repelling is an artificial element we add to prevent cloth from intersecting itself.

  • The energy of stretching is governed by Hooke's law as with the Physical Method.

  • The energy of bending describes the stiffness of the fabric

  • The energy of trellising describes the shearing of the fabric (distortion within the plane of the fabric)

  • The energy of gravity is based on acceleration due to gravity

We can also add terms for energy added by any source to this equation, then derive and find minima, which generalizes our model. This allows us to model cloth behaviour under any circumstance, and since we are treating the cloth as a collection of particles its behaviour can be described with the dynamics provided in our physics engine.
Dynamics

Soft body dynamics

Soft body dynamics is a field of computer graphics that focuses on visually realistic physical simulations of the motion and properties of deformable objects (or soft bodies). The applications are mostly in video games and film. Unlike in simulation of rigid bodies, the shape of soft bodies can change, meaning that the relative distance of two points on the object is not fixed. While the relative distances of points are not fixed, the body is expected to retain its shape to some degree (unlike a fluid). The scope of soft body dynamics is quite broad, including simulation of soft organic materials such as muscle, fat, hair and vegetation, as well as other deformable materials such as clothing and fabric. Generally, these methods only provide visually plausible emulations rather than accurate scientific/engineering simulations, though there is some crossover with scientific methods, particularly in the case of finite element simulations. Several physics engines currently provide software for soft-body simulation.

Deformable solids


The simulation of volumetric solid soft bodies can be realised by using a variety of approaches.

Mass-spring models


http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/two_nodes_as_mass_points_connected_by_parallel_circuit_of_spring_and_damper.svg/220px-two_nodes_as_mass_points_connected_by_parallel_circuit_of_spring_and_damper.svg.png

In this approach, the body is modeled as a set of point masses (nodes) connected by ideal weightless elastic springs obeying some variant ofHooke's law. The nodes may either derive from the edges of a two-dimensional polygonal mesh representation of the surface of the object, or from a three-dimensional network of nodes and edges modeling the internal structure of the object (or even a one-dimensional system of links, if for example a rope or hair strand is being simulated). Additional springs between nodes can be added, or the force law of the springs modified, to achieve desired effects. Applying Newton's second law to the point masses including the forces applied by the springs and any external forces (due to contact, gravity, air resistance, wind, and so on) gives a system of differential equations for the motion of the nodes, which is solved by standard numerical schemes for solving ODEs. Rendering of a three-dimensional mass-spring lattice is often done using free form deformation, in which the rendered mesh is embedded in the lattice and distorted to conform to the shape of the lattice as it evolves.


Finite element simulation


This is a more physically accurate approach, which uses the widely used finite element method to solve the partial differential equations which govern the dynamics of an elastic material. The body is modeled as a three-dimensional elastic continuum by breaking it into a large number of solid elements which fit together, and solving for the stresses and strains in each element using a model of the material. The elements are typically tetrahedral, the nodes being the vertices of the tetrahedra (relatively simple methods exist[10][11] to tetrahedralize a three dimensional region bounded by a polygon mesh into tetrahedra, similarly to how a two-dimensional polygon may be triangulated into triangles). The strain (which measures the local deformation of the points of the material from their rest state) is quantified by the strain tensor \boldsymbol{\epsilon}. The stress (which measures the local forces per-unit area in all directions acting on the material) is quantified by the stress tensor \boldsymbol{\sigma}. Given the current local strain, the local stress can be computed via the generalized form of Hooke's law \boldsymbol{\sigma} = \mathsf{c} \boldsymbol{\varepsilon} \ ,  where \mathsf{c} is the "elasticity tensor" which encodes the material properties (parametrized in linear elasticity for an isotropic material by the Poisson ratio and Young's modulus).

The equation of motion of the element nodes is obtained by integrating the stress field over each element and relating this, via Newton's second law, to the node accelerations.

Pixelux (developers of the Digital Molecular Matter system) use a finite-element-based approach for their soft bodies, using a tetrahedral mesh and converting the stress tensor directly into node forces. Rendering is done via a form of free form deformation.

Energy minimization methods


This approach is motivated by variational principles and the physics of surfaces, which dictate that a constrained surface will assume the shape which minimizes the total energy of deformation (analogous to a soap bubble). Expressing the energy of a surface in terms of its local deformation (the energy is due to a combination of stretching and bending), the local force on the surface is given by differentiating the energy with respect to position, yielding an equation of motion which can be solved in the standard ways.

Shape matching


In this scheme, penalty forces or constraints are applied to the model to drive it towards its original shape (i.e. the material behaves as if it has shape memory). To conserve momentum the rotation of the body must be estimated properly, for example via polar decomposition. To approximate finite element simulation, shape matching can be applied to three dimensional lattices and multiple shape matching constraints blended.

Rigid-body based deformation


Deformation can also be handled by a traditional rigid-body physics engine, modelling the soft-body motion using a network of multiple rigid bodies connected by constraints, and using (for example) matrix-palette skinning to generate a surface mesh for rendering. This is the approach used for deformable objects in Havoc.

Cloth simulation

In the context of computer graphics, cloth simulation refers to the simulation of soft bodies in the form of two dimensional continuum elastic membranes, that is, for this purpose, the actual structure of real cloth on the yarn level can be ignored (though modelling cloth on the yarn level has been tried). Via rendering effects, this is capable of producing a visually plausible emulation of textiles and clothing, used in a variety of contexts in video games, animation, and film. It can also be used to simulate two dimensional sheets of materials other than textiles, such as deformable metal panels or vegetation. In video games it is often used to enhance the realism of clothed characters, which otherwise would be entirely animated.

Cloth simulators are generally based on mass-spring models, but a distinction must be made between force-based and position-based solvers.

Force-based cloth


The mass-spring model (obtained from a polygonal mesh representation of the cloth) determines the internal spring forces acting on the nodes at each time step (in combination with gravity and applied forces). Newton's second law gives equations of motion which can be solved via standard ODE solvers. To create high resolution cloth with a realistic stiffness is not possible however with simple explicit solvers (such as forward Euler integration), unless the time step is made too small for interactive applications (since as is well known, explicit integrators are numerically unstable for sufficiently stiff systems). Therefore implicit solvers must be used, requiring solution of a large sparse matrix system (via e.g. the conjugate gradient method), which itself may also be difficult to achieve at interactive frame rates. An alternative is to use an explicit method with low stiffness, with ad hoc methods to avoid instability and excessive stretching (e.g. strain limiting corrections).

Position-based dynamics


To avoid needing to do an expensive implicit solution of a system of ODEs, many real-time cloth simulators (notably PhysXHavok Cloth, and Maya nCloth) use position based dynamics(PBD), an approach based on constraint relaxation. The mass-spring model is converted into a system of constraints, which demands that the distance between the connected nodes be equal to the initial distance. This system is solved sequentially and iteratively, by directly moving nodes to satisfy each constraint, until sufficiently stiff cloth is obtained. This is similar to a Gauss-Seidel solution of the implicit matrix system for the mass-spring model. Care must be taken though to solve the constraints in the same sequence each timestep, to avoid spurious oscillations, and to make sure that the constraints do not violate linear and angular momentum conservation. Additional position constraints can be applied, for example to keep the nodes within desired regions of space (sufficiently close to an animated model for example), or to maintain the body's overall shape via shape matching.



Download 349.66 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9   10




The database is protected by copyright ©ininet.org 2024
send message

    Main page