Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Blender to Unity animation rig issue

Discussion in 'Asset Importing & Exporting' started by JamN4Sure, Dec 30, 2020.

  1. JamN4Sure

    JamN4Sure

    Joined:
    Sep 18, 2019
    Posts:
    2
    Hi everyone,

    I've been learning how to use Blender to make assets, including characters. I found that Blender's Rigify tool didn't play well with Unity due to the weird bone hierarchy it uses, so I've opted to try making my own rigs. I've tried to get around the hierarchy issue by creating an additional skeleton with a normal hierarchy, whose bones are constrained to the deform bones that are doing the animation.

    When I import the fbx into Unity 2020.1 I can see the animations I've made in the animation preview window for the import settings. When I drop the model into the scene, however, the animations don't work. I'm adding a controller to the Animator and then dragging the imported animations into the Animator tab, as normal, and adding transitions. When I try to view the animations in the scene using the Animation tab, I find several of the bones have been key-framed at basically every frame. Moreover, the only thing that animates is the armature/model as a whole--for example, with a spinning kick, the entire model jumps up and spins around, but none of the bones/limbs are rotating. Any idea what's going on here?
     
  2. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    551
    I do not understand; you say that animation can be seen in preview window? Like character moving as expected in the preview? And by the way, keyframes at every frame are normal. Constraint-based animation like IK is "baked" on *.FBX export, and since it cannot be properly represented with just a few keyframes of a FK animation, there needs to be a lot
     
  3. JamN4Sure

    JamN4Sure

    Joined:
    Sep 18, 2019
    Posts:
    2
    Good to know about IK baking, thanks.

    I realized what my problem was--I hadn't transferred the deformation vertex groups from the rig to the new skeleton, so there was nothing for it to animate!

    So that problem is solved, but there is another: with some objects are I did not assign vertex groups but instead parented them to a specific bone, e.g. the eyes are parented to the eye bones for rotating, the eyebrows and mustache to the head bone. This is so they can move without deforming. They animate as they're supposed to in Blender, but in Unity they're fixed in place and only move when the entire character object does. So whenever the character leans forward, which is basically always, then all those facial objects stay where they are relative to the object (not the animated mesh), so they just hang in the air half inside of his face. It's behaving as if they're not parented to the bones, which they are. I've tried reparenting them in Blender and applied all the rotations, so I'm not sure what the problem is.

    Basically, is there a way for Unity to recognize objects already parented to bones in Blender?
     
  4. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    551
    No idea, I usually weight such objects to bones with 1.0 influence. Perhaps because you have both skinned meshes and parented objects on your file, it confuses importer and it expects everything to be skinned mesh. Try parenting them to proper bones inside Unity