Answered

"Constraint dependency loop" - IK not working, I don't know why?

MikoGot 3 months ago updated by Peter - Soxware Developer 3 months ago 3

Hi!

I wanted to play around with IK a little bit. But it is not working for me. When I change position of target model does not move and I am getting an error.


Error message:
"Constraint dependency loop! The following joint/transform constraints depend on each other: IK_Hand_L (Inverse Kinematics), IK_Hand_L (Child Of), IK_Hand_R (Inverse Kinematics), IK_Hand_R (Child Of), IK_Foot_L (Inverse Kinematics), IK_Foot_R (Inverse Kinematics)"

IK Setup Wizard:

Could you tell me what I am doing wrong? Thank you very much :)

UMotion Version:
1.22.0
Unity Version:
2020.1.9f1

Answer

Answer
Answered

Hi,
thank you very much for your support request.

A constraint dependency loop is a result of wrong placements of (IK) constraints in the hierarchy. Here a common example: If a hands IK handle (that also contains the IK constraint) is a child of the bones the IK constraint should calculate (in this case a child of the upper and/or lower arm bone) you get a dependency loop. The rotation of the arm bones are dependent on the IK handles position, but as the IK handle is also a child of the arm bones, the IK handles position itself is also dependent of the arm bones (as rotating the arm bones would alter the IK handles position).

To resolve this, open config mode and check all your IK constraints for this type of situations.

When you are using a humanoid UMotion project, and you are only setting up IK via the IK setup wizard (and do not alter the IK constraints manually or add constraints manually) you should never get a constraint dependency loop. If you do get a dependency loop in this case, this is considered to be a bug (please make a bug report in this case providing everything I need to reproduce your exact steps) via the email support form. Thank you very much.

Please let me know in case you need any further assistance.

PS: You wrote your UMotion Version is V1.22. The latest version is UMotion V1.22p14. I recommend updating just to cancel out the chance that you are experiencing any bugs that have already been solved.

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

A constraint dependency loop is a result of wrong placements of (IK) constraints in the hierarchy. Here a common example: If a hands IK handle (that also contains the IK constraint) is a child of the bones the IK constraint should calculate (in this case a child of the upper and/or lower arm bone) you get a dependency loop. The rotation of the arm bones are dependent on the IK handles position, but as the IK handle is also a child of the arm bones, the IK handles position itself is also dependent of the arm bones (as rotating the arm bones would alter the IK handles position).

To resolve this, open config mode and check all your IK constraints for this type of situations.

When you are using a humanoid UMotion project, and you are only setting up IK via the IK setup wizard (and do not alter the IK constraints manually or add constraints manually) you should never get a constraint dependency loop. If you do get a dependency loop in this case, this is considered to be a bug (please make a bug report in this case providing everything I need to reproduce your exact steps) via the email support form. Thank you very much.

Please let me know in case you need any further assistance.

PS: You wrote your UMotion Version is V1.22. The latest version is UMotion V1.22p14. I recommend updating just to cancel out the chance that you are experiencing any bugs that have already been solved.

Best regards,
Peter

Hi Peter!

Thank you for quick answer. I think I know what is the problem then. This is how hierarchy looks:

From what I can get from your answer it should not be like that. It should be more like this: 

I will try to download newset version of Umotion and add custom transform by hand in correct place in hierarchy to see if I am right or wrong. Thanks again :)

No, the first version should be correct. In the second screenshot, the "Unnamed.00" transform would be a child of the bones that it is trying to calculate (the "Bip01 L calf" and the "Bip01 L Foot"). That means it would move with the bones that it should calculate --> dependency loop.

I will try to download newset version of Umotion and add custom transform by hand in correct place in hierarchy to see if I am right or wrong.

Yes that's a good idea, I'm sure it gets more clearer to you if you try to place them manually (add the constraints one by one, so that you see exactly at which point you get into a dependency loop).

Best regards,
Peter