The "Bind Pose" Explanation
The "bind pose" is often the most confusing aspect of learning to program the skinnig API yet the absolute most important concept to understand. The "bind pose" is the pose of the mesh object, the skeleton and their relative offsets at the moment the skeleton is bound to the mesh object and before any deformations begin to occur. This pose will often look like that shown in the figure above with the arms stretched out and level with the shoulders, and with the skeleton aligned with the limbs of the mesh object:
At this very moment, when the skeleton bones get bound to the mesh (via the bone/vertex assignments with corresponding weight values), a "snapshot" matrix called the "(Worldspace) Bind Pose Matrix" is taken for every bone/joint and the mesh itself (not to be confused with the local transformation matrix). These are very key and important matrices for skinning. The Bind Pose Matrices are stored in the instance definitions defining the mesh object and the skeleton bones/joints (bones/joints in the NuGraf toolkit are just NULL nodes, or empty instances as they are often called). The Bind Pose Matrices define the original world-space location of the mesh and bones/joints at the time of binding.
How are Bind Pose Matrices used during skinning deformation? This is the key point to comprehend: the matrices allow a raw vertex of the mesh (in local coordinates) to be transformed into world-space and then to each bone's local coordinate space, after which each bone's animation can be applied to the vertex in question (under the influence of the weighting value).
The mesh's bind pose takes the vertex from local space to world-space, and then each bone's inverse bind pose takes the mesh vertex from world-space to the local space of that bone. Once in the bone's local space, the bone's current animated transformation matrix is used to transform (deform) the vertex's location. After all the bone influences have been taken into account, the vertex ends up in world-space in its final deformed location. In other words, these bind pose matrices relate the location of a vertex in its local mesh space to the same location of the vertex relative to each bones' local coordinate systems. Once this relation is known, via the bind pose matrices, it is easy to deform the mesh vertices by animating the bones.
All you need to keep in mind is that the mesh's Bind Pose Matrix takes its vertices into world-space, to the location at the time of binding, and each bones' Bind Pose Matrix takes the bones from local space to world-space at the time of binding.
All you need to keep in mind is that the mesh's Bind Pose Matrix takes its vertices into world-space, to the location at the time of binding, and each bones' Bind Pose Matrix takes the bones from local space to world-space at the time of binding.
No comments:
Post a Comment