Gesture layer only recognizes the avatar mask on layer 1
tracked
Zer0ᵛʳ
#The Problem
The gesture layer has an issue where only the mask from the first layer is used, if I make another mask for layer 2, it will still use the first one. This has to be vrchat related since you can use different masks like that in Unity itself.
#Why its limiting
Sadly this will limit controlling your avatar in interesting ways.
#Recreation Steps
- Create Animator for "Gesture Layer"
- Add Second layer inside the animator
- Set weight of the created layer to 1
- Create 2 different "Avatar Masks"
- Give both masks different masking settings (example: legs on one, arms on second)
- Make 2 different buttons to trigger an animation playing on the 2 different animation layers
- Whatever is on layer 1 will work fine, layer 2 will use the mask from layer 1
#Video Example
It shows unity setup, masks and examples and 2 avatars showing its related to layer order: https://www.youtube.com/watch?v=2dgg9qYCwd4
Log In
Scout - VRChat Head of Quality Assurance
tracked
zaCade
Turns out this issue also applies to the gesture layer for the left/right hand gesture layers, for example this can be seen if you delete for example the right hand layer and do left handed gestures, this causes the right hand to go into 'motorcycle' pose, but since normally the right hand layer animates that hand to idle (or whatever other gesture is currently held) this wouldn't be spotted.
hackspanner
Okay I understand your use case now. You want be able to actually blend out the mask by layer, and since we only use Layer1 for the Gesture Playable mask, this is not currently possible. It would also not be correct to grab the most-blended-in-layer's mask because the switch between masks would be sudden and not actually blend. The feature you want is actually "Multiple Playable Gesture Layers". We'd have to provide multiple Gesture Layers at the playable level for you to be able to individually mask and blend each one as you desire.
That all said, I think you may be able to accomplish what you are trying to do by disabling "Write Defaults" on all your gesture animation clips. This way the other Layers will not be attempting to change transforms that you don't specifically change in your animation.
The internally defined masks are best used to strip out parts of an animation you don't need or want to use: for example you have an animation of a your avatar's tail wagging, but the animation also includes standing idle and other body posing. You just want the tail animation to show up on top of our default locomotion. Without manually editing the animation, you could apply it to a Gesture layer with just the Tail enabled in a mask.
Zer0ᵛʳ
hackspanner: YES! or kind of that, would be awesome to be able to just use the mask how it works in unity, but since I dont know how it works under the hood, if thats a possible solution, im all for it. I talked to some other like tupper about it, seems like its a very edge case but with the current setup I just cant control multiple limbs with different blend trees and swap back to tracking like that.
hackspanner
YandeRainy's comment below is correct. The PlayableLayer uses the mask on the top most layer to generate a "total mask". So you supply that on the top layer (which is always weighted 1).
If you have separate parts, use other layers, with individual masks that "add up" to this total mask. You can then weight these layers as needed. You can leave the top most layer empty except for the mask if you do not have animations that require the full mask.
The example Gesture layer shows this in action.
Zer0ᵛʳ
hackspanner: I tried making a total mask as layer 1 and then just the legs for layer2, resulted in my arms still going in motorcycle pose while my arms moving fine, ima try again right now tho, thanks for the input
Zer0ᵛʳ
also the example animator only uses fingers and they are kept on idle animation at all times, sadly this is not really an example using gesture layer for a swap between animated and tracked
edit: check my comment below, I show there that no matter what weight you have, no matter what mask you use, it always uses mask from the top layer
-Mino-
Isn't that by design? the tutorial Tupper made says that the top most layer carries downwards. It's not that your 'arms on second' mask is being ignored, it's just that your top layer doesn't have arms on it at all.
You need to make a third layer, put it to the top, and make sure it has both arms AND legs. Then put only legs on the second one, only arms on the third. It'll start working. The top layer is telling VRchat to ignore the arms since it isn't in the first mask.
Zer0ᵛʳ
-Mino-: yep so I did that, still does not work, the other layers always use the top layer no matter what, I weighted both layers to 0 and used the "VRC Animator Layer Control" to enable the weight on the different layers, if I just enable the weight on the legs, my hand still goes motorcycle pose, even tho the layer with the slap hand is not even weighted one, no matter what I do, its always scuffed and uses mask from layer 1