• Editor
  • Keeping a bone parallel to another

Hello everyone, it's been a while !

I'm animating a bipedal robot right now and I have some troubles animating the legs the way I want them to move (I am aiming for procedural animation in game maker).

http://puu.sh/DeZoZ/74dcdae71f.jpg

The thigh and the leg should stay parallel to each other, I've try leg IK into the thigh IK, the contrary etc but it doesn't work how I hoped it to work.

I don't find any solution by myself so I guess one of you might know better how to do. Actually, I have a IK on the foot, leg and thigh. I also have some troubles keeping the foot in place when I move the thigh or the leg (it always move slightly, it's something I have troubles with very often with all my animations because of the parents-child order I guess)

Thanks for your time, cheers

Related Discussions
...

This was an interesting problem.

I've tried creating a setup that might work for you.

If you need the upper and lower leg to be different lengths you need to reduce the size of both bones that make up a 2 bone IK constraint and change the mix value of the transform constraint accordingly.

This image should give some more clarity.

Here's the project:
mechaleg02.spine

I hope it helps! 🙂

Very interesting!
Thanks for sharing!

I think it would be much easier to add the ability to create IK on 3 bones. This feature is often needed. Especially for animal animation.

IK with more than 2 bones is non-deterministic, meaning the solution relies on the pose in previous frames. This is because there are many valid solutions, so Spine cannot know which you want except by what poses were in the frames before. 1 or 2 bone IK is deterministic


Spine can compute the exact solution. Non-determinism can make multiple plays of the same animation behave differently. It also impacts jumping into the middle of an animation (or eg, loading a saved state).

I think you have a reason for this decision. But I still don't understand the problem. Ik with more than two bones use 3d games and everything is fine there.

It seems to me that there are only two cases as it can be. And it comes down to the calculation of two triangles. I schematically depicted them. I marked green bones. Their length remains unchanged. Circles depicted joints. The controlling elements are the two red joints. They change the distance indicated by the purple line. Which leads to a proportional change in the blue lines.
It would be ideal to have the ability and control of the yellow joints to simulate a turn of the knee on the viewer. They would only change the length of the bones.
Thus, it is a much simpler solution, it seems to me, than trying to solve it in a different way.

There are many more solutions than just two. The constants are the target location and the root IK bone location. Rotate the first bone a little and the solution for the rotation of the other bones is different. An analytical solution isn't possible. It can be done other ways, it's just a more difficult problem, and one with not too difficult workarounds for the user so it's hard to make it high priority. Lastly, IK with more than 2 bones can be a bit difficult to control. You can try it in Spine by selecting 3+ bones with the pose tool, then dragging the target. I'm not saying we'll never do it, just why we haven't so far. :nerd:

Hello, I did not come back earlier to say thank you sooo... thank you ! 😃

Your file is perfect, it's abolutely what I wanted to do ! I tried to do the same on my file but I guess I'm missing something.... I have the same bones, IK constraints and transform constraint like you but the L_hip bone and L_target doesn't react as yours... I mean the bones of the leg don't do the same. I don't understand why so far.

Maybe can someone tell me what I do wrong ?

Move equilibre_d to be parented to the root bone (you don't want it to move when you move origine_bassin). Drag the equilibre_lien_pied_d constraint to the top of the constraints list (so it is applied first). Change the equilibre_lien_pied_d constraint target to origine_jambe_d (which is the bone we want to move, not origine_pied_droit). Click the equilibre_lien_pied_d constraint and click Match, then set the translate mix to 50% (matching sets the offset to the current position, so when you set the mix it doesn't move). Now you can move origine_bassin and it should behave like you expect!

Yes that's perfect ! Thanks a lot ! I didn't know about the "match". I actually kept equilibre_d in origine_bassin, it seems to work much better like this, I tried your version also but I don't see how it could help, this is also how you did in the file you shared if I don't mistake.

Thanks again !