Search Unity

Question Animation Transition Issues with Face Capture Animations.

Discussion in 'Virtual Production' started by bakershah, Apr 2, 2022.

  1. bakershah

    bakershah

    Joined:
    Jul 15, 2014
    Posts:
    17
    Hi everyone,

    I've been trying to find a solution to a problem I am having with transitioning my character model between animations that I recorded using face capture. During transitions the models head snaps resets and rotates to the new keyframe where the new animation begins. I'm using Unity animator to try to blend and get the animations to transition smoothly but am not having luck. Could use some help here.


    ezgif-4-cdae3c8b6e.gif
     
    Last edited: Apr 2, 2022
  2. bakershah

    bakershah

    Joined:
    Jul 15, 2014
    Posts:
    17
    Screen Shot 2022-04-03 at 5.13.03 PM.png Update: I lowered the transition time in the animator and while It does snap, the head rotating doesn't show anymore. Just need to solve the problem entirely to make these transitions smooth. Would appreciate any help.
     
  3. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Hi bakershah,
    The best way to check it out is if you prepare a small project reproducing the problem and send it to us using Help/Report a bug... Once ready please let us know the case number. Thanks!
     
  4. bakershah

    bakershah

    Joined:
    Jul 15, 2014
    Posts:
    17


    Hello,

    I went ahead and did as you asked. The case number is 1421995. Just go to the mocap scene and press play and you should see the issue. Thank you.
     
  5. GRiannis

    GRiannis

    Joined:
    Feb 28, 2019
    Posts:
    2
    I have the exact same problem and it's driving me insane for weeks now... is there any solution for it yet?
     
  6. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    The problem is we record euler angles for the FaceActor which Unity blends as regular float values. Unity's animation system will only blend rotations properly for the transform's local rotation case. The solution is to bake face capture clips into transforms and mesh renderers. This should make your transforms blend properly.
    The only issue is, if you are using a humanoid avatar, this baked clip won't work. To make them work in humanoid, you will have to export the model with the backed animations into fbx using FbxExporter. This way you will be able to import the animations in humanoid space plus the blendshape curves. There are some FbxExporter api limitations that make it impossible to automate the fbx creation and, for now, it remains as a manual step.

    Link to ClipBaker.zip

    1- Install Clip Baker in your Assets folder.
    2- Open Clip Backer window from "Window -> Live Capture -> Clip Baker"
    3- Set the character Animator and the face capture AnimationClip you want to bake.
    4- Hit Bake and wait until the process is done (no time progress shown, sorry!). The baked file will sit next to the source clip in the project view.
    How to convert to Humanoid:
    1- Install FbxExporter.
    2- FbxExporter will pick the clips from the AnimatorController set in the Animator, which means you will have to manually drag the baked clip into your character's AnimatorController (or create one if needed).
    3- Right-click on your character's root in the hierarchy and hit "Export to FBX".
    4- Set "Model(s) + Animation" in the "Include" field. Toggle on "Animated Skinned Mesh". Hit Export.
    5- Import the new Fbx file as Humanoid using whatever options you like, like keyframe reduction and so on.
    6- The Fbx contains now the backed clip compatible with humanoid.

    I hope it helps!
     
    w1lqo likes this.