Boy howdy everyone, this is Shanie MyrsTear
here with another five minute fix.
So what we're going to do today is get a major
step out of the way for getting your avatar ready or updated for Avatars 3.0. In this case, it's
getting hand gestures for your facial animations to work. What that means is if you make, say,
a peace sign, you can make an animation happen on your face or elsewhere, which is essentially a
gesture. The problem is it's kind of voodoo magic to do in 3.0 but we now have cool tools made by
the community to do this very very easily, without the need to manually set up animators or anything,
just going through your blendshapes in a nice user interface, blending them how you want, and wrap it
up by choosing which gesture causes the animation. It's that easy. So let's get started.
You'll need the following things: If you're just starting with 3.0, a new Unity project. Then
you need to bring in your model, your shaders, the models materials if they're independent,
the Avatars 3.0 VRCSDK from VrChat, whatever other tools you may use like
DynamicBones or Pumpkin's Avatar tools, and finally ComboGesture by Hai. Though this tool can
also make puppets and blend trees, we're going to focus on hand gestures in this tutorial.
So I've done all that and slapped some materials on so you can see my face because that's all
that's really necessary for this demonstration. I guess a necessary note: your character has
to have blendshapes else this won't work.
So the absolute first thing you have to do is
bring y our avatar into the scene and add the avatar descriptor. Without it, the tools won't
know what your avatar is in the scene and won't find it. Once you set that up, go to the Project
folder pane and go to Assets, Hai, ComboGesture and select the ComboGestureExpressions prefab and
go ahead and drag that into your hierarchy. From there, right click on ComboGestureExpressions and
click Unpack Prefab Completely because it likes to be in pieces for reasons. From there, click the
foldy triangle next to ComboGestureExpressions, click on Default and in the Inspector
you'll see an Open Editor button. Hit it and you'll see a window pop up called
CGE/Default. Mash that fat button that says Automatically setup Preview and you'll get
moved to the Set face expressions tab.
Now this window is the big cheese though it
looks complicated at the moment. This is where all your geatures are shown, from what happens
when you clench your fist, or open your palms, or do nothing, etc. etc. So go ahead and click
create on one, like this Open one. Suddenly the EE Animation Editor will pop up. This is the box that
gathers all of the blendshapes you want to use and customize them into a completed "look", and I'll
explain what I mean right now. So when you click plus you'll get yet another window, and let me
organize all these things here real quick... you'll get this new window called EE Property
Explorer and don't worry about the name just click the super long button that says Generate Previews.
This is the point I fell in love with this tool. Now that it's generated, you'll see
every single blendshape you have, all fully engaged to 100% so you can see easily
the ones you want to blend together into a look. It even highlights what changes are in each
blendshape so it's quick and easy to figure out. You can easily see the blinks, the winks,
the smiles, the furrowed brows, whatever.
So what I want is, when I open my hands, I
want to be smiling. And it shuold look happy, so I'm going to click the plus button under
blink happy and you can see it's selected now because we can remove it. If we go back
to the ANimation Editor, check this out, we'll see that we have that blendshape in our
animation. Now I can set how much this blends with the default look. So I'll set this to 100
and I want it to also not look so angry so if I go back to the Property Explorer we'll scroll
down loooking for eyebrows, oh here's one, sadness. Back to the Editor and let's tweak that
a little bit so I don't look so constipated. So I don't think it looks perfect yet so let's find
more eyebrows and blend them all together... and that'll do for now, this is just showing
that it works. Now lets change that name. Animation closed eyes. And click Rename. And
if you've been looking in your project folder, you'll notice the animation file there and it's
been renamed. Maybe we should make a folder for that so lets right click down there and do
Create, Folder, and we'll call it Animations. Let's move that baby right into there and open
that folder so the next one saves there too.
So now we have one animation, let's make one
more. Let's do Victory because Victory is always my wink. So back into the animation editor
and you'll see we're in default stance again, hit up Property Explorer and we'll look for a
wink and we'll find a happy face, and then I guess we'll find a smile too. Back to Animation Editor
and woooooah that's a bit much. Let's dial this in to something that looks good. Great, lets name
it, Animation, Wink. Rename. Cool, so now we have two animations that have just been created in no
time at all and plugged into our matrix of stuff. Feel free to fill out this matrix to your hearts
content, it even has options for what happens when two things happen at the same time, like clenching
your fist while doing rock-and-roll for example. You have two hands, remember! Maybe you
don't want it to do anything different so you may want to auto-set that, or maybe you
want to blend two together with Combine. You have a pile of options. For example, with Left Fist and
Right Open, when I have both of those going at the same time I want Open to take precident so I'll
make sure that looks right by hitting up auto-set. This helps preventing accidental gestures too.
So after you're done filling in All Combos, or maybe you're just getting overwhelmed with
all these boxes, you can select the singles tab on the top which will show not just when one of
your hands are doing something, but when both are doing the same thing. You can create a special
animation for, say, two peace signs or autoset it so you're sure it's going to work.
Oh yeah, and make sure you set a no-gesture, AKA the default state. And don't
worry about how that looks it's just a...bug with my avatar or something.
The little draggy thing here is transition time between gestures. You can make it longer so it
makes your face take longer to transition from state to state but most people, myself included,
don't need it any faster or slower. In fact, this is as fast as you can get without it
getting really goofy so just leave it.
And then we go over to Prevent Eyes Blinking
and this is specifically to stop the eyes from blinking in certain gestures. Like if your eyes
are already closed. Or your avatar is ever-seeing and should never blink. So select all your
gestures where BOTH your eyes are fully closed, this isn't for winking.
Make lipsync movements subtle is to keep your mouth from overexploding when your mouth is
already big from a gesture. So select expressions with a wide open mouth here. BUT Mind the warning
though, as it's apparently broken and left in for potential fix from VRChat. Maybe it works
now? Who knows, skip it if you're worried.
Additional Editors is beyond this tutorial
because we're not making complex blend trees or paper dolls or emotion states like a
series of sad or angry gestures only.
So once you're happy with your setup we're gonna
click on ComboGestureExpressions back in the hierarchy and what we're looking for is the Avatar
Descriptor so go ahead and select your avatar on the Hierarchy and just slap it in there. Further,
we're going to need an FX Animator Controller. Now, you may have one alredy, but there's nothing
wrong with creating a new one by Right clicking in your Project folder, Create, Animator Controller.
We'll throw it back into my Aniamtions folder and name it SDK3_Controller. And if we open the
animator what we'll see is that it's empty and that's perfect because ComboGestureExpressions
is going to write everything it needs in there. So we'll just open ComboGestureExpressions again and
just drag that new Animator Controller into the FX Animator Controller box and, in our example,
we'll be using VR Chat Recommendations for it. And since we don't need support for ears or
wings or whatever to animate with these gestures, AKA it's all on the face, we won't check
off the Gesture Playable Layers box. Slap that Synchronize Animator FX Layers and
we hit up our SDK3_Controller again, and by the way if you don't have the Animator window it's
under Window > Animation > Animator, we'll see the base layer which looks like our original newly
minted one, but now we have all this other stuff, and this is our gestures all compiled into
the system with us never having to touch it.