Automatic FK/IK switching in a Maya rig?

Hey folks,

It’s been a while since I’ve posted here! I’ve just got a question that’s been weighing heavily on my mind recently…

Basically, for those of you familiar with 3ds Max’s Character Studio, you will know that when animating with the CS Biped, you can just grab the foot or hand controllers and use the Move tool to position them (which is basically IK mode).
Then immediately after doing this, you can switch to the Rotate tool, and grab a forearm/thigh/whatever controller and rotate it (which is basically FK mode).

At no point in this process was the animator required to press a button or change a value to go between IK/FK mode.

Now, the thing that’s troubling me, is that I’ve never seen this animator-friendly IK/FK switching implemented successfully in a Maya rig.

All of the freely available rigs online seem to have horrible cluttered interfaces with either “in-world” controls for switching IK/FK, or they have a channel box attribute you have to key, or they have some sort of custom script that you have to click or run through a marking menu in order to switch between IK and FK for any controller.

I’ve even seen these solutions in presentations from Bungie and Naughty Dog (among others) when they talk about their rigs in Maya.

This always seemed super-clunky to me, and I know for a fact that our animators here hate the fact that they have to manually switch IK/FK when animating on Maya rigs, especially when coming from Character Studio where they don’t even have to think about it when animating.

So, what I’d really like to know is, why has nobody solved this in a bug-free way in Maya yet? It seems like such a basic requirement of a user-friendly rig, yet I’ve never seen it implemented properly anywhere.

I’ve thought about various solutions for it, and they all seem horribly clunky, inefficient or prone to bugs, so nothing I’ve managed to try yet has worked effectively. :frowning:

I’d love it if someone could point me in the direction of a rig which includes this functionality for Maya. I don’t mind if it’s a third-party commercial plugin or a free download, I just wanna know if it’s been done anywhere before.

Cheers!
-MoP

Doesn’t maya come with the motionbuilder character module, that should allow for the same behaviour. But I don’t know the specifics.

-Johan

If you’re talking about the FBIK (or is it HumanIK? I forgot) example rig, then … kiiiiinda. It does have a setup whereby you can control the arms/legs in IK mode, and then also rotate the joints in FK mode, but I’ve experimented with it and it seems to break very easily. For example if you start pulling limbs too far in IK mode then the whole character freaks out and various limbs flip around or start pulling away.

I’ve seen this behaviour in Maya 2008 and Maya 2011 so it doesn’t seem to be new, or dealt with since then.

Thanks for the suggestion, though - I will take another look at it and see if there are some settings that can be changed to make its behaviour more stable.
Unless you were talking about something else which I don’t know about? I think it’s the FBIK rig example in the Visor though.

Seems like this wouldn’t be too hard to implement on your own with scriptjobs or some sort of selectionConnection hack maybe even. The devil would probably be in the implementation details, as i could see that being a fairly heavy scriptJob depending on how you do things like ik/fk matching, etc.

Yeah, scriptJobs really seem like they’d be too slow for this. It was my first thought for a solution but it would require, as you say, a fairly heavy amount of processing (especially once you start having multiple rigs in a scene, all with multiple IK/FK controllers).

Our current idea is based around scripted / plugin manipulators.

[QUOTE=MoP;9208]Yeah, scriptJobs really seem like they’d be too slow for this. It was my first thought for a solution but it would require, as you say, a fairly heavy amount of processing (especially once you start having multiple rigs in a scene, all with multiple IK/FK controllers).

Our current idea is based around scripted / plugin manipulators.[/QUOTE]

Probably a better way to go. Custom scene messages/callbacks and the like.

Smart Kinematics: Use IK & FK At the Same Time Instructor: TJ Galda
I think the did the same thing, based on selection change called the ik/fk snap/switch code. ( I think this can be made generic enough that it should not get that heavy…don’t “over program” it with some complex switch /match code:)

While the HIK/FBIK rig also has this, people get confused by it a bit, the pulling to far part not understanding how pinning is used or what the body modes do. MOBU has two rigs that sync so it can throw people off.

CharacterStudio- the fk/ik posing is mostly seamless and animators that “learned” animation on character studio really struggle with any kind of other system. There are so many other drawbacks to the way the character studio rig works with certian key farme times, layers that ik does not work across …I will stop there that having to use an extra click to make the rig ik/fk is not a big deal.

I almost never work in pure FK any more for posing as IK under the correct parent space is faster and more flexible.

Granted any of the custom rigs that deal with this are mostly clunky because they are all still using the same concepts that were created back in pre maya 1.0 and no one has really been bothered by it enough to improve it.

I think Pixar got IK for Bugs life, imagine how much counter animation was goign on!

Really best would be to just write a new ik solver for Maya that does this by default:)

http://joleanes.com/scripts_plugins/IKFKSolver.php

here is one for max as insperation…http://joleanes.com/tutorials/ikfk_pivot/ikfk_pivot.php

And last but not least-:slight_smile: (yes I could have just posted this in one post but what fun is that:)

There is http://area.autodesk.com/gdc/class1 on creating a no/cycle mulitway constraint system with built in nodes. I turned his example in to a self-contained maya asset that I can import in and connect up.

