Possible fix for IK

Post Reply
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Possible fix for IK

Post by clintonman »

I think I found a way to make IK behave properly when animated. The keying template for a skeleton defaults to "Matrix", but when IK is applied the joint matrix is keyframed and also somewhat affected by IK. If I set the ik handle to pure ik, remove Matrix from the keying template and set the keying template for each non-IK joint I get a good result shown in the attached video.
It requires a little extra setup. A script is used to mark each ik joint as an ik joint then a second script adds the non-ik joints to the keying template. This only works with IK handle set to full IK and you can't manually pose the joints of the ik portion when animating.
Attachments
ikTest.zip
(543.71 KiB) Downloaded 230 times
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3198
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia
Contact:

Re: Possible fix for IK

Post by Draise »

Wow, this is a large breakthough! Congratulations!

I always wondered why the joints always swam around when animating. I fixed this by animating the constraint's matrix/on off to avoid this also type of swimming IK.

I like your solution, though.. you can't doFK joint positioning anymore with that setup?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Possible fix for IK

Post by clintonman »

Yes, you can do FK in the same skeleton, just not within the IK chain and it looks like parent FK motion might need linear interpolation in the graph editor because parent motion will move the whole ik chain. Still a lot of testing to see if this will really work.
Clinton Reese

http://clintons3d.com
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: Possible fix for IK

Post by froo »

Great job Clinton! Hope this works out!
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Possible fix for IK

Post by clintonman »

Well, it didn't work. It worked incredibly well for the first simple IK chain. A more complex rig just blew up or shook itself to pieces. The IK interpolation during animation seems to be radically different and broken compared to just posing an actor. The only positive thing I learned is that setting the FCurves to linear will remove slipping in a complex rig. Same trick doesn't do a thing with the simple leg rig from earlier.
Clinton Reese

http://clintons3d.com
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: Possible fix for IK

Post by froo »

Well, thank you for trying Clinton. :worship:

Tomas mentioned before, that the IK solver does not work effectively. It does not settle from 'oscillation', something like that. So in effect, it's broken except for simple rigs.
Post Reply