Switching from FK to IK

Hi guys,

I’m using Blender 2.73, Nvidia GeForce GTX 645, Windows 7, 64 bit. I have about three years experience with Blender. I working on an animation and have run into an issue I don’t recall seeing in the earlier versions, though it might just be that I always have used IK in the past. I’m using MakeHuman characters with their default MHX rig.

I began this scene using FK for the first three poses for a character. Then for the next few poses I went to IK for both the arms and the legs. When I set the new frame in the timeline and click on the snap the left and right arm and legs to IK, I lose all of the leg and arm poses set in the initial three poses. Well I can see the poses for the FK in the dope sheet but they are not executed in the animation.

What I get at the beginning of the animation is the fourth pose for the arms and legs (where I changed to IK) mixed with the rest of the character as set in the first pose.

Am I doing something wrong or is this how it is supposed to work? That is, do I have to keep separate animation poses that I use FK for, from those I use IK for?

Your assistance is greatly appreciated.

TC

Just a though, have you keyed the switch between FK/IK mode properly? Assumming it is some sort of property slider, You should key it to be 100% on the FK side on the last frame that you want FK to apply on and 100% to the IK on the first frame you want full IK.

Hi Sazerac,

I believe so. The problem does not seem to be the the setting of the bones when converting between FK and IK but rather the effect that has on the old poses. Not the new.

The more I think of it the less sense it makes that switching from FK to IK is not supported. I think it must be something I set in the process of creating the scene/animation that is dorking up the process. Frankly I find these kind of problems with Blender impossible to find. There are just too many possible properties that might be the cause.

I appreciate you taking the time to work on my problem.

TC

wow … I’ve never seen an issue like that before…

can you try just building a simple … say… Arm Rigg and then performing your FK-IK switch? … just to test and see if you get that result every time?

might be some kind of a strange bug in the new version…
However…
I’m not getting any issues with that here with any of my Riggs… hummm…

you may have to post some kind of file for us to look at…

Hi Norvman

Good idea. After I finish with one small item in the scene, I will create a test file that just looks at the character and the animation. I should have something to share by tomorrow. If I find that I cannot duplicate the problem I will start adding components from the original to see if I can pin down when the problem first appears. Either way I will let the forum know.

Thanks.

TC

Okay here is a real simple example - in the TextEditor I left a note (ProjectNotes) on the steps I took once I setup the basic character. I’m known for my stupid mistakes so don’t hold back.

Blend file - http://www.pasteall.org/blend/34088

Thanks.

TC

Hi everybody,

After going through several iterations of the test scene I have made the following observations:

  1. I noticed that the snap arm and leg bone buttons do NOT work. They change the mode from FK to IK or vice-a-verse-a but the bones are always placed into REST pose!
  2. I noticed that If FK mode is set (for arms and legs) in the MHX FK/IK Switch panel with IK influence set to 0 then only the poses that were set using FK are executed when the animation is run. If the IK layers are selected in the MHX Main v 1.16.12 then the controls will move with the IK poses but the character mesh is not responding.
  3. I noticed that if IK mode is set (for arms and legs) in the MHX FK/IK Switch panel with IK influence set to 1 then only the poses that were set using IK are executed when the animation is run. If the FK layers are selected in the MHX Main v 1.16.12 then the controls will move with the FK poses but the character mesh is not responding.
  4. All poses, both IK and FK, are shown in the Dope Sheet.

I have reported this behavior to MakeHuman but I’m not sure if the problem is with MakeHuman or Blender or both. I suppose it could still be some silly interaction issue that I have not stumbled upon. For now all I can recommend for anyone else who experiences this issue is that you use just one mode (IK or FK) per scene until this issue is resolved.

If anyone using MakeHuman version 1.0.2 with Blender version 2.7.3 is not experiencing this issue, that is, you are able to mix poses using both FK and IK, I would appreciate it if you would share your blend file. Maybe that way I can isolate the differences and properly diagnose my problem.

Much thanks.

TC

The script for the controls is missing from your file. It doesn’t matter I still understand.

You have to key the FK/IK switch. The switch (or slider) just moves the influence slider of a constraint. When the constraint is off the deform bones (your arm) follow the FK bones. When it’s on the arm follows the IK bones. If there’s no keys on the timeline for the switch control then that constraint is either on or off for the whole animation. That’s why everything changed on the whole timeline when you changed the switch.

Example. Fk---->FK->IK------>IK. The IK/Fk switch is keyed on FK setting until the point where you want it to change. Another key on the switch as FK at that point and then you key the switch to IK on the very next frame. The change is keyed to happen in one frame (you don’t want the change happening over time).

