Home Website Youtube GitHub

EPIC_leg_01 twist/flip problem

Hi,

I’m using the EPIC mannequin template and am running into an issue where the leg is twisting/flipping as illustrated in this gif:

My Maya is set to Z Up and I’m using mGear 3.7.11

I’ve looked at other rigs built with mGear and I have not seen this behavior on the legs. Is there something I might be overlooking?

Thanks

FYI.

I tested this in mGear 4 and I am not getting this behavior there. The leg is not twisting as seen above when built in 4.

2 Likes

Thanks for the confirmation @Hector :slight_smile:

Mgear4-3 Currently this is a bug we’re trying to tackle in our production, are there any other suggested fixes for this issue as MGear 4 isn’t fully Production Ready yet, I am currently trying to confirm if this issue is also fixed in our use case in MGear 4, but I would prefer not having to update our pipeline to a Beta Version.

(Edit):
I just installed MGear 4 and unfortunately it did not resolve the issue for our situation. While we’re working with an altered of the Epic_Mannequin I’ve build the rig in the example bellow from the standard template shipped with MGear 4 and replicated some of our poses in which it’s still causing issues.

Hi guys,

I am having the same problem with the rigs I am doing with MGear.

It looks like the issue is caused because of the way the twists joints are made within the MGear rig system.

The main problem is that the thighs joints are following the rotation of the pelvis and they should be still as the knees are, because the pole vector should be the one responsible of the orientation of the legs.

A default 2 joints IK chain with a pointConstraint of the ik thigh joint to a group, aligned to that joint and with a parentConstraint to the pelvis, follows the proper rotation that the legs should do as the pole vector leads the rotation. It would be really nice if the MGear team could implement that behaviour to the legs.

By the way, I have tried it on MGear 4 and the issue is still there.

Cheers!

2 Likes

I’m having the same problem in mGear 4.0 beta, Maya 2020 in a Z-up scene using the Epic components.

The upper legs are rolling when the world control is rotated on the Z-axis.

@Miquel I found that moving the leg rollChain1 node in the Y axis seems to reduce the problem, but doesn’t totally eliminate it. It definitely seems like a bug to have the upper leg’s roll change with the rotation of the world control though.

1 Like

I would like to add that this bug is also appearing in mGear 3.7.11, I’ve tried upgrading to the 4.0 Beta but got the same results.

1 Like

@Miquel I stayed up all night the other night trying to figure out what’s causing this upper leg flipping but wasn’t able to make much progress deciphering how the leg is set up as I’m pretty new to rigging in Maya.

I feel like the problem is coming from somewhere in the above nodes.

I’m reading in the Maya docs about the tendency of joints to flip on spline IK setups but I’m not sure where it derives it’s up or forward vectors from. I tried messing around with the Advanced Twist parameters but couldn’t find any settings that put the upper leg’s roll back in to Body space rather than Scene/World space.

Generally, the entire rig should fall under the umbrella of the World Control. Rotating or translating World should move the entire rig as a package without any impacts on twists or aim constraints. The way it behaves now is like it’s vectors are coming from Scene space instead of Body space.

I know it may be a while before this can get fixed in a release but in the meantime, does anyone know how to manually correct this? Are the nodes parented incorrectly? What is the actual cause?

I’m just giving the thread a bump since it was initially posted about two weeks ago with no insight posted yet as to what the cause of the problem might be and how to correct it.

UPDATE:
So I noticed in moving the leg_r_root control around that the flipping was only happening in the skinned joint (thigh_r ), and not any of the rigged joints, at least not that I could see.

thigh_r is mgear matrix constrained to leg_R0_div0_loc_cnx_off

I deleted the mGear matrix constraint from thigh_r and parent constrained it directly to leg_R0_rollChain0 and the flipping no longer occurs. So I feel pretty confident that the flipping is not actually coming from the rollChain after all.

I’m going to study what’s going on with leg_R0_div0_loc_cnx_off to see if I can figure out if this is driving the flip.

