Possible fix for IK

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

Possible fix for IK

Post by clintonman » 27 Jul 2013, 20:08

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 68 times
Clinton Reese

http://clintons3d.com

User avatar
Draise
Captain
Posts: 3107
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 » 27 Jul 2013, 20:35

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?

clintonman
Captain
Posts: 3061
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 » 27 Jul 2013, 22:26

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 » 28 Jul 2013, 14:50

Great job Clinton! Hope this works out!

clintonman
Captain
Posts: 3061
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 » 29 Jul 2013, 03:13

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 » 29 Jul 2013, 16:21

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