Search Unity

Spine Transform X has bone length of zero; Debugging Mecanim

Discussion in 'Animation' started by Pirs01, Oct 25, 2013.

  1. Pirs01

    Pirs01

    Joined:
    Sep 30, 2012
    Posts:
    389
    So I import fbx and when configuring avatar I get this error:
    $error.JPG

    But you can see here that it's length is totally not zero:
    $selection.JPG

    Am I missing something obvious here or is this a bug?
    Where do you report bugs around this forum by the way?

    I've been trying to create and import a simple run animation into Mecanim for days now with all kinds of different problems which seem to be beyond my control. Like Having a model that imports fine but then after some cosmetic adjustments to animation it get's all messed up in Unity or the clip doesn't work at all. Is there any way at all of debugging Mecanim to try to pin point the problem?
     
  2. rahul1989

    rahul1989

    Joined:
    Nov 27, 2013
    Posts:
    2
    Hello Pirs01,

    Have u found the solution for this issue? I have been facing similar issue in my rig done on Max '14.

    $error.jpg


    If anyone has any solution for this, please update this thread.

    Thx

     
  3. Owen Burk

    Owen Burk

    Joined:
    Sep 18, 2013
    Posts:
    1
    I have the same problem and I am using 4.3.4.
     
  4. Shadyfella

    Shadyfella

    Joined:
    Mar 29, 2013
    Posts:
    5
    I also have this issue except that for me ... its a prop (gun) attached to the right thumb Intermediate if I detach the object it affects the gun adversely.
     
  5. rbarbosa

    rbarbosa

    Joined:
    Jun 20, 2012
    Posts:
    61
    Same problem. Doesn't seem to impact animations. And sometimes just clicking on the bone in the rigging panel makes the message go away (scrolling the window seems to make it go away as well).

    In my current case, though, nothing is making the message go away.
     
  6. rbarbosa

    rbarbosa

    Joined:
    Jun 20, 2012
    Posts:
    61
    So, I know this is an old thread, but I was able to resolve this problem (and others) by ensuring that my models have more bones. The ones listed as optional in Mecanim. Now I make sure my models have shoulder bones, chest bone, 2 arm bones, 2 leg bones, and hand/foot bones. Ensuring that you have all the bones in place seems to make this message go away.

    It also makes the Mecanim deformations work more reliably. I've had "dead vertices" on my meshes in the past that simply didn't deform during animations. Making the characters look like they had lumps of dead flesh. More bones solves this problem as well.
     
  7. CrazyZombieKiller

    CrazyZombieKiller

    Joined:
    Jun 8, 2015
    Posts:
    6
    Hey Guys, I'm pretty much a noob, self-taught that is, but I figured this out and am glad to help. Although this is a very old post, I hope it helps sometime, someone.

    Solution:

    Examine the bone that has a zero length in Blender. I imported and fbx into Blender from Unity, modified it, and exported it back to Unity. Somewhere along the line my model's hip bone was subsumed into the reference bone. So a little tip of it was sticking out from the reference bone. A reference bone is a large bone that goes from between the feet to the crotch. It is used for endless cycling. So when Unity imported my model, and was calculating the lengths of the bones, it stopped at the end of the reference bone and couldn't find the hip bone because it was inside the reference bone. It couldn't find the beginning of the hip bone. So all you have to do in this case is go into Blender and shrink the reference bone to pop out of the hip bone. When it is importing into Unity, voila, the missing bone is found and you get a green light in your muscle map configuring the model.
     
  8. AbysmalDoom

    AbysmalDoom

    Joined:
    Jan 10, 2018
    Posts:
    3
  9. raidercoyjr

    raidercoyjr

    Joined:
    Oct 9, 2022
    Posts:
    1
    7 years later and yes this helped me so much thank you!
     
    nicolelkitson likes this.
  10. unity_D78E92FB8F9FCE3EF933

    unity_D78E92FB8F9FCE3EF933

    Unity Technologies

    Joined:
    Jul 14, 2023
    Posts:
    1
    Had same issue today, noted that it happens to spine bone because in my rig it's parented to hip bone which is reversed pointing down. After I aligned hip with spine and connected spine to it on deformation skeleton the issue was solved. To keep rig property of hip in Blender on control rig I keep hip reversed and connected deform bone to it through Child Of constrain ( instead of Copy Transforms ) upload_2024-3-15_13-27-15.png upload_2024-3-15_13-27-48.png