1 Like

Hello @Andy

Thanks for the feedback. Sorry to hear this is giving you so many problems. I will check this ASAP.
Just to confirm. Have you tried this with mGear4 beta release or the latest version directly from the repo?

Just asking to be sure that is not fixed here:

Thanks

Hi @Miquel!
I’m using mGear beta 4 that I got from here: Release mGear 4.0.0 Beta 1 · mgear-dev/mgear4 · GitHub

I downloaded it on Tuesday 8/24 so I think it should be the latest, but I’ll double check and see if there’s any code changes I don’t have.

Thanks!

Ok, I checked EPIC_leg_01>init.py and it looks like I have the old values:

self.tws0_loc.setAttr(“sx”, .0)
self.tws2_loc.setAttr(“sx”, .0)

I’ll try changing them to .001 and see if that fixes the problem.

UPDATE:
Yeah, that looks like it fixed it! Sorry for adding unnecessary noise on the forum. For future reference, how do I make sure I’m testing the latest updates?

Also, I’m trying to learn. Why does changing the Scale X value on those two nodes stop the bone from flipping? I would’ve never guessed to try that.

3 Likes

the beta in the link is from june 7th :stuck_out_tongue:

Great to hear that the fix worked :smiley:

2 Likes

@Miquel, Hi!
New to mGear, and not sure if this is the right post, but I am having this issue as well with this version:

I am using the MetaHuman Z-up template, and the issue is with the twist joints on the legs, when twisting the ankle, the twist joints are twisting with the incorrect axis. Seems to be fine with the metaHuman Y-up axis.

Hello @kelsiesgroth thanks for the feedback. I will check this ASAP :slight_smile:

Hi. I know people are repeating this, but I also can’t stress enough how much I appreciate mGear. Thanks for all the work on the updates!

I also have a “twist” issue once I build the Metahuman template with EPIC modules. The elbows and knee joints are not rotating when using IK or FK controls. I can’t seem to figure out why this is happening. Maybe it has something to do with the metahuman RBF joints not following along, if I understand this correctly.

Here is the video demonstrating the issue

I’m thinking about creating a rig from scratch using EPIC modules and once I build it I would
constrain just the main limb joints since the metahuman asset file manages the RBF joints without any additional setup. I guess… What do others think?

Edit: I’m using maya 2020.4
Edit 2:
There’s actually an issue that I think is intrinsic to mGear limbs. The upper arm joint, for example, never twists in rotate X. I think this is why the Metahuman upperarm_l_drv is not twisting and the RBF joints aren’t following along. If I tweak the mgear_matrixConstraing9 Driver Rotation OffsetX, I get the desired deformation.
I hope there’s a simple fix and I’m totally mistaken. :sob:

2 Likes

Thanks for the feedback and videos! I will check and fix that ASAP. Definitely, a bug I have logged it here https://github.com/mgear-dev/mgear4/issues/51

2 Likes

having a possibly related issue using the ue4 Y up mannequin template. On the right upper arms and legs the rotation of the joint isn’t coming through

Thanks for the feedback @aripanzer I will be checking the this ticket in the following days :slight_smile:

1 Like

Hello @vladzy I am working now on your ticket. And yes you are right. The issue is coming from the roll joint rotation distribution.

While the roll is correct to deform geometry is not good to drive the metahuman joints that already have his own deformation system
The workaround for the arm is to set the division to 0 that will force to use the full rotation on the first (and only joint of the upper arm)

I am checking now the legs, because I think I didn’t add this behavior to it.

In short when 1 or more divisions are added the roll will distribute the rotation, from the first to the last joint of the upper arm. So the first joint that drives the metahuman skeleton will not twist.
If the division is set to 0 we will force the first joint to twist.

I will update the leg components to have same behavior and update the auto-snap tool to change this option automatically.

2 Likes

The ticket has been fixed :slight_smile:

1 Like

Wow! :smiley: That workaround never crossed my mind!
Thanks a lot @Miquel