|
|
Line 1: |
Line 1: |
| '''Soft body [[dynamics (mechanics)|dynamics]]''' is a field of [[computer graphics]] that focuses on visually realistic physical [[computer simulation|simulations]] of the motion and properties of [[deformation (engineering)|deformable]] objects (or ''soft bodies'').<ref>{{cite web|id = {{citeseerx|10.1.1.124.4664}}|title=Physically Based Deformable Models in Computer Graphics|year=2005|author=Nealen, Müller, Keiser, Boxerman & Carlson}}</ref> The applications are mostly in video games and film. Unlike in simulation of [[rigid body|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.<ref>{{cite web|url=http://numerion-software.com|title=Numerion Software - Carbon Physics}}</ref><ref>
| | The author is called Araceli Gulledge. To play croquet is the pastime I will by no means stop doing. I am a manufacturing and distribution officer. Years ago we moved to Kansas.<br><br>Feel free to surf to my web site :: [http://hs-s.com/dayz/home/index.php?mod=users&action=view&id=8983 auto warranty] |
| {{cite web|url=http://developer.nvidia.com/object/physx_features.html#soft|title=PhysX soft bodies}}</ref><ref>{{cite web|url=http://www.pixelux.ch/content/view/31/45/|title=Pixelux's Digital Molecular Matter (DMM)}}</ref><ref>
| |
| {{cite web|url=http://www.havok.com/index.php?page=havok-cloth|title=Havok Cloth}}</ref><ref>
| |
| {{cite web|url=http://bulletphysics.org/wordpress/|title=Bullet Physics}}</ref><ref>
| |
| {{cite web|url=http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=13583239#channels_Dynamics,%20Effects%20&%20Simulation|title=Maya Nucleus}}</ref>
| |
| [[File:Blender3D HiddenTextSoftbody.ogg|400px|thumb|Softbody objects react to forces and are able to collide with other 3D objects. This example has been created with [[Blender (software)|Blender]].]]
| |
| | |
| == Deformable solids ==
| |
| | |
| The simulation of volumetric solid soft bodies can be realised by using a variety of approaches.
| |
| | |
| === Spring/mass models ===
| |
| | |
| [[File:Two nodes as mass points connected by parallel circuit of spring and damper.svg|thumb|Two nodes as mass points connected by a parallel circuit of a spring and a damper.]]
| |
| | |
| In this approach, the body is modeled as a set of point masses (nodes) connected by ideal weightless [[deformation (engineering)#Elastic deformation|elastic]] [[spring (device)|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 [[ordinary differential equation|ODEs]].<ref>{{cite web|url=http://www.multires.caltech.edu/pubs/GI99.pdf|title=Interactive animation of structured deformable objects|year=1999|author=Desbrun, Schroder & Barr}}</ref> Rendering of a three-dimensional mass-spring lattice is often done using [[free-form deformation]],<ref name="ffd">{{cite web|url=http://tom.cs.byu.edu/~557/text/3dffd.pdf|title=Free-Form Deformation of Solid Geometric Models|year=1986|author=Sederberg & Parry}}</ref> 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.
| |
| | |
| === Finite element simulation ===
| |
| | |
| This is a more physically accurate approach, which uses the widely used [[finite element method in structural mechanics|finite element method]] to solve the [[partial differential equations]] which govern the dynamics of an [[linear elasticity|elastic material]]. The body is modeled as a three-dimensional [[continuum mechanics|elastic continuum]] by breaking it into a large number of solid elements which fit together, and solving for the [[stress (mechanics)|stresses]] and [[deformation (mechanics)|strains]] in each element using a model of the material.<ref>{{cite web|url=http://graphics.ethz.ch/~smartin/data/publication_Kau08.pdf|title=Flexible Simulation of Deformable Models Using Discontinuous Galerkin FEM|year=2008|author=Kaufmann, Martin, Botsch & Gross}}</ref> The elements are typically tetrahedral, the nodes being the vertices of the tetrahedra (relatively simple methods exist<ref>{{cite web|url=http://cg.informatik.uni-freiburg.de/publications/volumetricMeshesVMV2006.pdf|title=Robust Tetrahedral Meshing of Triangle Soups|year=2006|author=Spillmann, Wagner & Teschner}}</ref><ref>{{cite web|url=http://physbam.stanford.edu/~fedkiw/papers/stanford2003-12.pdf|title=Adaptive Physics Based Tetrahedral Mesh Generation Using Level Sets|year=2003|author=Bridson, Teran, Molino & Fedkiw}}</ref> to ''tetrahedralize'' a three dimensional region bounded by a polygon mesh into [[tetrahedra]], similarly to how a two-dimensional [[polygon]] may be ''[[polygon triangulation|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#Infinitesimal strain tensor|strain tensor]] <math>\boldsymbol{\epsilon}</math>. The [[stress (mechanics)|stress]] (which measures the local forces per-unit area in all directions acting on the material) is quantified by the [[Cauchy stress tensor]] <math>\boldsymbol{\sigma}</math>. Given the current local strain, the local stress can be computed via the generalized form of [[Hooke's law]]:
| |
| <math>
| |
| \boldsymbol{\sigma} = \mathsf{C} \boldsymbol{\varepsilon} \ ,
| |
| </math>
| |
| where <math>\mathsf{C}</math> is the "[[constitutive equations|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.<ref name="pixelux">{{cite web|url=http://graphics.cs.berkeley.edu/papers/Parker-RTD-2009-08|title=Real-Time Deformation and Fracture in a Game Environment|year=2009|author=Parker & O'Brien}}</ref> Rendering is done via a form of [[free-form deformation]].<ref name="ffd" />
| |
| | |
| === Energy minimization methods ===
| |
| | |
| This approach is motivated by [[calculus of variations|variational principles]] and the physics of surfaces, which dictate that a constrained surface will
| |
| assume the shape which [[Minimum total potential energy principle|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.<ref>{{cite web|url=http://www.cs.ucla.edu/~dt/papers/siggraph87/siggraph87.pdf|title=Elastically Deformable Models|year=1987|author=Terzopoulos, Platt, Barr & Fleischer}}</ref><ref>{{cite web|url=http://www.cs.columbia.edu/cg/pdfs/1166238667-bendingCAGD.pdf|title=Discrete Quadratic Curvature Energies|year=2007|author=Wardetzky, Bergou, Harmon, Zorin & Grinspun}}</ref>
| |
| | |
| === Shape matching ===
| |
| | |
| In this scheme, penalty forces or constraints are applied to the model to drive it towards its original shape<ref name="shape">{{cite web|url=http://www.beosil.com/download/MeshlessDeformations_SIG05.pdf|title=Meshless Deformations Based on Shape Matching|year=2005|author= Müller, Heidelberger, Teschner & Gross}}</ref> (i.e. the material behaves as if it has [[shape memory alloy|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.<ref>{{cite web|url=http://graphics.ethz.ch/research/physics/fast_shape_matching.php|title=Fast Adaptive Shape Matching Deformations|year=2008|author=Steinemann, Otaduy & Gross}}</ref>
| |
| | |
| === 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) [[skeletal animation|matrix-palette skinning]] to generate a surface mesh for rendering. This is the approach used for deformable objects in [[Havok (software)#Havok Cloth and Destruction|Havok Destruction]].<ref>{{cite web|url=http://www.havok.com/index.php?page=havok-destruction|title=Havok Destruction}}</ref>
| |
| | |
| == 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 modeling cloth on the yarn level has been tried).<ref>{{cite web|url=http://www.graphics.cornell.edu/~jmkaldor/sg08_knityarns_sm.pdf|title=Simulating Knitted Cloth at the Yarn Level|year=2008|author=Kaldor, James & Marschner}}</ref> Via [[rendering (computer graphics)|rendering]] effects, this can produce 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 [[computer animation|animated]].
| |
| | |
| Cloth simulators are generally based on [[soft body dynamics#Mass-spring models|mass-spring models]], but a distinction must be made between force-based and position-based solvers.
| |
| | |
| === Force-based cloth ===
| |
| | |
| The [[soft body dynamics#Mass-spring models|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 [[ordinary differential equation|ODE]] solvers. To create high resolution cloth with a realistic stiffness is not possible however with simple [[explicit and implicit methods|explicit]] solvers (such as forward [[Euler integration]]), unless the timestep is made too small for interactive applications (since as is well known, [[numerical ordinary differential equations#The Euler method|explicit]] integrators are numerically unstable for sufficiently [[stiff equation|stiff]] systems). Therefore [[explicit and implicit methods|implicit solvers]] must be used,<ref>{{cite web|url=http://www.cs.cmu.edu/~baraff/papers/sig98.pdf|title=Large Steps in Cloth Simulation|year=1998|author=Baraff & Witkin}}</ref> 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<ref>{{cite web|id = {{citeseerx|10.1.1.89.9232}}|title=Collision and self-collision handling in cloth model dedicated to design garments|year=1997|author=Provot}}</ref><ref>{{cite web|url=http://graphics.stanford.edu/papers/cloth-sig02/cloth.pdf|title=Robust Treatment of Collisions, Contact and Friction for Cloth Animation|year=2002|author=Bridson, Fedkiw & Anderson}}</ref> 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 [[ordinary differential equation|ODEs]], many real-time cloth simulators (notably [[PhysX]], [[Havok (software)#Havok Cloth and Destruction|Havok Cloth]], and [[Autodesk Maya#Dynamics and simulation|Maya nCloth]]) use ''position based dynamics'' (PBD),<ref>{{cite web|url=http://www.matthiasmueller.info/publications/posBasedDyn.pdf|title=Position Based Dynamics|year=2006|author=Müller, Heidelberger, Hennix & Ratcliff}}</ref> 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 [[conservation of linear momentum|linear]] and [[conservation of angular momentum|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 ==
| |
| {{main|Collision detection}}
| |
| | |
| 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]] has presented a method which uses a global topological analysis of mesh intersections in configuration space to detect and resolve self-interpenetration of cloth.<ref>{{cite web|url=http://graphics.pixar.com/library/UntanglingCloth/paper.pdf|title=Untangling Cloth|year=2003|author=Baraff, Witkin & Kass}}</ref> 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 <math>O[n^2]</math> primitive collisions. Approaches used include:
| |
| | |
| * [[bounding volume hierarchy|Bounding volume hierarchies]] ([[axis-aligned bounding box|AABB]] trees,<ref>{{cite web|url=http://knight.temple.edu/~lakaemper/courses/cis350_2004/etc/jgt98deform.pdf|title=Efficient Collision Detection of Complex Deformable Models using AABB Trees|year=1998|author=Van Den Bergen}}</ref> [[oriented bounding box|OBB]] trees, sphere trees)
| |
| * Grids, either uniform<ref>{{cite web|url=http://www.beosil.com/download/CollisionDetectionHashing_VMV03.pdf|title=Optimized Spatial Hashing for Collision Detection of Deformable Objects|year=2003|author=Teschner, Heidelberger, Müller, Pomeranets & Gross}}</ref> (using [[hash table|hashing]] for memory efficiency) or hierarchical (e.g. [[Octree]], [[kd-tree]])
| |
| * Coherence-exploiting schemes, such as [[sweep and prune]] 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]] of brittle solids, [[cutting]]<ref>{{cite web|url=http://graphics.ethz.ch/~deniss/SCA06/SCA06_steinemann.pdf|title=Fast Arbitrary Splitting of Deforming Objects|year=2006|author=Steinemann, Otaduy & Gross}}</ref> of soft bodies, and [[tearing]] of cloth. The [[soft body dynamics#Finite element simulation|finite element method]] is especially suited to modelling fracture<ref name="pixelux"/> 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]].
| |
| * [[plasticity (physics)|Plasticity]]<ref name="shape"/> (permanent deformation) and [[melting]]<ref>{{cite web|url=http://www.inf.ethz.ch/personal/giesen/tch/AGCGsem_SS05/mueller.pdf|title=Point Based Animation of Elastic, Plastic and Melting Objects|year=2004|author=Müller, Keiser, Nealen, Pauly, Gross & Alexa}}</ref>
| |
| * Simulated hair,<ref name="sellehair">{{cite web|url=http://physbam.stanford.edu/~aselle/papers/9/|title=A Mass Spring Model for Hair Simulation|year=2008|author=Selle, Lentine & Fedkiw}}</ref> fur, and feathers
| |
| * Simulated organs for biomedical applications<ref>{{cite web|url=http://www.scientificamerican.com/article.cfm?id=virtual-surgery-computer-graphic|title=When Will Virtual Surgery Make the Cut?|year=2007|publisher=[[Scientific American]]}}</ref>
| |
| | |
| [[fluid simulation|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]] assumes the shape of whatever vessel contains it, as the particles are bound together by relatively weak forces.
| |
| | |
| == Engines supporting soft body physics ==
| |
| {{Prose|section|date=August 2013}}
| |
| {{external links|section|date=August 2013}}
| |
| <!-- Please: alphabetize items, unless another ordering rationale is superior for some reason, then state such and include a reference. -->
| |
| * [[Bullet (software)|Bullet]] 2.69
| |
| * Carbon, by Numerion Software<ref>{{cite web |url=http://www.numerion-software.com |title=Numerion Software Ltd |accessdate=15 July 2011}}</ref>
| |
| * [[CryEngine 3]] (http://mycryengine.com)
| |
| * [[Digital Molecular Matter]]
| |
| * [[Havok (software)#Havok Cloth and Destruction|Havok Cloth]]
| |
| * [[Autodesk Maya|Maya nCloth]]
| |
| * OpenTissue - (http://www.opentissue.org)
| |
| * [[OpenCloth]] - (http://code.google.com/p/opencloth) - A collection of source codes implementing cloth simulation algorithms as well as soft body dynamics in OpenGL.
| |
| * [[PAL (software)|Physics Abstraction Layer (PAL)]] - Uniform API, supports multiple physics engines.
| |
| * [[PhysX]]
| |
| * [[Phyz]] (Dax Phyz)
| |
| * [[Rigs of Rods]] - ([http://www.rigsofrods.com/ http://www.rigsofrods.com]) - Predecessor of [[BeamNG]].
| |
| * [[SOFA (Simulation Open Framework Architecture)]]
| |
| * [[Step (KDE)|Step]]
| |
| * [[Syflex]] (Cloth simulator)
| |
| * [[Unreal Engine 3]]
| |
| * [[BeamNG]] - (http://beamng.com)
| |
| | |
| == See also ==
| |
| * [[Deformable body]]
| |
| * [[Rigid body dynamics]]
| |
| * [[Cloth modeling]]
| |
| | |
| == References ==
| |
| {{Reflist}}
| |
| | |
| == External links ==
| |
| * [http://graphics.cs.cmu.edu/courses/15-869/ "The Animation of Natural Phenomena", CMU course on physically based animation, including deformable bodies]
| |
| * [http://youtube.com/watch?v=gbXCGpuJI7w Soft body dynamics video example]
| |
| * [http://vizproto.prism.asu.edu/classes/sp03/wyman_g/Soft%20Body%20Dynamics.htm Introductory article]{{deadlink|date=February 2013}}
| |
| * [http://www.teknikus.dk/tj/gdc2001.htm Article by Thomas Jakobsen which explains the basics of the PBD method]
| |
| | |
| [[Category:Classical mechanics]]
| |
| [[Category:3D computer graphics]]
| |
| [[Category:Video game development]]
| |
| [[Category:Computer physics engine]]
| |