The simulation of volumetric solid soft bodies can be realised by using a variety of approaches.
Spring/mass models In this approach, the body is modeled as a set of
point masses (nodes) connected by ideal weightless
elastic springs obeying some variant of
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. 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. Assuming all point masses equal to zero one can obtain the
Stretched grid method aimed at several engineering problems solution relative to the elastic grid behavior. These are sometimes known as
mass-spring-damper models. In pressurized soft bodies spring-mass model is combined with a pressure force based on the
ideal gas law.
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 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
Cauchy 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.
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, modeling 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
Havok Destruction. == Cloth simulation ==