![]() |
| Frequently Asked Questions |
|
What is a local and world transformation? Transformations:
A transformation is a term used to represent the offset and rotation of a bone. In figure 1 the bone is centered at the origin, and the x-axis (in red) is aligned towards the global x-axis. Thus, it has no rotation and no offset. The idea of a transformation is that if you had a set of points associated with a bone (like p1 and p2), and rotated them with the bone's rotation (around the origin for the bone), then move them with the bone's offset, this would be transforming the points by the bone (figure 2). The difference between a local transformation and a world transformation is just where the origin is considered to be for that bone. Bones that have world transformations all share the same origin, and the bones are all positioned and rotated in the world. An analogy would be if you had a pile of bones all at one point, and you had to assemble a skeleton, the transformation you apply to the bones to position them where they rightfully belong, is a world transformation.
Local transformations are useful because they allow for bones to be manipulated without risk of breaking the bones apart at the joints. This makes them very useful for rag-doll physics and for interpolating any bone between two poses. Local transformations, however, are not always the best thing to use. For example, transforming a point by a bone. If you want to achieve the proper result with local transformations, you'd have to start with the root node and traverse down the hierarchy to the bone, applying the transformation of each bone along the way. So ideally, you'd want to use world transforms when you're talking about transforming points and deforming a mesh, but you'd use local transformations for calculating poses.
|