7
$\begingroup$

After starting with a stock armature with a run cycle I added a few of my own bones for various armor pieces on my model. As the stock model is too large for my game and the engine requires me to apply the correct scale before export I scaled the armature down (my mesh is a child of it). After applying the new scale and viewing my run cycle the bones from the stock armature I built on top of are fine, where my new bones explode out to new positions in all directions. It feels to me like the individual origins of my new bones are offset somehow, obviously I have missed a crucial step when adding them, what was this step, and how can this problem be fixed?

Before: enter image description here

After applying scale: enter image description here

$\endgroup$
8
$\begingroup$

Generally if an armature already has animation data, it's not safe to scale it and apply the transformation. It has something to do with changing the armature object's transformation matrix, because each keyframes in an action for a bone is recorded and evaluated against it.

To illustrate, here I have a keyframed armature, and I just add a free-floating bone parented to torso:

img1

If I halve the armature's size in object mode, each bone's matrix stays the same:

img2

But after I apply the scale transformation, it's a different matrix for each bones:

img3

Whatever matrix operation is applied against the keyframe data, no longer turns out the correct transformation. In my experience, only free-floating bones are prone to this problem (the feet doesn't stray like this when animated in FK).

$\endgroup$
  • $\begingroup$ I invite correction, because my understanding of how transformation matrix works is still very limited. $\endgroup$ – Adhi Jun 17 '13 at 22:24
  • $\begingroup$ Great answer, I was completely unaware of this. All the affected bones are parented but free floating, so I think you are on money with my issue. I'll try connecting them directly and report back. $\endgroup$ – Marcus Gorillius Jun 17 '13 at 23:31
  • $\begingroup$ @MarcusGorillius feel free to upvote the answer too if you found it useful. $\endgroup$ – iKlsR Jun 17 '13 at 23:40
  • $\begingroup$ @iKlsR Absolutely, as soon as I have 15 rep I will :) $\endgroup$ – Marcus Gorillius Jun 18 '13 at 0:59
  • 1
    $\begingroup$ @stacker: I made a simple addon for learning about Blender's use of matrices. $\endgroup$ – Adhi Oct 25 '13 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.