Confusions with skeletal animations

I thought that a joint with no rotations, points to the z+ direction, …

Joints are just coordinate frames (aka frames-of-reference). Like all frames, they have an orientation for the axis vectors (a rotation) and an origin (a translation) defined relative to some parent coordinate frame.

There’s no firm convention in skeletal animation for how “joint space” (a joint’s local space) is oriented by default, or how “bones” (connections between this joint and other connected joints) are oriented within that local joint’s space by default. Different 3D modeling packages have different conventions here. However, as much as possible you don’t want your software to care about these conventions.

For the global transforms I used something like:


if(!Joint.Parent)
    Joint.GlobalTransform = Joint.LocalTransform;
else
    Joint.GlobalTransform = Joint.Parent.GlobalTransform * Joint.LocalTransform;

Math-wise this looks fine. Though since we’re talking about the bind pose, I would suggest different terminology.

Often times,

  • LOCAL (L) transform means the joint-to-parent joint transform in the CURRENT POSE, and
  • GLOBAL (G) transform means the joint-to-root joint transform in the CURRENT POSE.

Since you haven’t even described transforms for the CURRENT POSE, we’re implicitly talking about the BIND POSE here.

In that case, I might suggest alternate terminology:

  • ORIENTATION (O) transform means the joint-to-parent joint transform in the BIND POSE, and
  • BIND POSE (B) transform means the joint-to-root joint transform in the BIND POSE.

With distinct terminology for transforms in the BIND POSE vs. the CURRENT POSE, it’s easier to talk about and harder to get confused. It also completely explains what the “BIND POSE” and “INVERSE BIND POSE” transforms are. The “INVERSE BIND POSE” transform is one of the few constants in terminology across skeletal animation literature. So that’s useful.

Ultimately though, it’s up to you what you call it. That’s just my suggestion based on the reading I’ve done.