Male Mesh IK Rig Limbs Twist

Hey guys,
I’m new to Blender and trying to rig and animate a 3d model.
With a tutorial I created a male mesh and with another tutorial I started to place bones and rig it with a basic IK setup.
The first problem I encountered had to do with the pole angle of the IK (leg bent in the wrong direction).
I adjusted the pole angle and the mesh just twisted around and split open. Basically I’m between an alienlike twisted creature or a guy whose joints bend in the wrong direction.
Note: I was experimenting with the left leg mostly so I don’t know about the right leg or the arms.


Male Mesh Rig with parent and leg twist.blend (582 KB)
Male Mesh Rig without parent.blend (552 KB)

I would appreciate any kind of help and/or explanation why this happens.

Cheers

OKay several things are wrong here…

So… First… Select your Rigg…
Goto the Properties Panel > Armature Data (the little man Icon) > Display > check the box that says “Axis”
this is will turn on the Bone Axis view for each individual bone…

Now Tab into edit mode… you must have the thigh and the Shin bones Axis algned to the same Axis… (else you will get twisting and flipping)
Select the Thigh bone… > and look in the Tool Panel > Transforms > find “Roll:” see what that is … in fact Ctrl+C to copy that value…
Nose select the Shin bone > go to the same Transform > Roll > and Ctrl+V to paste in that value into the shin bones Roll…

Finally be sure you have enough bend in the knees in edit mode or your IK solver won’t know which way to solve for the knee… causing the knee to bend backwards sometimes…
Now Tab into Pose mode… you will now have to readjust the Pole Angles of each of the Shin bones… It looks to me that both the left and right Shin bones look right when the pole angle is set to 90* …

Notice how now the Thigh and Shin bones Axis are aligned… (that is to say the Upper Legs ‘Z’ axis is pointing forward and the Lower Legs ‘Z’ axis is pointing forward…

Also I also like to set my bones to wireframe… it sometimes helps with alignment issues as opposed to having them set to draw as solid…
to do this select the Armature > properties panel > Object data (the box icon) > Display > where it says “Solid” change it to “Wire”…

hope that helps…

Thank you for the very detailed answer, it helped a lot!
For everyone encountering the same problem: The twist occured because I had to change the pole angle in order to define the direction of the leg bending.
It seems that I just had to align everything correctly (including the roll of the bones) and set the bones up with an already slightly bent angle.
I took the joint between the shin and thigh bone and moved it slighty forward, always checking if the IK is now moving in the right direction (in pose mode).
Next time I’ll model the mesh with correctly bent arms and legs in the first place.

Good Deal! see … When it comes to Rigging the Devil is in the Details… it’s not so much some special Rigg setup… it’s understanding whats going on under the hood… and there really is alot of little details that once you know them… they apply across the board… I don’t care what software your using… so every chance you get to learn a little bit arout Rigging is time well spent…