Jacob's Blog Buttons (custom HTML)

portfolio
animation
character
digital art

Friday, July 26, 2013

Animated Facial Textures in Maya and Unity

Download the pdf document here:
Direct link

Check it out online here:
Animated Facial Textures in Maya and Unity - Full Document

You can check my further notes on the subject here:
More on Animated Facial Textures

Essentially, my goal was to create a texture-driven facial animation system that worked in both Maya and Unity.  Making one in Maya is very simple, but I found very little on getting it to work in Unity, and nothing about getting it to export from Maya.

To give a bit of a background, for FIEA, one of our assignments was to document or write a tutorial about something we learned or wanted to learn.  I took this opportunity to pick up Unity, and solve a possible problem for a game I will be working on soon, and a problem I'd been curious about since when I was working on Intrepid.


I came up with a solution using joint animation that can be baked out of Maya and used in Unity.  The Maya portion gave me some practice with Maya Expressions, which is great considering I want to rig up the rest of the character soon.  And the Unity portion gave me a chance to learn Unity, and also learn some C#.  C# wasn't too difficult to pick up, having studied C and Java in the past; the code to get it all working can pretty much be copy-pasted from the document.

Download the pdf from the link above.  It should be very accessible - it breaks it down really small to start; getting it in engine, and how the math of the expressions and the image offset method will work.  And in sections 4 and 5, it gets to the meat of the whole operation.

If anyone has any questions on how it works, or why I did something; or any comments on how I can improve this method, I'd love to hear it.  Send me an email, or drop me a message here.

5 comments:

  1. I'm glad to see I'm not the only one thinking about using animated textures for games/Unity. A Google Search left something to be desired in terms of useful results. Going to take a look at your notes and see if I can apply them to a character I'm working on. Will report back here with results. Thanks Jacob!

    ReplyDelete
    Replies
    1. Hey, no problem, glad that this was helpful. I look forward to see whatever you make!

      Delete
  2. Hello Jacob, I´m actually trying to implement an animation with your method but I can´t visualize the animation itself, only the rest (hands etc work well)
    I suppose you actually see swaping face expresions directly without set the unity script? It is make my annoying :S

    ReplyDelete
    Replies
    1. Solved question :D there is a way to make the animation stepped as Maya

      Duplicate the animation clip to be able to edit anim
      Select al involved keys
      clic der and change to constan values

      Thanks!

      Delete
    2. Solved question :D there is a way to make the animation stepped as Maya

      Duplicate the animation clip to be able to edit anim
      Select al involved keys
      clic der and change to constan values

      Thanks!

      Delete