Home Website Youtube GitHub

IK/FK Match on "Arm_2jnt_freeTangets_01" Component

Howdy all.

I’m having some strange results with Ik/Fk Matching on the “Arm_2jnt_freeTangets_01” Component.

It works fine if the arm is not stretched, but the second i stretch the Arm the Ik/Fk matching gives unpredictable results and it also starts twisting the arm and moving the pole vector in strange places.

I’m doing this through a button in the Anim Picker. and here is the code/commands that i’m using :


from mgear.core import anim_utils
if not INIT:
anim_utils. ikFkMatch_with_namespace(NAMESPACE,
“arm_blend”,
“armUI_L0_ctl”,
[“arm_L0_fk0_ctl”,
“arm_L0_fk1_ctl”,
“arm_L0_fk2_ctl”],
“arm_L0_ik_ctl”,
“arm_L0_upv_ctl”)


I’ve also tried the “right click” menu for the switching does the same thing.

I’m on mGear 3.6.0 and using Maya 2019.

I read that a previous user had some other issues with it and you guys told him to switch to a newer version of mGear. but in his case it was on the Foot controller. i’m wondering if the same applies in my case?

Thanks agian!

I’ve also tried this in mGear 3.7.11 to no avail.
I re-imported my giude template and re-generated the rig.
And still have the same issue.

Some help on this would REALLY be appreciated cuz i’m really stuck.

hi @Hobbz, sorry to say, on a quick test, it looks like I can recreate problems with the IK/FK switch, when the arm is scaled, or the mid control is moved from neutral.

This looks to me like there is just room for improvement.

Even in 3.7, I’m seeing issues when switching on a scaled arm.

There are currently two open issues in the Github repo related to the IK/FK switching, but there is no note about scaling causing bugs, yet:

1 Like

Ah i see.

Well thank you very much for getting back to me!! At least i know i’m not doing something wrong.
Actually I’ve found somewhat of a work around, if you do the switch twice in a row the arm sort of “fixes” itself in some cases. but its very unreliable.

Keep up the awesome work guys!

cheers.

Oh on a totally different note,

Now that I’ve switched to 3.7.
I’m assuming i’ll have to re-generate the rig from the guide so everything is “updated”
Or, do i have to re-build the whole guide?

Cheers.

To rebuild your rig, you’ll have to update your guides. You can do this automatically with the menu mGear → Shifter → Update Guide.

To be compatible with the latest tools, I think you would need to rebuild the rig, yes. The rig itself would work without being updated. But I’m not sure if things like the IK/FK switch are backwards compatible. Some might be.

We’ve now officially adopted mGear into our game engine pipeline and moved over to the Epic components. Using the default Mannequin Z-Up template we have found the FK-IK switching is calculating the pole vector position incorrectly. In our case, the arm isn’t in a scaled/stretched pose and it’s still consistently wrong with each frame.

As the synoptic view isn’t working on Epic components we are also wrapping anim_utils IkFkTransfer.showUI()

Video of the issue here.
https://drive.google.com/file/d/1ef7h21m-WdUPPPowgYlWR0BSjpt0ZbFp/view?usp=sharing

I’ve submitted a fix for the IK pole vector calculation that should be correct now and also has minimal impact as far as I can see. I’ve tested on our rig. Happy to review and update if required.

4 Likes

I was not using the new Unreal stuff, In my case it was just the “stranded” component “Arm_2jnt_freeTangents_01” but i’m assuming this might have been flying under the radar for an unknown amount of time. and i would also guess that the code/math for getting the switch to work for either arms is the same?

And in my case as long as the arm was not stretched, the Switch didn’t cause any issues.
Just thought i’d throw this out there. my scripting powers are somewhat limited so i’ll leave this to better minds to look into.

Hi @Hobbz

This code update will result in a new pole vector position, so that could fix some of the issues you are seeing. I would imaging the error in the previous solution would be exaggerated as limbs stretch. I can’t be certain it will fix your issue, but it should help.

2 Likes

i’m assuming this will go in the next version of mGear?
So just gotta hang tight and wait for a new release. :slight_smile:
Ty!!