Search Unity

Exported animation from 3D Studio max is not correct in Unity

Discussion in 'Animation' started by opeca, Feb 12, 2015.

  1. opeca

    opeca

    Joined:
    Sep 17, 2013
    Posts:
    19
    Hello All,

    A weird problem appears when I try to import animation what has created with 3D Studio max.

    I have a very simple modell, I didn't use standard bones, instead of them I used dummy objects and signed as bones with Bone Tools.

    Created an animation which contains a standard scale for the "body" dummy object in order to simulate breathing. To avoid to take a side effect on the linked dummies, I switched off the scale inheritance in max under Link Info for all childs.

    It's working correctly in max, but when I import into Unity, seems that this prohibition disappared and inheritance of scaling is active.

    Does anybody met with this problem or have an idea what should I cvange?

    Thanks in advance!
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    There is no such thing as Scale inheritance in Unity.
    Scale is always inherited.

    Unfortunately we can't support all the fancy mode that authoring have, there is more than 6 authoring tools all with different way to compute transform. So we are relying on exporter to bake all this information into something that Unity can understand. Sometime it can't be supported.
     
    theANMATOR2b likes this.
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    There are several better solutions to do this anyway.
    I have a saying that I've kept for a long time and had it set to my teams wallpaper a long time ago, Scale = BAD.
    And scale is BADx2 when working with real-time animations and rigs.

    fbx converts deforming/translating/rotating dummies to bones on export so there is no problem with your workflow in Max aside from scaling. Look up rigging and skin mesh renderer in the documentation. It explicitly calls out scaling as being not good for Unity. And other game engines are exactly the same.

    Here are a couple solutions that are better than scaling a dummy object.

    1. Morph target. If the model is very simple as you stated, morph target is a simple solution to a repeating animation like breathing.

    2. If you want to have additional control, you can setup the bone structure or dummies in a different hierarchy.
    See image below Right and left hierarchy to control the chest expanding side to side, and front bones to control the chest in and out.
    upload_2015-2-17_16-19-26.png


    3. Dummy objects aren't restricted to a bone chain in Max so you can easily translate/move the dummies at the end of a bone chain in/out and left/right to simulate breathing.

    4. If your still set on using scale (advise against it) only scale the very end dummy/bone so there is nothing below the scaled object in the hierarchy to inherit the scaling. Then on export select bake animation keys. This works as expected and if you are experiencing different results there is something not setup correctly.

    Hope this helps a little.
     
    Mecanim-Dev likes this.