Soft body dynamics
Encyclopedia
Soft body dynamics
Dynamics (mechanics)
In the field of physics, the study of the causes of motion and changes in motion is dynamics. In other words the study of forces and why objects are in motion. Dynamics includes the study of the effect of torques on motion...

is a field of computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 that focuses on visually realistic physical simulations
Computer simulation
A computer simulation, a computer model, or a computational model is a computer program, or network of computers, that attempts to simulate an abstract model of a particular system...

 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
Rigid body
In physics, a rigid body is an idealization of a solid body of finite size in which deformation is neglected. In other words, the distance between any two given points of a rigid body remains constant in time regardless of external forces exerted on it...

, 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
Fluid
In physics, a fluid is a substance that continually deforms under an applied shear stress. Fluids are a subset of the phases of matter and include liquids, gases, plasmas and, to some extent, plastic solids....

). 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

In this approach, the body is modeled as a set of point masses (nodes) connected by ideal weightless elastic springs
Spring (device)
A spring is an elastic object used to store mechanical energy. Springs are usually made out of spring steel. Small springs can be wound from pre-hardened stock, while larger ones are made from annealed steel and hardened after fabrication...

 obeying some variant of Hooke's law
Hooke's law
In mechanics, and physics, Hooke's law of elasticity is an approximation that states that the extension of a spring is in direct proportion with the load applied to it. Many materials obey this law as long as the load does not exceed the material's elastic limit. Materials for which Hooke'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
Ordinary differential equation
In mathematics, an ordinary differential equation is a relation that contains functions of only one independent variable, and one or more of their derivatives with respect to that variable....

. 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
Finite element method in structural mechanics
The Finite element method is a powerful technique originally developed for numerical solution of complex problems in structural mechanics, and it remains the method of choice for complex systems. In the FEM, the structural system is modeled by a set of appropriate finite elements interconnected at...

 to solve the partial differential equations which govern the dynamics of an elastic material
Linear elasticity
Linear elasticity is the mathematical study of how solid objects deform and become internally stressed due to prescribed loading conditions. Linear elasticity models materials as continua. Linear elasticity is a simplification of the more general nonlinear theory of elasticity and is a branch of...

. The body is modeled as a three-dimensional elastic continuum
Continuum mechanics
Continuum mechanics is a branch of mechanics that deals with the analysis of the kinematics and the mechanical behavior of materials modelled as a continuous mass rather than as discrete particles...

 by breaking it into a large number of solid elements which fit together, and solving for the stresses and strains
Deformation (mechanics)
Deformation in continuum mechanics is the transformation of a body from a reference configuration to a current configuration. A configuration is a set containing the positions of all particles of the body...

 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 to tetrahedralize a three dimensional region bounded by a polygon mesh into tetrahedra, similarly to how a two-dimensional polygon
Polygon
In geometry a polygon is a flat shape consisting of straight lines that are joined to form a closed chain orcircuit.A polygon is traditionally a plane figure that is bounded by a closed path, composed of a finite sequence of straight line segments...

 may be triangulated
Polygon triangulation
In computational geometry, polygon triangulation is the decomposition of a polygonal area P into a set of triangles, i.e., finding the set of triangles with pairwise non-intersecting interiors whose union is P....

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 . The stress (which measures the local forces per-unit area in all directions acting on the material) is quantified by the stress tensor . Given the current local strain, the local stress can be computed via the generalized form of Hooke's law
Hooke's law
In mechanics, and physics, Hooke's law of elasticity is an approximation that states that the extension of a spring is in direct proportion with the load applied to it. Many materials obey this law as long as the load does not exceed the material's elastic limit. Materials for which Hooke's law...

:

where 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
Young's modulus
Young's modulus is a measure of the stiffness of an elastic material and is a quantity used to characterize materials. It is defined as the ratio of the uniaxial stress over the uniaxial strain in the range of stress in which Hooke's Law holds. In solid mechanics, the slope of the stress-strain...

).

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
Digital Molecular Matter
Digital Molecular Matter, better known as simply DMM, is a proprietary middleware physics engine developed by Pixelux. It is designed for computer, video games, and other simulation needs by attempting to simulate physical real-world systems...

 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
Calculus of variations
Calculus of variations is a field of mathematics that deals with extremizing functionals, as opposed to ordinary calculus which deals with functions. A functional is usually a mapping from a set of functions to the real numbers. Functionals are often formed as definite integrals involving unknown...

 and the physics of surfaces, which dictate that a constrained surface will
