IK rig (robot leg) with constrains

Hello!
I’m kinda new to blender. I’m doing a robot (4 legs) right now and i am having this issue. I set up an IK rig for one of the legs (they’re the same so i am going to copy it) and i would like to solve the IK task with constrains.

The main problem is when i am trying to limit the location or rotation of any of the bones nothing happens. IK works just like there was no constrains.

For example i would like the first bone to rotate only in Z axis (in global), and the next to only in y axis but still to be able to use my IK rig. Is there a way to do this? I couldn’t find any exaples of how to solve this in tutorials and on forums.

Attachments


4NGI.blend (968 KB)

When working with IK setups, what’s really going to screw up you rig is when you try to apply IK to a limb which isn’t straight. It becomes near impossible to get things to line up nicely in terms of their hinge fold direction. Your robot legs are slightly diagonal and this makes all the axis constraints out of whack. IK pole targets help though personally, I would get a leg which is lined up absolutely straight to ether X, Y or Z axis to start with, rig it there, and then offset it as slightly diagonal if needed.

IK does tend to override transform restrictions. I am attaching something of a solution for your set up. See how different constraints work together?

4NGI_v2.blend (270 KB)

Hope this helps. It looks like you’re doing good work.

Edit: You will notice the rig isn’t perfect as the foot controller hates rotations (misaligns). These kinds of things are usually fixed with parenting chains etc… it really is a matter of playing with different constraints until you find on that works for you. At first though, you need to make sure your bones are properly lined up straight and to the joints.

Another option you can use with this type of mechanical rig is:

  • build one single bone chain for each ‘limb’
  • for each bone, lock off all scaling and any rotations you DON’T want
  • go to the Tool window and turn on Auto IK

You’re done. It’s quick and dirty, but it works.

I would like to thank u all and say that all the solutions are working really good. I would like to thank Lancer for this example which is clearing out my problem!!

Sry for english it’s not my common language.

Bump! Another problem just occured to me. This time I want my waist_roll.l and waist_roll.r bones to follow exact rotation of waist bones in y axis only (so its like the piece attached to it can rotate only in y axis). I am trying to achieve this by using copy rotation or including those bones to IK chain, but all i got is some strange deformations.

http://speedy.sh/4ZF67/2aNGI.blend

Ok another problem without solution…how is this possible that the mesh doesn’t fallow exact rotation of the bones. After some point I am getting some very wierd offset between the bone rotation (in legs basically downer_leg) and the acting of the mesh. Please help me.

http://speedy.sh/s7fZC/8NGI..blend

Ok solved problem from 01.44 (the last one) weight painting was screwed. Fixed it. Still having issues with 00.42.

Regarding 00.42 (time is different in zones. For me that one reads 21:42 so you are better to refer to it as post#6):

Firstly, you don’t have to weight paint for hard model rigging like this. Have the body parts separate (as you have) and simply parent them to individual bones.

Your right leg is set up reasonably well, but there are some gaping mistakes in the left leg setup.

For IK rigs, even when the model leg appears straight, you really should have a small bend in the edit-mode knee bones. In the case of this rig, it would benefit with IK pole targets for the knees.

Ok i’m kinda made idiot out of myself with those timezones :P.

I solved issue with my 2 legged robot. But I am having another problem with 4 legs. i decided to modify rig, so that the “knee” bends upwards. The case is i am getting really strange mesh deformation just before my foot/ It does look like the parts are somehow crossing each other (refer to the attached file). I know it has some connection to the rotation of axis of my bones. But still dont know how to solve this. I would like my knee to bend upwards and still get the correct mesh. I tried assinging it with empty groups, yet no clue why this is happening.

http://speedy.sh/Axf3W/4NGI.blend