Home Website Youtube GitHub

Space switch help

I am trying to understand the FK Ref Array, IK Ref Array and UpV Ref Array on FK/IK legs. I guess these are spaces for space switching…? But I can’t find any description of how to use them. How do they work?

Hi @Torben_Sottrup

the IK ref array is for the IK control and the UPV is for the upvector control. Please check the biped template to see how is configured.

Just need to select a root or guide locator to add it to the list

I hope this helps. Also if I recall correctly I am using it in the Data centric rigging workshop.

Great! Thank you very much for your help :smiley:

I looked at the biped template to learn how to set it up. Then I built the template biped rig and tried using the space switch in animation. When I switch space (and the biped is not in default pose) it pops from one space to the other.

Is it possible to interpolate the transition across a number of frames? I tried out the Space Jumper tool, assuming it would match an animation control from one space to another. But I’m not sure this is actually the purpose of that function…
Edit: @Miquel

@Torben_Sottrup The functionality is implemented in the synoptic.

But there is no option for transition, you should bake and do the manual blend FK - IK when both controls sets have same animation

@Miquel Thank you for your quick reply! This is amazing. I am an animator who is also doing some scripting and rigging. In my sparetime I am working on a personal short film project and I have been looking at several autorigging systems. And I am really glad I found mGear! Fantastic work :smiley: This tool just keeps getting better and better the more I learn about it.

1 Like

How can I do a simple switching of space on a control_01 and match world position/orientation? (without using Synoptic because that’s deprecated right? Use AnimPicker going forward?)

the right click menu on the UIhost should give you the option to switch spaces.

But… there is a bug :frowning: I working on this right now

2 Likes

When it switch spaces, is it supposed to match world position/orientation, i.e. - not pop when the space switched? If not, is there another space switch tool in the mGear system that an animator can use to ensure the control doesn’t move?

Are you asking hypothetically, or does it not seamlessly switch for you, when using the right-click menu?

I ask, because I’m testing the right-click menu, and attempting to give it the non-custom name it wants. And it doesn’t work at all. It does nothing and gives no error or warning. (But I assume it is supposed to be seamless.)

If the name is wrong, I get an error related to the linked bug. But if the name is right, it just doesn’t switch the space, nor change the attribute at all. I’m interested in getting this working as well.

@Miquel There may be an additional name bug as well. If you put a C0 control on a L0 UIHost, it seems to search for L0 in the name of the control too.

I was asking hypothetically, using the “right-click->Parent control ik” does not switch for me. It gives an error:
# Error: ValueError: file ./mgear/core/dagmenu.py line 246: No object matches name: |rig|world_ctl|global_C0_root|global_C0_ik_cns|global_C0_ctl|local_C0_root|local_C0_ik_cns|local_C0_ctl|body_C0_root|body_C0_ik_cns|body_C0_ctl|spine_C0_root|spine_C0_0_cnx|tailSpace_C0_root|tailSpace_C0_ik_cns|tailSpace_C0_ctl.control_C0_ctl #

I’m wondering if there are any tools to switch parent space and maintain current world transformations.

Or if there is some function in anim_utils, like anim_utils.changeSpace() that I would do the trick.

Hello

I am working on that and other related issues finding the right controls with custom names and other combinations of names. It will need more changes than expected th

can you tell us with which control is happening or send a sample file? It should work in a default biped. But we know it fails with some combinations.

Looks like __switch_parent_callback() is using the search token ‘ik’ and looking for a control ending with ‘_ik_ctl’. So for my FK chain, target_control is still None and there is no warning that this function cannot do anything.

Is there a way to make a simple control_01 that can space switch between two other controls?

Hello @Count_zer0
is easy using anim_picker with a custom action script


This is the snippet

global_C0_ctl is the UI host with the attr switch
control_C3_ikref is the attr name in the UI host
control_C3_ctl is the ctl with the different spaces

from mgear.anim_picker.handlers import action_handlers
action_handlers.show_space_chage_list(__NAMESPACE__,
                              "global_C0_ctl",
                              "control_C3_ikref",
                              "control_C3_ctl",
                              __SELF__,
                              __INIT__)

here is the sample scene: https://www.dropbox.com/s/ous7u6xb2gr4mj6/space_switch_sample.ma?dl=0

I hope this is helpful until the right-click context menu is updated.

Please let me know :slight_smile:

2 Likes

That workaround worked great. Thanks @Miquel.

1 Like