I’m struggling with rigging my cockroach model’s legs.
Its legs are moving down and up as they have more joints than human limbs.
The pink circled object is the IK target and the one in the green circle ist the IK pole target. I would like to add another pole target for where the red circle is. In the attached video you can see the current behaviour of the rig which is pretty unpredictable so I would like to control where the first two bones are pointing as well.
I tried using constraints like “Track to”, “Damped Track” or setting an own IK constraint on the bone after the current IK. Nothing really worked the way I would have expected it.
How do I fix this?
By applying multiple IK constraints. In your case two. From the first to second bone then third to fourth bone.
IK pretty much overrides other constraints (track to, damped track.) If you want to use those, you can create another layer of bones, parented to the IK bones, and constrain them. If you want those constraints to occur before the IK, to set up the chain in the same way that a manual pose would, you can use drivers (possibly just copying transforms via drivers from a bone with those constraints that doesn’t have any IK.)
I’ve never had luck getting good behavior from >2 bone chain IK structures like this (that aren’t just arms with twist bones). I have seen good behavior from collapsing it into a series of 2-bone IK structures. For example, a four bone might have a master 2 bone IK, with two IK targets parented to the master 2 bone IK, driving two individual 2 bone IKs. Placement of the master’s bones will drive how the slaved IK work. Usually, I would just move the first origin of the master chain somewhere off the joint to control how the IK worked.
I don’t think two pole targets will make it good enough for you. But think about if you had two chains: one 3-bone chain with a pole target, then one two bone chain with a pole target, duplicating the last two bones of the 3-bone chain. For the first bone, deform from the 3-bone chain; for the last two, deform from the two bone chain.
Just another thing - pole target placement and angle will have major effect obviously, some info
Also, any bone in the IK chain has a panel (IK) to restrict / dis able movement on a particular axis which could greatly help.
Thanks a lot for your answers! Unforunately I didn’t quite figure out how to set up multiple IKs to work properly together. The second IK always disconnected two bones for some reason.
Here is my solution: I set the IK chain length to 2 and used a Track To constraint for the first two bones. I then parented both pole targets to the IK target and that way I can move the whole leg with the IK target and finetune it with both pole targets.
Edit: Ignore the stretching of the model’s body, I haven’t worked on skinning yet.
Looks fine to me. By disconnect you mean that they move seperately? Just parent one pole target to the other and use the parented pole target to correct the pose if something shouldn’t move as expected.
No, the grey gone between the “track to” constraint and the IK constraint got disconnected from the green bone even though they are set up as connected bones. It was really strange In theory that should have been the right solution but for some reason I always got that weird behavior even though everything was set up correctly (at least I didn’t find any mistakes after double checking).
Can you upload the rig (here on blenderartist pls) without the mesh?
Hey, Your solution seems to work well, offers a good degree of flexibility, didn’t throw any errors in 2.7x, nice job.
Sure, here you go, I hope it helps!
cockroach-rig-by-eaniix.blend (742.4 KB)
Not sure if this is the result you were looking for. Maybe you wanted the first backleg segment to stay in place. In that case your solution works well. Anyway in this example i used two ik chains. The ‘Second Pole’ (i named it) serves as target for the first chain as well as pole target for the second chain.
2ik.blend (544.2 KB)
Not really, in your example the first pole is always connected to the joints which isn’t really what I was looking for. Also, when moving the IK target, only the first segments moves. Initially I wanted the IK to move the entire leg and use the poles only to control the pointing direction of the joints. Maybe there was an error with my setup I didn’t see but my current solution works pretty well for my needs
If you parent the second pole to the iktarget, you can move the two chains at once.
Addition: I changed the “Track to” constraints for “Damped Track” constraints. “Track to” affected the bone roll really badly while “Damped Track” performs the smallest rotation necessary (which is exactly what the constraint description says )
I’m just sharing all of my progress so anyone who’s struggling with that in the future will maybe find this thread and find some help here