Search Unity

New to animation - idle face animations?

Discussion in 'Animation' started by Gphysono, Nov 17, 2015.

  1. Gphysono

    Gphysono

    Joined:
    Jul 24, 2015
    Posts:
    21
    I’m not new to 3D graphics, but I am to Unity and It’s been an absolute blast learning it!

    I’m learning animations now and understand the concept of the bones to animate a humanoid body, but there’s no bones in the face meshes so how is facial animation done?

    For example, if I wanted to incorporate & blend stuff like moving eyes, blinking, winking, mouth positions, etc into a model, how do you go about that? Is it a tweening approach with body masks?

    Thanks!


    P.S. sorry if this is a stupid question..
     
  2. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    Generally speaking, when there are no bones in the face, then the face is animated using Blend Shapes. Yes, you will likely have to use body masks in your Animator Controller to isolate the mesh, and animate those Blend Shapes.
     
  3. Gphysono

    Gphysono

    Joined:
    Jul 24, 2015
    Posts:
    21
    So if I wanted to make a model wink with it's left eye- there would be a copy of the model with the only difference being the left eye closed - Then that can be blended in the animation controller and masking everything except the head?
    So if I understand it:
    If I wanted a model to have 4 facial animations, I would have the same model 4 times over each with one of the respective face changes. (Left eye closed, smiling, right eye closed, etc)
    To have the model have two facial changes simultaneously (like winking and smiling) would that be done using 2 blend layers in additive mode?
     
  4. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    Yes, but not the head, as there is not way to isolate a part of the mesh, outside of materials. You would mask out the mesh from the armature(skeleton).

    I think technically there are 4 different versions of the whole mesh in your scenario, but visually and practically the blend shapes are on 1 mesh, and created in your 3D editing program.

    I'm not sure if it is additive or not, but you likely will need a mask to separate the mesh from the armature in the layers of the controller.
     
  5. Gphysono

    Gphysono

    Joined:
    Jul 24, 2015
    Posts:
    21
    Thank you for the information.

    Ideally, I'd like to get to a point where I could have a character script to implement those movements we do without thinking (and really notice when they aren't there) and have states for emotional expression. I am going to try some baby steps towards that over the weekend.

    Thanks again!
     
  6. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    If you want to see a simple example of this, I just released a wolf with some blend shapes. I'm working on a better demo for it, but I did put up a demo with those blend shapes working. http://www.medhueanimations.com/pages/medhue-wolf-demo

    Of course, you'll need to use a firefox browser with the Unity addon to play the demo.
     
  7. Gphysono

    Gphysono

    Joined:
    Jul 24, 2015
    Posts:
    21
    I will definitely take a look, thank you for sharing.
    One other question. I've noticed animations come in various FPS. Is higher frame rate necessary better? (I've only been playing with 30 FPS) It seems like 60 FPS would be smoother but whats the cost of it? What if performance won't allow 60?
     
  8. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    Take this with a grain of salt, as I'm just an animator, and know little to nothing on the efficiency side. I can tell you what my experiences is with working with animation. 60 fps is nice to have, but most animation is not going to need it. The extra fps helps with really fast movements, like running, or quick dance steps. On the other end tho, a normal idle animation can get away with as little as 4 fps. Less fps is less data. All that said, I try to stay around 24 fps to 30 fps, and I'll upload higher fps for specialty animations, if needed.