Inverse kinematics – part four

Project Page Next project post Post History

Continuing on with part four of my dive into inverse kinematics, I have now successfully moved the joints in the chain to their correct position with regards to the pole.

I did have some issues along the way, including some NaN's appearing in the calculations when I was dealing with angles. I've had to put in some code to deal with them, but that was only minor. The calculations now all seem to be working well, as far as I can see.

The 'elbow' joint is now sitting correctly in the chain in regards to the pole vector, which is indicated by the orange dot near the centre of the screen (hard to see - look inside one of the small yellow circles).

Here's another angle of the viewport that looks down the large orange triangle that makes up the plane between the root, pole and target objects:

The joint half-way in the chain is now sitting correctly on the IK solver plane.

And here's two images for comparison, showing that the chain joints are angularly rotated so they are as much towards the pole vector as possible (or, in other words, rotated around to sit on the plane made up of the root, pole and target objects, on the side closest to the pole vector).

All that is left (at least, for the first version of the IK engine) is to solve for the local rotational values. I believe this will also sort out the snake-like appearance as well, as the local rotational adjustments should restore the correct positions of the roll joints as well.

It will make more sense (I'm sure!) when you can visually see a chain that's got all the calculations corrected for.

Part five should just about complete the first version of the engine. Once I tick the local rotations box, I should be able to start moving the code into the ProxyMan tool itself.

Nearly there...