assume the shape which minimizes the total energy of deformation
Minimum total potential energy principle
The principle of minimum total potential energy is a fundamental concept used in physics, chemistry, biology, and engineering. It asserts that a structure or body shall deform or displace to a position that minimizes the total potential energy, with the lost potential energy being dissipated as heat...

 (analogous to a soap bubble
Soap bubble
A soap bubble is a thin film of soapy water enclosing air, that forms a hollow sphere with an iridescent surface. Soap bubbles usually last for only a few seconds before bursting, either on their own or on contact with another object. They are often used for children's enjoyment, but they are also...

). 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
Shape memory alloy
A shape-memory alloy is an alloy that "remembers" its original, cold-forged shape: returning the pre-deformed shape by heating. This material is a lightweight, solid-state alternative to conventional actuators such as hydraulic, pneumatic, and motor-based systems...

). 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
Physics engine
A physics engine is computer software that provides an approximate simulation of certain physical systems, such as rigid body dynamics , soft body dynamics, and fluid dynamics, of use in the domains of computer graphics, video games and film. Their main uses are in video games , in which case the...

, modeling the soft-body motion using a network of multiple rigid bodies connected by constraints, and using (for example) matrix-palette skinning
Skeletal animation
Skeletal animation is a technique in computer animation in which a character is represented in two parts: a surface representation used to draw the character and a hierarchical set of interconnected bones used to animate the mesh...

 to generate a surface mesh for rendering. This is the approach used for deformable objects in Havok Destruction.

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
Yarn
Yarn is a long continuous length of interlocked fibres, suitable for use in the production of textiles, sewing, crocheting, knitting, weaving, embroidery and ropemaking. Thread is a type of yarn intended for sewing by hand or machine. Modern manufactured sewing threads may be finished with wax or...

 level can be ignored (though modeling cloth on the yarn level has been tried). Via rendering
Rendering (computer graphics)
Rendering is the process of generating an image from a model , by means of computer programs. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene...

 effects, this can produce a visually plausible emulation of textiles and clothing
Clothing
Clothing refers to any covering for the human body that is worn. The wearing of clothing is exclusively a human characteristic and is a feature of nearly all human societies...

, 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
Computer animation
Computer animation is the process used for generating animated images by using computer graphics. The more general term computer generated imagery encompasses both static scenes and dynamic images, while computer animation only refers to moving images....

.

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 timestep (in combination with gravity and applied forces). Newton's second law gives equations of motion which can be solved via standard ODE
Ordinary differential equation
In mathematics, an ordinary differential equation is a relation that contains functions of only one independent variable, and one or more of their derivatives with respect to that variable....

 solvers. To create high resolution cloth with a realistic stiffness is not possible however with simple explicit
Explicit and implicit methods
Explicit and implicit methods are approaches used in numerical analysis for obtaining numerical solutions of time-dependent ordinary and partial differential equations, as is required in computer simulations of physical processes....

 solvers (such as forward Euler integration
Euler integration
In mathematics and computational science, the Euler method, named after Leonhard Euler, is a first-order numerical procedure for solving ordinary differential equations with a given initial value...

), unless the timestep is made too small for interactive applications (since as is well known, explicit integrators are numerically unstable for sufficiently stiff
Stiff equation
In mathematics, a stiff equation is a differential equation for which certain numerical methods for solving the equation are numerically unstable, unless the step size is taken to be extremely small. It has proved difficult to formulate a precise definition of stiffness, but the main idea is that...

 systems). Therefore implicit solvers
Explicit and implicit methods
Explicit and implicit methods are approaches used in numerical analysis for obtaining numerical solutions of time-dependent ordinary and partial differential equations, as is required in computer simulations of physical processes....

 must be used, requiring solution of a large sparse matrix
Sparse matrix
In the subfield of numerical analysis, a sparse matrix is a matrix populated primarily with zeros . The term itself was coined by Harry M. Markowitz....

 system (via e.g. the conjugate gradient method
Conjugate gradient method
In mathematics, the conjugate gradient method is an algorithm for the numerical solution of particular systems of linear equations, namely those whose matrix is symmetric and positive-definite. The conjugate gradient method is an iterative method, so it can be applied to sparse systems that are too...

), 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
Ordinary differential equation
In mathematics, an ordinary differential equation is a relation that contains functions of only one independent variable, and one or more of their derivatives with respect to that variable....

