Skeleton

From Valve Developer Community
Revision as of 14:55, 3 May 2008 by Beeswax (talk | contribs) (WIP)
Jump to navigation Jump to search
Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

A model's Skeleton is sometimes called the model's Rig or Bonetree. Every model in Source must have a Skeleton, even if it is just a single, invisible "bone". A Model's Skeleton is the reference framework for all of the model's vertex geometry, and it is the Skeleton's "rootbone" that locates the model's geometry to the Model Entity's position and orientation in the World.

A Model's Rendered Skin is projected over the Mesh which envelopes the Skeleton.

Every Skeleton must have:

  • a rootbone.

Skeleton Types

By far the most important distinction between types of Skeleton is whether they are Rigid or NotRigid.

Rigid Skeleton

Most models in source have Rigid Skeletons, which means they may change position and orientation, but the may not articulate - none of their 'internal' geometry can change. Happily, a Rigid Skeleton is so simple and easy to configure automatically that it is often overlooked. ....

// eg: a "default" skeleton :
version 1
nodes
  0 "static_prop" -1
end
skeleton
time 0
  0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
end
triangles
// ...

NotRigid Skeleton

only when the Skeleton has more than one bone can it have a joint to articulate. ...

Bone hierarchy (summary)

Rigging

Vertex geometry

Todo: probably move this section out to its own page ?
  • Vertex Geometry = 3D coordinates (XYZ axes) and sometimes vertex Normal vectors.
    • Vertex coordinates are measured on XYZ axes from either the WorldOrigin or an EntityOrigin.
      • WorldOrigin= worldspawn entity's position which is always the map origin (0,0)
      • EntityOrigin = the WorldPosition of that entity.
      • BoneOrigin = Studiomodel vertices are enveloped to one or more Bones in the model's Skeleton.
    • Vertex Normals are used to imply a Surface Normal as if the vertex is the center of a surface rather than a vertex. This creates a kind of pseudo-subdivision surface, used by the Smoothing (Shader?).
  • Origin : Every game entity that can move has an origin. Every game entity that has non-brush geometry has an origin. All brush vertex geometry is related to the map origin = worldspawn entity.


  • Studiomodel geometry (vertex $origin = entity WorldPosition & angles
  • Brush geometry (vertex origin = worldspawn entity)
  • non-vertex geometry (entities)
    • sphere : eg light - radius = range/distance
    • cone : eg light_spot - angles = direction, FOV = cone arc, ? = range/distance