Hey.
I've picked up 3D again after many years and remember back in school we had licenses for 3D Studio Max. I'm using Blender now and don't miss 3dsmax except for the way IK and FK worked in Character Studio.
Basically in CS you can create a biped (skeleton) in a couple of clicks with IK controls ready to go. If you grab the hand or foot bone and try to move it around IK will automatically kick in and if you rotate any of the bones in the IK chain manually it'll automatically switch back to FK.
Now the cool thing about this is whenever you set a keyframe it will, as far as I can tell, set FK keys along the chain while *preserving the IK manipulations*. So there's never any conflict between IK and FK. You just use whichever you need at the time and CS sorts out the rest. It's all really nice and convenient.
I've never seen anything quite like this outside of Character Studio. Is it possible to replicate this behavior in Blender somehow? I guess parenting the IK manipulator bone to the first bone in the IK chain could work for starters.
How do people handle FK/IK usually? Is it normal to just switch between them manually? Seems like a hassle in comparison.
Replies
Basically in CS you can create a biped (skeleton) in a couple of clicks with IK controls ready to go.
Hi. The closest thing in Blender is Rigify, an add-on that, like others, comes bundled with the Blender installation. It's a humanoid rigging add-on. I think it comes disabled by default, you need to go to your Preferences -> Add-ons then search for it and enable it.
If you grab the hand or foot bone and try to move it around IK will automatically kick in and if you rotate any of the bones in the IK chain manually it'll automatically switch back to FK.
(. . .)
Now the cool thing about this is whenever you set a keyframe it will, as far as I can tell, set FK keys along the chain while *preserving the IK manipulations*. So there's never any conflict between IK and FK. You just use whichever you need at the time and CS sorts out the rest. It's all really nice and convenient.
That's cool, very interesting.
From my experience, at the moment, doing such a thing from an add-on is impossible in Blender because the transform operations (grab/rotate/scale) will 'take over' user input during the manipulation.
There's no event callback / hooking system that lets custom code run before a transform operation enters its modal state (when you drag the mouse to tweak the transform before pressing Esc to cancel or Enter to confirm)edit: read my other post below. Such a thing is needed in order to check if what's being moved is an IK bone or control (to switch to IK mode) or FK bone (to switch to FK mode).So at the moment this can only be done by modifying the Blender source code itself and adding this feature in -- definitely not trivial, you'd have to spend hours learning about its clockwork.
Right now you really do need to use a pair of buttons that Rigify (or some other scripted solution) adds to the interface to switch between FK and IK modes.
There's no event callback / hooking system that lets custom code run before a transform operation enters its modal state (when you drag the mouse to tweak the transform before pressing Esc to cancel or Enter to confirm)
Hm... actually, as I'm testing it, the "Depsgraph Update Pre" signal does fire as soon as you select a new object. This is something that you can add a callback to and it's all that's need so that your script code can go "was this thing selected before? If not, is it one of these objects (stuff from your rig)? If so, change to FK / IK mode based on the object selected" or something to that effect.
Though I don't know if it's very appropriate to change the scene data from inside a "scene data update" callback.
Hmm, definitely gonna look into adding a callback through script. Seems a bit daunting though :P
Kinda surprised this functionality hasn't caught on outside of Character Studio, where it's been a thing since at least the mid-2000's. It's such a quality of life improvement imo to be able to use FK and IK interchangeably without any fuss.
Yeay totally, this Character Studio behavior you described must be like handling a puppet in real life, you don't really care what mode you're in as long as you can pose it the way you want.
After some searching, Rigify is a legacy add-on. It seems that the latest work has been done on something called "CloudRig", of which there's an installable feature set for Rigify, like a plugin for a plugin: https://gitlab.com/blender/CloudRig
Scroll down to the "Installing into Rigify" section for instructions.