Improvements to inverse kinematics algorithm in blender importer

Hello everyone,

Today I have made a commit that improves the IK algorithm of the blender importer. It is not yet perfect but at least the models I checked started to look more similar to those in blender than before.

I replaced the previously used ‘triangulation algorithm’ with more commonly used CCD (Cyclic Coordinate Descent).

NOTE: The computations will take more time than before but I think the result will be better.

The importer does not yet support some of the constraint’s options: pole target, rotation and position weights, influence, using tail and stretching. I hope to add some of them even this week (at least ‘use tail’ and ‘stretch’). :slight_smile:

There still will be issues with this algorithm because of its nature: it can have many valid solutions. But I hope to improve it with time.

Great thanks to @wezrule for providing me with the initial algorithm :slight_smile:

4 Likes

Can not thumb up more for this :))

Keep up good work @Kaelthas, really appreciate what you done for the community!

I have just added support for ‘Use tail’ option in Inverse Kinematics and fixed one small bug.
Hope it will work well :slight_smile:

There are still bad behaviours of this constraint. In some situations the bones tend to ‘jump rapidly’ from one position to another.
I was hoping to switch the algorithm from CCD to Jacobian - the one that blender uses. But unfortunately it is not that easy :frowning: I debugged blender sources to find out how it computes the IK,
but this was too complicated to use here.

I hope to improve my CCD algorithm to get rid of those jumps and make it look more like blender’s algorithm. Just be patient :wink:

2 Likes