Home Website Youtube GitHub

Soft IK flipping knee when rotating world_ctl

Hi all,
I’ve been in the final stages of finalizing my rig and suddenly discovered that if I rotate my world_ctl 180 in Y, my leg3jnt_01’s soft IK flips the underlying knee chain bone to the opposite side, essentially inverting the knee. Putting the soft IK range value to a higher value fixes the flipping, but puts the knee in a different spot so that it doesn’t match FK any more. Does anyone have any suggestions on why this is happening and how to fix it?

Also, strangely, only happens when I enter in a value of 180, not if I rotate round manually.

Further investigation reveals that this happens with any node or control that moves the whole character, but not specific things like a chest control. Putting any of the other nodes off axis, like, I have a world control, and an all control beneath it, if I set all’s rotate Y to 180, it flips the knee, but if I put world to 5 degrees in Y, and then put all rotate Y to 180, it’s fine. This is a very fickle problem.

And! It’s only when it’s directly 180 degrees. I did a wedge from 0 to 180, and 179 doesn’t flip, but 180 does…

Hi Ted, would you be able to share a rig to look at? You can delete your geo if it is NDA. I could try to recreate it, but it would be more efficient if you could set it up in the already troublesome state.

I could take a look and dig and see if I can find if there is a fix, a workaround, or a bug in the component.

Also: It sounds like a basic rig/node problem. But what version of Maya? And what version of mGear?

Thanks, Chris! I’ve created this rig in Maya 2016.5, mGear version 3.7.0. Hm, I can’t seem to upload it here directly. Can I send you a google drive link or something?
Thanks!
-Ted

Yes that would be the way, thanks. DM if you prefer.

I’m not getting the behavior you’re describing. Are you sure it’s the global controller being rotated that’s causing the popping?

I found that it only happened when I was precisely at 180, entered in as a value, rather than rotating it around. I also had used the 3 bone setup to make an arm, but it has so far behaved in an expected manner.

Strange. I’m not sure what yet, but it’s related somewhere down or upstream to arm_R0_chain2bones0_jnt. Which is why tinkering with the softIK value “fixes” it. At the flip, that chain ends up flipping and the effector translates away. Something is causing that chain to flip.

Notice in the flipped pose, if you move shoulder_R0_orbit_ctl, the arm jitters and shakes. I’m not sure if that is a clue.

My best guess (so far) is that that IK chain (arm_R0_chain2bones0_jnt) is meant to be vertical and not horizontal. So there is likely some node somewhere that is flipped or orthogonal to where it ought to be, and it’s just hitting some singularity at 180 degrees.

I’ll try to look again tomorrow. But if you want to dig, that’s where to start.

Could you provide a file of just the rig with no mesh I could take a look at it myself

I’ll have a dig through, but I doubt my technical knowledge will suffice. What I find interesting is that it is only happening at directly 180 degrees.

That’s what makes me think some reference space should be rotated 90 degrees. I just don’t know which yet. When it hits exactly 180 degrees, you may be reaching a space which is similar to if you had an aim constraint that had the aim and up using the exact same vector, and it flips.

So, I can see that arm_R0_chain2bones0_jnt is flipping, but I’m not seeing any connections that would cause it. It’s very confusing.

Especially as these joints are technically in world space, something is rotating the joint in time with the nodes above. So if I rotate the all ctl around the rotational values on the chain bone are the same as the ctl. So what’s driving it?

Hm, it’s being driven by an IK handle, but it’s essentially ignoring it at that moment…
But if I put a translational value of .00001 on the ‘arm_R0_ik2BonesHandle’, it fixes the issue. This is fine as a temporary measure, but it’d be good to know why it keeps misbehaving!