I’m not sure about question #1. I have no control panels here -I don’t have time to look for the script…

How a snap tool is supposed to work is an easy way to create a seamless change between IK/FK (no jumping). Example: Animated in FK up to the point where you want to switch to IK. The IK bones are snapped to the last FK keyed pose so you can key the IK bones in that same exact pose… to make the pose the same in FK and IK on the frame where the switch happens. A seamless switch between the two in the middle of an animation.

Now post #2 makes more sense?.

Hope this helps.

-LP

Thanks LP,

Looking at the MakeHuman properties in the ‘N’ panel it does look like I can set keys for the control layers and the IK influence values. I will pull up the test file and see if setting the change to coincide with the pose changes will work. I don’t remember ever having done this in the past.

I did observe what you suggest in your second paragraph but did you notice that when both IK and FK control layers are enabled (turned on) and visible in the 3D viewer that regardless of which mode is currently selected the controls move appropriately for both FK and IK. I found this surprising.

I haven’t taken the time to learn Python and until I do messing with the scripts is not an option for me. I’d probably just be digging a deeper hole.

I’m pretty sure that I have done snapping on one of my early Rigify projects so I think I understand the process. I’ll run the test to see if keying will work but if the ‘snapping’ isn’t working, it may not be a viable solution for most projects.

Thanks much.

TC

OK I had a few free minutes. I didn’t have the Makehuman addon turned on. That’s why I didn’t see the controls. This a bit different panel setup than Rigify. Switches + influence settings. Snap snaps but switches the FK/IK switch for you too. Nice.

There is IK Influence controls below the FK/IK switches. Maybe it’s not set to 1? Btw this is a direct control (driver) of that IK constraint influence slider I mentioned (found in the properties panels). If not at 1 then the limb is split between IK and FK influence. Maybe this is how you can move both controls at same time?

As for keying the switches. Maybe you had Auto-Keyframing enabled in past projects. Then a key is automatically set on any bones moved in the 3Dview (and if moved by those snapping buttons I suppose).

Uh, outta time. I really shouldn’t do this. Hope I helped and not confused.

-LP

Thanks LP,

I have never tried the IK influence set at anything other than 0 or 1.

I appreciate your taking the time to help me.

Thanks.

TC

I’d make sure your IK/FK switch is set to ‘constant’ interpolation in the graph/dope sheet too, I’d guess.

Hi Hammers

Thanks for the suggestion. Where do I find IK/FK switch interpolation? I don’t see any property like that in the MakeHuman panels.

TC

In your dopesheet/action editor, find the IK/FK switch keyframes (In rigify, the switch property is within the IK hand/foot channel, after you crack the channel’s disclosure triangle. MH may be different)

-Select one kframe
-hit L to select the rest on that channel
-then T to bring up the interpolation menu, select ‘constant’ for instantaneous switching

Once you set it, new keys on that channel should continue to be set with constant interpolation too.

Bear in mind, with this method you do need to keep an eye on the switch keyframes and if things change you often need to do another round of ‘snap FK-IK’, ‘keyframe FK’ etc.

Good luck

Thanks Hammers, tried what you suggested - modifying the f-curve interpolation but it does not seem to affect the FK/IK mode. The setting of Keys as suggested by LP works, but the snap between IK and FK in the MakeHuman panel is not working at all. So overall this is not going to fix my problem.

I spoke with MakeHuman and they say that the snap is working fine for them. I provided them with the same Blender file I posted here, maybe they will have the time to investigate. At this point I starting with IK and finishing with IK. Not a great workaround but they never are. I’m still thinking that I have set some property that is dorking up this feature.

No Joy!

TC

Sorry so long getting back to you… I have never tried using the Make Human add-on… so not sure I can be much help to you… I always build my own Riggs so I’m a bit lost with the Make Human thing…

I checked out your file again and no that snapping is not working the way an IK/FK snap tool is supposed to work. All it does here is toggle between IK and FK. Snap is supposed to move the FK bones to match the pose of the IK bones and visa versa.

Of course I’m short of time as usual so can’t go further now. Before doing anything the first routine steps are to make sure I’m using the latest (working) MH addon in Blender. Then try all the tools on a clean import of an MH character. Only then would I take the snap tool issue to the MH folks. You can’t take anything for granted. Assumptions will burn you every time.

-LP

Thank you for this - I’ve been having a problem switching from IK to FK - this solved it.