Difference between revisions of "Skeletal animation"

From Valve Developer Community
Jump to: navigation, search
(talk about waffle!)
(reverted vandalism - please do not delete things you obviously do not understand)
Line 1: Line 1:
 
[[Image:Breen skeleton ref.jpg|150px|right|Skeleton in reference posture]]
 
[[Image:Breen skeleton ref.jpg|150px|right|Skeleton in reference posture]]
 
[[Image:Breen skeleton posed.jpg|150px|right|Skeleton during an animation]]
 
[[Image:Breen skeleton posed.jpg|150px|right|Skeleton during an animation]]
 +
'''[http://en.wikipedia.org/wiki/Skeletal_animation Skeletal animation]''' is a processor-efficient and relatively easy [http://en.wikipedia.org/wiki/3D_animation 3D animation] system applicable to any ''jointed'' model: from humans to insects to mechanical machinery.
  
'''[[Wikipedia:Skeletal animation|Skeletal animation]]''' is a [[cheap]] and easily-understandable [[Wikipedia:3D animation|3D animation]] technique that can be used to animate any rigid, jointed object, from humanoids to machinery.  
+
A [[Skeleton]] is a system of rigid [[bone]]s which determines the rendered model's (changing) pose. The model's [[Mesh]] vertices are [[envelope]]d to the bones so they follow their [[parentbone]]s' movements. Because the mesh is ''deformable'', mesh polygons that are [[weightmap]]ped across skeletal joints may stretch and compress as the joints are flexed.
  
A [[Skeleton]] itself is a system of rigid [[bone]]s which determines the model's pose at any given point in time. The model's vertices are [[envelope]]d to a single bone each, and follow that [[parentbone]]'s movements. Polygons that exist between envelopes stretch and compress as the joints are flexed.
+
Each Skeleton is arranged in a ''bonetree'' hierarchy, so moving a bone high up in the hierarchy causes all of its child bones to move in response; eg. moving the "forearm" forward causes the "hand" to move forward by the same distance and in the same direction. Although a bone may have multiple children, each bone connects to only one [[parentbone]]. The orientation of a ''childbone'' relative to its ''parentbone'' is defined by the childbone's one and only [[joint]].
  
Every skeleton has a 'bonetree' hierarchy. Moving a bone automatically causes any child bones to move in response, so rotating a forearm bone would cause the hand and finger bones for that arm to move with it. A bone can have any number of children but only one parent.
+
The bones of a flexible skeleton may be re-positioned by either Movement-system [[$sequence]]s or by Vphysics-system forces via the [[$collisionjoints]] rig. Currently Vphysics can only do Skeletal Animation; it cannot do Vertex, Particle or Texel animation.  
  
Bones can be manipulated with canned (i.e. hand-crafted, keyframed) [[$sequence]]s or, in the case of a [[$collisionjoints]] rig, by [[VPhysics]].
+
<!--
 +
Ragdoll system = Vphys motion applied to each $collisionmodel/physbone, constrained by vphys $jointconstraints, $mass ... deforms skeleton & moves entity.
 +
Movement system = canned/ keyframed/ forward kinematic animation with limited IK collision detection.
 +
-->
 +
 +
== Limitations and workarounds ==
 +
* ''Each bone must be rigid''. A length of chain can be accurately simulated by assigning a single bone to each link, whereas a length of rope would require an almost infinite number of microscopic bones to simulate its full flexibility. Increasing the number of bones makes the skeleton more complex, which undermines the great advantage of skeletal animation: simplicity, both for editing and processing.
  
== Limitations ==
+
* ''Each bone may have only one parentbone''. The bones in a sheet of cloth (eg chainmail) would be interconnected in a ''network'' rather than a ''hierarchy''. In this case we could use [[Vertex animation]] to deform the mesh directly, but note: there is currently no way to get Vphysics to apply directly to the mesh.
;Bones must be rigid
+
 
:A length of chain can be accurately simulated by assigning a single bone to each link, whereas a length of rope would require an almost infinite number of microscopic bones to simulate its full flexibility. Increasing the number of bones makes the skeleton more complex, which undermines the great advantage of skeletal animation: simplicity, both for the human animator and the electronic processor.
+
* ''Fluid dynamics'' like liquid flow, flames or smoke particles are not skeleton-friendly; the bonds between particles are neither rigid nor hierarchical. The [[info_particle_system|Particle animation]] system can be used to animate a ''point cloud'' of (overlapping) particle sprites, and liquids can be simulated with either [[Texel animation]]s (eg puddle or splash sprites) or a complex set of very carefully designed animated models (eg 3D waves).
;Bones can only have one parent
 
:So, for instance, a sheet of flexible cloth could not be accurately animated with a skeleton. The same is even more true of fluids or gasses (though for the latter, see [[Particle effects]]).
 
  
 
== See also ==
 
== See also ==
 
+
* [[Vertex animation]] is used to ''morph'' mesh vertices directly, e.g. animating faces.
+
* [[Vertex animation]] is used to ''morph'' mesh vertices directly, eg animating faces.
* [[Particle effects]] are used to 'animate' a clouds of particle sprites (see [[info_particle_system]]).
+
* [[Particle animation]] is used to animate a ''point cloud'' of particle sprites (see [[info_particle_system]]).
* [[Texel animation]] is standard, pixel-based 2D animation.
+
* [[Texel animation]] is used to have the appearance of a 2D surface change over time (see [[Animated textures]]).
* <code>[[$sequence]]</code> is used to define a skeletal animation in a model's [[QC]] file.
+
* [[$sequence]]s cannot re-scale bones dynamically ([http://www.brightcove.tv/title.jsp?title=900704395 though this can be achieved through other means])
* <code>[[$bonemerge]]</code> allows other models to move in hierarchy with a bone.
+
* [[$bonemerge]] allows sub-models to be included in the main model's sequences.
  
 
__NOEDITSECTION__
 
__NOEDITSECTION__
 
[[Category:Glossary]]
 
[[Category:Glossary]]
 
[[Category:Modeling]]
 
[[Category:Modeling]]

Revision as of 15:28, 23 May 2008

Skeleton in reference posture
Skeleton during an animation

Skeletal animation is a processor-efficient and relatively easy 3D animation system applicable to any jointed model: from humans to insects to mechanical machinery.

A Skeleton is a system of rigid bones which determines the rendered model's (changing) pose. The model's Mesh vertices are enveloped to the bones so they follow their parentbones' movements. Because the mesh is deformable, mesh polygons that are weightmapped across skeletal joints may stretch and compress as the joints are flexed.

Each Skeleton is arranged in a bonetree hierarchy, so moving a bone high up in the hierarchy causes all of its child bones to move in response; eg. moving the "forearm" forward causes the "hand" to move forward by the same distance and in the same direction. Although a bone may have multiple children, each bone connects to only one parentbone. The orientation of a childbone relative to its parentbone is defined by the childbone's one and only joint.

The bones of a flexible skeleton may be re-positioned by either Movement-system $sequences or by Vphysics-system forces via the $collisionjoints rig. Currently Vphysics can only do Skeletal Animation; it cannot do Vertex, Particle or Texel animation.


Limitations and workarounds

  • Each bone must be rigid. A length of chain can be accurately simulated by assigning a single bone to each link, whereas a length of rope would require an almost infinite number of microscopic bones to simulate its full flexibility. Increasing the number of bones makes the skeleton more complex, which undermines the great advantage of skeletal animation: simplicity, both for editing and processing.
  • Each bone may have only one parentbone. The bones in a sheet of cloth (eg chainmail) would be interconnected in a network rather than a hierarchy. In this case we could use Vertex animation to deform the mesh directly, but note: there is currently no way to get Vphysics to apply directly to the mesh.
  • Fluid dynamics like liquid flow, flames or smoke particles are not skeleton-friendly; the bonds between particles are neither rigid nor hierarchical. The Particle animation system can be used to animate a point cloud of (overlapping) particle sprites, and liquids can be simulated with either Texel animations (eg puddle or splash sprites) or a complex set of very carefully designed animated models (eg 3D waves).

See also