Home Website Youtube GitHub

Pole vector position problem when FK is default

Hey! I’m necro’ing this thread because I’ve just run into this in 4.0.9

I’ve found that if the IK/FK Blend is set to FK by default, it will also set the UpV control to default in the wrong position (next to the middle joint). As a result, the elbows/knees will flip with any IK movement including foot-rolls unless the UpV is manually set back to 0,0,0.

That also means “Reset” or “Reset all below” will return it back to the offset position instead of zero values.

What component(s)? I can’t reproduce this.

I moved this to a new thread. You posted this in a thread about the IK/FK matching script, which doesn’t sound related to what you’re describing.

Can you share some screenshots of the result, or the guide settings?

“Reset” going to a non-zero value sounds strange. I have a feeling something else is going on. I wonder if it’s possible that you have a cycle in your setup? If you remove all your space switches (as a temporary test) and rebuild, does it still happen?

1 Like

Just tested at home on the raw components and couldn’t reproduce it, which is great! So I’ll definitely dig into the settings on my template and share what I find when I’m back in office.

EDIT:
I had mistaken the FK/IK match for the FK/IK blend attribute, so when the rig was “reset” then “matched to IK” of course the pole vector was in the odd new position. Whoops! :crazy_face:

1 Like

Ah ok makes sense. Then you were talking about the same thing, sorry!

The current tools use a basic snap-to-elbow algorithm. But in that thread, I link to another alternative anim_utils.py that uses my pole vector matching script I wrote, and wrote some ideas for storing the neutral distance somewhere in the rig. But I never integrated or pushed it, and I don’t think anyone else did.

But if you’re up for some script editing, the match is done in scripts/mgear/core/anim_utils.py
ikFkMatch_with_namespace()

And in there, you could drop that alternative anim_utils.py version (it might be out of date with the latest mGear. I wrote it in 3.6.0 I think), or script a better algorithm. Super extra special bonus points if you bug test it across different components, and then make a PR on Github. :sweat_smile: