- Edited
Transform Constraint: Bones Order
Hi everyone!
I'm posting this in case anyone had the same issue, and want to know how to fix it.
Until today I didn't understand why some of my Transform Constraints weren't working normally.
Sometimes, when constraining several bones to one, it looked like this:
What I'm trying to do in the screenshot is constraining the tail bones (which are nested) to the bone on the right, the one I'm rotating. The result were the bones rotating each from their own axis, instead of using that nested configuration.
I thought the problem was related to how I was spliting the bones or the father-son bones relation, but today I realized it was about the order of the bones inside the Transform Constraint.
So in the previous screenshot my bones where looking like this, from last to first (9 to 3):
I tried changing the order in which I was selecting the bones when adding them to the constraint (first to last)... And it worked!
I don't really understand why this happens, and how Spine is working in the background. I really was assuming that the Transform Constraint would respect the father-son relation of my bones, but it didn't.
So, if any of you are struggling with the same issue, now you know
Hope it helps! Thanks!
Usually people have trouble with the order constraints are applied, but the order of constrained bones for a single constraint can also matter in some cases. Constraint order docs:
Constraints: Order
Note you can drag to reorder the bones in the transform constraint bone select box: Image removed due to the lack of support for HTTPS. | Show Anyway
First bone world transforms are computed using the bone hierarchy, then constraints are applied. After a constraint is applied that affected a bone's world transform, the world transforms are recomputed for that bone and all its descendants. This is what causes the descendants to be affected by the changes to the constrained bone. When a world transform is recomputed, it is done using the bone's original local transform. Any changes to the local or world transform made by constraints is lost.
Transform constraint has a Local
mode which modifies the local transform and recomputes the world transform for each constrained bone when the constraint is applied. Next the world transforms are recomputed for any descendant bones, however, not for descendant bones which were constrained by the transform constraint. If the constrained bones were recomputed, then the changes the constraint just made would be lost!
If you order the constrained bones so the constraint is applied in the opposite order of the bone hierarchy, then the child bones are recomputed before the constraint changes their parent bones. That is why you see the child bones not affected by the changes to the parents.
If we only had the normal bone hierarchy transform, everything would be nice and tidy. But then constraints come along and modify things, causing bones to be recomputed, and the order of the modifications becomes important. Unfortunately there's no easy way to simplify the process.