If you want to animate a character talking or changing its facial expression, it is best to use Blend Shapes. This recipe covers creating facial expressions with Blend Shapes exported from a 3D package.
We need several Blend Shapes
that store our facial expressions. In this recipe, we will use Smile
, Angry
, BlinkLeft
, BlinkRight
, and BrowsDown
shapes. Create them in your 3D package. If you are using Blender, Blend Shapes
are called Shape Keys. In other softwares, they may be called Morph Targets.
You can also use the provided example Unity project and go to the Chapter 05 Character actions and expressions\Recipe 08 Animating facial expressions with blend shapes
directory. You will find an Example.scene
there. Open it, play the game, and adjust the sliders on the UI to see the effect. You can find the character with all the Blend Shapes in the Rigs
directory.