Or a more complete system http://exotools.net/ the orig. multi way constraint in Maya. *I am beta testing for and friends with them, full disclosure.

Hey Brad, thanks for all those links, very interesting stuff!

Regarding pinning in the FBIK rig, it’s true that I haven’t experimented with it very much, although I did end up pinning the shoulders and removing the IK from the spine to make it more animator-friendly, but it was still freaking out when the limbs were pulled in certain directions.

Basically from my standpoint it seems like a pretty bad rig if you can actually break it very easily in its default setup (eg. by simply dragging an IK controller too far), this is the sort of thing that should never happen with a good rig. It should not be possible for an animator to break a rig in this way.

Do you have any tips on how to set up the FBIK rig so that the arms/hands/legs/feet still work in IK/FK auto-switchable modes but with all other IK disabled, and set up in such a way as to be impossible to break by pulling things too far? I haven’t had much luck with this myself yet, but I will look into it more, since their IK/FK handling is actually pretty much what I want.
I just want it in a more stable way :slight_smile:

This should help you understand the system a bit more.

@break the rig? I am not sure what it is doing to you but the FB rig is kind of hard to break, there can be issues in the skeleton when it is setup though that will make it act funny…

I could always do a live screen share to go over a few things for you if needed.

The other possibility I was working on some time back for IK FK switch was to make a generic plugin node that matches the specified attributes at switching keyframes. So if you switch from IK to FK, update FK pose and key that FK pose then IK will automatically update too. There are callback apis that you can utilize in the plugin node. Same node can also be used for matching transforms when switching spaces.
I never got around to finish that plugin but hopefully this might help

cool Maulik, that sounds promising. It is in concept what the Human IK rig does when a keyframe is set both rigs fk and IK sync and then the reach/ik-fk blend- values determine how the skeleton is interpolated. While it can be done via script job, a fast plugin would be best.

I have experimented with seamless FK/IK systems and while it IS possible, there really is not a need. Biped is not really a seamless system per say either, as you are dealing with ‘free’ and ‘body’ keys which is just different terms then IK and FK.

Also, the biggest reason I want both IK and FK in a rig, and have the ability to chose what I am using, is the animation will interpolate much differently between keys depending on if you are in IK or FK.

The system I stand behind is one that allows you to quickly use IK for FK posing, FK for IK posing, and allows a easy way to blend between the 2 modes.

That is exactly what the HIK system does.
Pose how ever you want, key once, at any time decide how to interpolate and and animate that if needed or add an AUX target and blend to a 3rd rig if needed.

[QUOTE=bclark;9476]That is exactly what the HIK system does.
Pose how ever you want, key once, at any time decide how to interpolate and and animate that if needed or add an AUX target and blend to a 3rd rig if needed.[/QUOTE]

Ah, I was stuck thinking strictly in Max terms. Yes, the HIK system (I am thinking of motionbuilders system) is fantastic. I really like the way motion builder handles animating, with the ability to bake down keys and then animate on top of that.

Isn’t the complete HIK system getting pulled over into Maya in 2012? I know they have the base FBIK implementation in right now, but it seems like they are expanding it.

[QUOTE=bclark;9471]cool Maulik, that sounds promising. It is in concept what the Human IK rig does when a keyframe is set both rigs fk and IK sync and then the reach/ik-fk blend- values determine how the skeleton is interpolated. While it can be done via script job, a fast plugin would be best.[/QUOTE]

Oh I see. I don’t know much about how HIK works. I was doing research on that some time back, but didn’t get far. I was looking into Sega Animanium style free rigs, but a bit different. You can say something like full body ik but can be applied to any part like standard IK.

Seamless IK/FK manipulation is something I’m really interested in a nice solution for at the moment as well. I’ve had exactly the same experience with moving from biped to a custom maya rig. It makes animators angry :P.

Regarding some of the earlier confusion about what it’s called in maya, they switched from FBIK to HIK in Maya 2011 (although I’m not sure how different the actual solvers for those are). I use HIK for retargetting from rig to rig or from mocap in our workflow (which it is pretty good at). Although its implementation as an animation rig in 2011 seemed a bit clunky. This was its first implementation in Maya though so I’m hoping it gets better.

In the videos I’ve seen of 2012 so far it looks like they’ve cleaned up and improved the interface a lot. It’s apparently a lot more consistent with motion builder’s implementation now. (e.g.: http://area.autodesk.com/gdc2011/humanik?KeepThis=true&TB_iframe=true&height=520&width=840)

I was under the impression that the old FBIK implementation in Maya was a black-box hack of HIK. It never really worked, nobody ever really used it.

I’ve been told that HIK is the real deal, same engine under the hood as MoBu’s. 2011 was still minimal implementation in Maya. 2012 is supposed to be the exact same solver in both packages and of course MoBu’s UI has been re-written to look a lot like Maya’s in general and the Character UI is the exact same in both; nice!

Really looking forward to using this as our main plug-and-play rig for both softwares.

HIK looks rather exciting. After some initial agro when I first started using MotionBuilder I’m now a fan of the system.

Is there a similar solution to this that you could use for non-bipedal characters where you can build up your poses using IK and FK but not be constrained to limbs?