Page MenuHome

animation of influence property of child constraint where parent object has a rotation can be quite unintuitive.
Closed, InvalidPublic


System Information
Linux bubastis 3.10.25-gentoo #10 SMP Thu Jan 30 22:17:35 UTC 2014 x86_64 Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz GenuineIntel GNU/Linux
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1) (prog-if 00 [VGA controller])

Blender Version
Broken: 2.72b
Worked: did it ever?

when animating the influence parameter of a child-of constraint to make an object move between two points the motion can end up being inexplicably non-linear when the parents are rotated.

Create two empties at different locations (e.g. [0,0,2] and [0,0,10] ) . Rotate both empties by -90d around the y axis.

Take the default cube and give it two child-of constraints. One constraint should be targeted at the first empty. It's influence should have two keyframes t0=1, influence=1 and t1=30, influence=0.

The second constraint should be targeted at the second empty. Its influence should have two keyframes t0=1, influence=0 and t1=30, influence=1.

Just to keep things simple, go into the fcurve editor and make both curves linear.

Use alt-A to start the animation. Notice how the cube follows a curved path. This is VERY nonintuitive. The same problem appears to affect child constraints targeted at the bones of armatures. The weirdness becomes even more pronounced if the object with the child constraints has a non-<0,0,0> location.

In my specific use case I'm animating an object that is alternately attached to bones, or traveling between bones in an armature. The empties appear to be an easily reproduced variation that I assume illustrates the same math oddity.



Event Timeline

Robert Forsman (mutantbob) created this task.
Robert Forsman (mutantbob) raised the priority of this task from to Needs Triage by Developer.
Julian Eisel (Severin) triaged this task as Needs Information from User priority.

Please always attach a .blend file that helps us to easily recreate the issue.

Your problem is relative to empties rotation.
Position of child is relative to position and rotation of parent.

Problem is more obvious if parents have not the same rotation.

You can avoïd this simply by disabling influence of parent rotation.

Disabling the influence of parent rotation is not an option. The object would be facing the wrong direction (which is pretty obvious when you use something other than the default cube or rotate by 45d instead of 90d).

As for the .blend file, I see actions for Comment, Change Status, and many others, but no Upload File. And there is no way for me to drag&drop files. I uploaded it to pastebin until the web site is upgraded:

Questions that remain:

  • What is the mathematical reason for the oddity in the calculation?
  • Is this existing mathematical model superior for any applications?
  • Is there another model that would give less surprising results in this case and in the majority of other use cases?
  • What would break if the mathematical model were altered to give less surprising results in this case?
  • Is it worth the effort to alter the code to implement a "better" model?

When influence of child of constraint is decreasing, it is like cube was moving far away from empty location.

In this .blend, you can disable rotation influence of constraint and see the cube static.
If you keep z rotation active and disable all location influence, cube is just rotating on its own axis.

It is combined influence that produce same result than in a child-parent relationship.

Tipically child of constraint is used to attach an object on a different parent in an instant with a contact.
I have an object in the hand. I put it on the floor. Another character pick it.
It is not supposed to be used to make an object flying from my hand to the hand of the other character.

If you want to create translation and with constrained rotation, use "copy location" and "copy rotation" constraints.

After some experimentation I have developed the theory that it's because multiple child-of constraints with fractional influence are implemented by creating a transform matrix for each constraint based on the difference between the decomposed loc/rot/scale of the two parents, and attenuated by the influence.

Once these matrices are chained together, things get a little weird.

I was able to achieve the effect I wanted by separating the location/rotation constraints with the location constraints at the top of the stack and rotation at the bottom.

I'm going to vote we file this in the "undocumented oddity" bin.

Julian Eisel (Severin) closed this task as Invalid.Jan 12 2015, 8:51 PM
Julian Eisel (Severin) claimed this task.

Yeah, rigging can be complicated ( /me has no clue about it) :( But anyway, looks like we don't have a bug here