, many real-time cloth simulators (notably PhysX
PhysX
PhysX is a proprietary realtime physics engine middleware SDK developed by Ageia with the purchase of ETH Zurich spin-off NovodeX in 2004...

, Havok 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.

Collision detection for deformable objects

Realistic interaction of simulated soft objects with their environment may be important for obtaining visually realistic results. Cloth self-intersection is important in some applications for acceptably realistic simulated garments. This is challenging to achieve at interactive frame rates, particularly in the case of detecting and resolving self collisions and mutual collisions between two or more deformable objects.

Collision detection may be discrete/a posteriori (meaning objects are advanced in time through a pre-determined interval, and then any penetrations detected and resolved), or continuous/a priori (objects are advanced only until a collision occurs, and the collision is handled before proceeding). The former is easier to implement and faster, but leads to failure to detect collisions (or detection of spurious collisions) if objects move fast enough. Real-time systems generally have to use discrete collision detection, with other ad hoc ways to avoid failing to detect collisions.

Detection of collisions between cloth and environmental objects with a well defined "inside" is straightforward since the system can detect unambiguously whether the cloth mesh vertices and faces are intersecting the body and resolve them accordingly. If a well defined "inside" does not exist (e.g. in the case of collision with a mesh which does not form a closed boundary), an "inside" may be constructed via extrusion. Mutual- or self-collisions of soft bodies defined by tetrahedra is straightforward, since it reduces to detection of collisions between solid tetrahedra.

However, detection of collisions between two polygonal cloths (or collision of a cloth with itself) via discrete collision detection is much more difficult, since there is no unambiguous way to locally detect after a timestep whether a cloth node which has penetrated is on the "wrong" side or not. Solutions involve either using the history of the cloth motion to determine if an intersection event has occurred, or doing a global analysis of the cloth state to detect and resolve self-intersections. Pixar
Pixar
Pixar Animation Studios, pronounced , is an American computer animation film studio based in Emeryville, California. The studio has earned 26 Academy Awards, seven Golden Globes, and three Grammy Awards, among many other awards and acknowledgments. Its films have made over $6.3 billion worldwide...

 has presented a method which uses a global topological analysis of mesh intersections in configuration space to detect and resolve self-interpenetration of cloth. Currently, this is generally too computationally expensive for real-time cloth systems.

To do collision detection efficiently, primitives which are certainly not colliding must be identified as soon as possible and discarded from consideration to avoid wasting time.
To do this, some form of spatial subdivision scheme is essential, to avoid a brute force test of primitive collisions. Approaches used include:
  • Bounding volume hierarchies
    Bounding volume hierarchy
    A bounding volume hierarchy is a tree structure on a set of geometric objects. All geometric objects are wrapped in bounding volumes that form the leaf nodes of the tree. These nodes are then grouped as small sets and enclosed within larger bounding volumes...

     (AABB trees, OBB trees, sphere trees)
  • Grids, either uniform (using hashing
    Hash table
    In computer science, a hash table or hash map is a data structure that uses a hash function to map identifying values, known as keys , to their associated values . Thus, a hash table implements an associative array...

     for memory efficiency) or hierarchical (e.g. Octree
    Octree
    An octree is a tree data structure in which each internal node has exactly eight children. Octrees are most often used to partition a three dimensional space by recursively subdividing it into eight octants. Octrees are the three-dimensional analog of quadtrees. The name is formed from oct + tree,...

    , kd-tree
    Kd-tree
    In computer science, a k-d tree is a space-partitioning data structure for organizing points in a k-dimensional space. k-d trees are a useful data structure for several applications, such as searches involving a multidimensional search key...

    )
  • Coherence-exploiting schemes, such as sweep and prune
    Sweep and prune
    In physical simulations, sweep and prune is a broad phase algorithm used during collision detection to limit the number of pairs of solids that need to be checked for collision, i.e. intersection. This is achieved by sorting the starts and ends of the bounding volume of each solid along a number...

     with insertion sort, or tree-tree collisions with front tracking.
  • Hybrid methods involving a combination of various of these schemes, e.g. a coarse AABB tree plus sweep-and-prune with coherence between colliding leaves.

Other applications

Other effects which may be simulated via the methods of soft-body dynamics are:
  • Destructible materials: fracture
    Fracture
    A fracture is the separation of an object or material into two, or more, pieces under the action of stress.The word fracture is often applied to bones of living creatures , or to crystals or crystalline materials, such as gemstones or metal...

     of brittle solids, cutting
    Cutting
    Cutting is the separation of a physical object, or a portion of a physical object, into two portions, through the application of an acutely directed force. An implement commonly used for cutting is the knife or in medical cases the scalpel...

     of soft bodies, and tearing
    Tearing
    Tearing is the act of breaking apart a material by force, without the aid of a cutting tool. A tear in a piece of paper, fabric, or some other similar object may be the result of the intentional effort with one's bare hands, or be accidental...

     of cloth. The finite element method is especially suited to modelling fracture as it includes a realistic model of the distribution of internal stresses in the material, which physically is what determines when fracture occurs, according to fracture mechanics
    Fracture mechanics
    Fracture mechanics is the field of mechanics concerned with the study of the propagation of cracks in materials. It uses methods of analytical solid mechanics to calculate the driving force on a crack and those of experimental solid mechanics to characterize the material's resistance to fracture.In...

    .
  • Plasticity
    Plasticity (physics)
    In physics and materials science, plasticity describes the deformation of a material undergoing non-reversible changes of shape in response to applied forces. For example, a solid piece of metal being bent or pounded into a new shape displays plasticity as permanent changes occur within the...

     (permanent deformation) and melting
    Melting
    Melting, or fusion, is a physical process that results in the phase change of a substance from a solid to a liquid. The internal energy of a substance is increased, typically by the application of heat or pressure, resulting in a rise of its temperature to the melting point, at which the rigid...

  • Simulated hair, fur, and feathers
  • Simulated organs for biomedical applications


Simulating fluids in the context of computer graphics would not normally be considered soft-body dynamics, which is usually restricted to mean simulation of materials which have a tendency to retain their shape and form. In contrast, a fluid
Fluid
In physics, a fluid is a substance that continually deforms under an applied shear stress. Fluids are a subset of the phases of matter and include liquids, gases, plasmas and, to some extent, plastic solids....

 assumes the shape of whatever vessel contains it, as the particles are bound together by relatively weak forces.

Engines supporting soft body physics

  • Bullet
    Bullet (software)
    Bullet is an open source physics engine featuring 3D collision detection, soft body dynamics, and rigid body dynamics. It is used in games, and in visual effects in movies. The Bullet physics library is published under the zlib license. Erwin Coumans, its main author, worked for Sony Computer...

     2.69
  • Carbon, by Numerion Software
  • Digital Molecular Matter
    Digital Molecular Matter
    Digital Molecular Matter, better known as simply DMM, is a proprietary middleware physics engine developed by Pixelux. It is designed for computer, video games, and other simulation needs by attempting to simulate physical real-world systems...

  • FastLSM
  • Havok Cloth
  • Maya nCloth
  • OpenTissue
  • Physics Abstraction Layer (PAL) - Uniform API, supports multiple physics engines
  • PhysX
    PhysX
    PhysX is a proprietary realtime physics engine middleware SDK developed by Ageia with the purchase of ETH Zurich spin-off NovodeX in 2004...

  • Phyz
    Phyz
    Phyz is a public domain, 2.5D physics engine with built-in editor and DirectX graphics and sound. In contrast to most other real-time physics engines, it is vertex based and stochastic...

     (Dax Phyz)
  • SOFA (Simulation Open Framework Architecture)
    SOFA (Simulation Open Framework Architecture)
    SOFA is an Open Source framework primarily targeted at real-time physical simulation, with an emphasis on medical simulation. It is mostly intended for the research community to help develop newer algorithms, but can also be used as an efficient prototyping tool or as a physics engine...

  • Step
  • Syflex
    Syflex
    Syflex is one of the fastest and most powerful cloth simulators. It is being used by a wide range of creative companies and individuals, from big-name studios, to smaller special effects houses and independent animators. Syflex is available For Maya, Softimage, Houdini and LightWave....

     (Cloth simulator)
  • Unreal Engine 3
    Unreal Engine 3
    Unreal Engine 3 is a computer game engine developed by Epic Games. It is the third generation of Unreal Engine, designed for DirectX 9/10/11 personal computers , the Xbox 360, the PlayStation 3, the PlayStation Vita, the Wii U, Android and OpenGL-based operating systems such as iOS and Mac OS X...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK