imagination XD

realizing dream

[Tutorial] Unity Facial Animation / Blendshape / Morph

5 Comments

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

Unity 4.3 Blendshape

So, you’ll require this thing to make a blendshape:

  • Unity3D 4.3 (Download here)
  • Blender 2.69 / Blender 2.68 (Download here)
Launch Blender 2.69 and import your model file.

Launch Blender 2.69 and import your model file.

In Object mode, click your model, then click triangle icon there and on the Shape Keys section, press +

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.

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.

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

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.

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

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.

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.

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.

Advertisements

Author: IMGVERTEX

Started making games since 13 year old. 3D CGI Weeaboo | VFX Otaku | Anime Researcher | Indie Game Dev | VR Chuunibyou

5 thoughts on “[Tutorial] Unity Facial Animation / Blendshape / Morph

  1. hey, thank you for this good tutorial,

  2. Can i export some facial animations on blender to unity? Or can only create animation on unity?

  3. Pingback: [Unity] Keyed Lipsync using Blendshape + Tagarela | imagination XD

  4. Pingback: UnityBlenderFace | 英软科技

FEED ME

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s