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.
Possible fix for IK
- 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
- Attachments
-
- ikTest.zip
- (543.71 KiB) Downloaded 230 times
- 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
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?
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: 5422
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Possible fix for IK
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.
Re: Possible fix for IK
Great job Clinton! Hope this works out!
- 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
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.
Re: Possible fix for IK
Well, thank you for trying Clinton.
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.
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.