1
$\begingroup$

How does matrix_basis vs matrix_local work for object parented to bones?

Looks like matrix_local changes when the armature is animated?

I'm trying to get bone parenting work correctly for the glTF exporter and thinking that maybe it should use matrix_parent_inverse * matrix_basis instead for getting object's local matrix, but not sure if that would break other stuff.

$\endgroup$
0
$\begingroup$
  • matrix_basis is simply a way to access the pose-bone or objects (location,scale,rotation) properties.

    This is just for convenience - so you don't have to consider if euler/quaternion/axis-angle rotation are used when getting/setting a transformation.

  • matrix_local is the the objects world-space 4x4 matrix, relative to it's parent, if it has a parent - if the parent is a bone or a vertex, it will be relative to the parent matrix defined by the vertex/bone parent relationship.

$\endgroup$
2
  • $\begingroup$ Hmmm something is acting weird then, in latest 2.80 I see matrix_local for my object (parented to a bone) changing when the bone is animated, even though the child object doesn't move in relation to the bone $\endgroup$ – pjoe Feb 8 '19 at 10:15
  • 2
    $\begingroup$ Ok looks like the change in matrix_local are very small (1e-06), so maybe just some math rounding :) $\endgroup$ – pjoe Feb 8 '19 at 10:16

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.