Frequently Asked Questions
















  Site Hosted by:

SourceForge.net Logo


Support This Project


What is a local and world transformation?

Transformations:


figure 1.

figure 2.

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.

A local transformation can be more difficult to understand. The idea is that the origin for the transformation is relative to the parent bone. The local transformation for Bone B, in the figure to the right, is a rotation of 90 degrees, and an offset in the positive x-axis. By comparison the world transformation for Bone B, would be the parent bone's rotation (15 degrees), then the local bone's rotation (-90 degrees) so (15 degrees - 90 degrees = 75 degrees). And the offset would be from the origin labeled "world origin".

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.

© Copyright 2006 John Butterfield.
All Rights Reserved.