top of page

Tasty Town Character Facial Setup



JamCity / SGN (2016)


I wanted to come up with a technique to animate eye blinks and mouth shapes for our Tasty Town characters. Since the game is all about customers dining and eating your tasty creations, we needed them to visually behave naturally and also really convey eating when the food is served at their tables.

The challenge was to figure a way to do all this with very little cost to frame rate/performance and memory. The game can have up to 30+ characters walking and interacting on screen along with various animated objects, ui, effects, etc playing at the same time. The other challenge was to have this technique work with mecanim and shared animations. To keep the game optimized and flexible, we used a shared animation controller with overrides to drive all our characters. The instancing of the controllers made driving character animations quiet efficient compared to using a legacy system.

  • Mecanim on humanoids does not play very well with any custom bones such as eyelids or mouth shapes. To get around this, I wrote a script that was placed on each character prefab that triggered 2 additional bones which drove the eyes and mouth.

  • The eye bones simply deformed the vertices around the eyes. When it's scaled down to 0 on the Y, it made the character blink. The mouth bone drove the mouth polygonal sprite which rested on top of the closed mouth. When that bone is scaled to 0, it made the open mouth disappear. I also scaled up the Y and X axis to make the mouth appear to open wider. These two methods were enough to pull off the type of movements we needed at the zoom level in the game.

  • Animation event keys created on the original FBX animation file import settings drove the script on each character which triggered the animation of the 2 special bones. This allowed all our characters to have some facial animations using shared animations across all characters as long as they are rigged with the two additional bones.

  • This technique gave us flexibility to add additional facial animations, made the setup on the rigging phase simple, allowed us to share the facial animations through all our characters and ultimately had very little impact on game performance.

bottom of page