Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Resolved non-humanoid leaf bones not processing in some cases.

Discussion in 'Animation' started by Nathanieljla, Sep 19, 2020.

  1. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    Attached is a simple package (HDRP or Standard) people can use to test with. I'm on 2020.1.3

    I've been looking into this for two days now and I'm losing my mind. I have a humanoid character with four auxiliary leaf bones. Two are at the root of the character and two are children of the hands. I've used masks to ensure the bones are included in the animation.

    If the animation is dragged directly into the scene you can see the aux-bones in their correct position. Both left aux-bones should be in front of the left hand. The right aux-bones should be in the right hand. However the bone's aren't being processed when the animation is played via the animator component.

    I'm beyond lost. I want to believe it's user error, but I recreated the same setup in a fresh project and it worked in the test project, with dummy content. Comparing the dummy content with the real content everything is setup the same. This leads me to believe there's something internally here that's broke, but I'd love for someone to point out it's user error.


    example.PNG
     

    Attached Files:

    Last edited: Sep 20, 2020
  2. jnseb

    jnseb

    Unity Technologies

    Joined:
    Oct 3, 2016
    Posts:
    10
    Hello Nathanieljla,

    I've taken a look at the .fbx file (@HIK_TEST.fbx) and discover that hand_l_wep, hand_r_wep, left_item, and right_item bones didn't contain animation data... I've baked the static position and rotation on the aforementioned objects and make sure to import in unity without any animation compression... and it appears to have resolved the issue.

    Fix.jpg


    Please look at the attached files for more details

    Cheers

    JnSeb
     

    Attached Files:

  3. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    Wow. Thank you so much! I'm out of town for the week, but I'll check this out soon. I never would have guessed a transform would be ignored, just because there's no keyframe driving its value.
     
  4. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    I confirmed your fix resolved my issue. That was definitely an uncommon situation, as normally you'd expect things that are posed to be keyframed. From an end user point of view it really would have been great if there had been some type of import message for this case. It would have saved me a lot time and frustration. Something as simple as:

    If (bone is included in bone mask && no animation curve exists && bone transform != transform of avatar/rig file):

    "Bone X contains no animation data. This bone will be ignored".
    OR
    "Bone X is included in in bone mask, but contains no animation data. This bone will be ignored".
     
    Last edited: Sep 29, 2020
  5. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    @jnseb, I just had to support an animator who didn't know why their weapon wasn't aligning correctly in engine. They noted that if they didn't share an avatar the animation looked correct, but once sharing an avatar the animation was wrong. I had to explain to them that a bone's transform will be ignored, even if it's included in the mask, if there's not a keyframe on it. A simple import warning would have saved them a lot of time.