Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Unity 4.3 scale on bones issues

Discussion in 'Animation' started by SimonLalumiere, Dec 16, 2013.

  1. SimonLalumiere

    SimonLalumiere

    Joined:
    Dec 16, 2013
    Posts:
    1
    First of all, we recently made the jump to unity 4.3 from 4.2 during the middle of our production. I know it is not a recommended process but company's policies and all, i regret we did. Now to the root of the problem:

    I'm using the Biped in 3ds max to do all my animations / rigging on the characters for the game we are making. Back in 4.2 we had no problem with the sacling of bones on the Biped, we even did some performance test and everything was ok. Then we upgraded to 4.3 only to see that the scale are now all wrong. if i scaled the arm, forearm and hand to make some stretch and squash, it now looks like the scale is triple on the last bone, but i cant know for sure since it is only in the preview window and in the game, i got no precise number on this, but that is how it looks like.

    I tried a lot of different things in my export settings in FBX and still, the character is all messed up and stretch way too much. I'm guessing it is a setting i am not aware of in unity 4.3 but at the moment, everything use the same settings as in 4.2 except for the new Avater feature wich is copied from the original rig export.

    I cannot show any pictures of the project or any of the assets i'm currently working on but if someone thinks needs visual to understand, ill try to replicate with some other objects.
     
  2. TheCCJ

    TheCCJ

    Joined:
    May 2, 2013
    Posts:
    71
    I've run into s similar thing in a project I've been working on for Unity, and this is what I've found out...

    (Note, I am working in Maya, so there *may* be differences, as how Maya process scale through a heirarchy mayt be different from Max. I honestly don't know)

    I was trying to scale a creature up to 2x size, so I did scale of 2x all the way through the heirarchy, but in doing so, when I brought it into Unity, the scale got applied exponentially. So, if I scaled up the root, the spine, spine1, spine2, neck and then head all at 2.0 to look right in the package, the head bone actually scaled 64x in Unity, and this because the 2x scale was getting multiplied down the length of the chain.

    So, Root, spine, spine1, spine2, neck, head - 2*2*2*2*2*2 = 64 scale factor on the end of the chain (neck would be at 32x, spine 2 at 16x, etc).

    What I ended up doing was animating to look right in Maya, then scaling everything but the bone where the scale started (in my case, the root), back to 1, so that when the scale exported, the cascading scale was just multiplied by 1 down the chain, so I had the head scaling at 2*1*1*1*1*1 = 2x factor, which held for each bone in the chain, regardless of how many 1s I multiplied the scale by.

    It ends up looking wrong in Maya, of course (character floating well above the ground plane, traveling far faster than it looks like it should, etc), but it ends up playing quite nicely in Unity.

    I should point out that this was being used on a Generic rig (it was a non humanoid creature). The scaling solution should work exactly the same on humanoids and others in Mecanim, but I don;t know for sure if other things in Mecanim like IK, etc, will play nicely with this or not.

    Hope this helps. And good luck!