This is an update from Unity 4.3. This is very amazing feature that I really wanted back then. Realize I don’t know how to make a facial animation with bones. This is very fast method to make a facial animation. Works in Both Unity Indie and Pro. In this tutorial, I split my Head’s mesh and body mesh. It also works if your mesh were joined with head. I split head and body because, blender can’t read my model’s bone.
Unity 4.3 Blendshape
So, you’ll require this thing to make a blendshape:
In Object mode, click your model, then click triangle icon there and on the Shape Keys section, press +
After you add new keys, switch it to Edit Mode. That Propositional editing is just used to help you transforms the vertex or should I say, Soft Selection. Remember to set the Key value that you want to edit to 1 and set the other that you don’t want to edit right now to 0.
Shape / Deform your model whatever you like and then name your keys.
If you want to add / delete keys, you have to switch from Edit Mode to Object Mode. REMEMBER! BEFORE YOU ADD NEW KEYS, MAKE SURE THAT YOUR CURRENT KEY VALUE IS 0 AND YOUR NEW KEY VALUE IS 1
After set the key as many as you want, it’s time to Export it to Unity. REMEMBER to SET all keys value to 0! If you don’t do this, You’ll gonna had a bad time.
Import your Exported model to Unity. Unity refuse to read your model? Export it to FBX. Basically, you don’t need to adjust everything above. Check if Import Animation is turned on. and then Put it to your scene
Set your keys until you happy with it.
To animate it, Create new Animation Controller and Add Animator component to your character game object. Remember to turn off Apply Root Motion. Create new Animation, then press Add Curve, then select your head game object > Skinned Mesh Renderer > #YOUR KEYS NAME#. and Animate it (set curves). After finished animate, remember to set the animation loop by clicking the animation clip. After that, open your animator controller and insert your animation. Just set it whatever you like. Mine just Idle > EE_Blink. I haven’t made talk function yet.
So what do you think ? Now, it’s done, your model now has a facial animation. Be creative for the further animation and add more realism. If you want a quick lipsync, You can create a script that reads voice frequency and put it to your mouth keys. Like SkinnedMeshRenderer.SetBlendShapeWeight(0,audioFreq);. Read more on Unity’s Scripting Reference about Skinned Mesh Renderer.
January 17, 2014 at 8:24 PM
hey, thank you for this good tutorial,
January 28, 2014 at 1:46 AM
Can i export some facial animations on blender to unity? Or can only create animation on unity?
January 28, 2014 at 2:24 PM
Blendshape (Maya or Blender) only. I don’t know if I can make an animated blendshape and then export it to unity. I haven’t tried it yet.
Pingback: [Unity] Keyed Lipsync using Blendshape + Tagarela | imagination XD
Pingback: UnityBlenderFace | 英软科技
July 25, 2023 at 3:23 PM
This animation will work in web Gl ?
July 25, 2023 at 9:11 PM
not sure,
i guess it should work (?)