Search Unity

Enemy Mesh is spawned without weights ?

Discussion in 'Formats & External Tools' started by Dawnreaver, Apr 19, 2013.

  1. Dawnreaver

    Dawnreaver

    Joined:
    Oct 13, 2010
    Posts:
    131
    Hey Folks ^_^

    So I have the player character, I can swap animations end everything works fine. The problem is, I'm using the same model for the enemy, but as soon as I swap an animation, that is not part of the initial animation of the imported model, it seems to completely ignore the weighing of the skinned mesh. The animations I swap are actually made with the same model, but only the animation is exported so I have them as Main@Run.FBX

    Any Idea why this might happen ?

    Cheers!

    Dawnreaver
     
  2. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Something I do not understand from your message is you actually HAVE to export the character and animation as separated data....

    This way it is very easy to re-use animation on each skinned models if the skeleton is the same (bones hierarchy + names)
     
  3. Dawnreaver

    Dawnreaver

    Joined:
    Oct 13, 2010
    Posts:
    131
    Why would I have to do it ? I can just split the animations right ? The Problem is that either way the mesh gets completely distorted :(
     
  4. Dawnreaver

    Dawnreaver

    Joined:
    Oct 13, 2010
    Posts:
    131
    Here an image to illustrate the issue:
    $bug.jpg

    I imported the character and the animations separately. The skin of the character just starts spinning loosely :(
     
  5. Dawnreaver

    Dawnreaver

    Joined:
    Oct 13, 2010
    Posts:
    131
    So I had a look at the bones while the game is running and apart from the root bone, the skeleton is all over the place :( Well it is rotating out of position. Our Artist did the animations in 3DS Max. do you guys have any idea why this might be happening to the skeleton?
     
  6. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    300
    make sure your animations are baked every frame. also make sure you are using the same scale for each all the way through the pipeline.
     
  7. Dawnreaver

    Dawnreaver

    Joined:
    Oct 13, 2010
    Posts:
    131
    The animations are baked in Unity. I couldn't find any difference in the scales. Could the sample rate of the animations in Max and Unity be an issue ?
     
    Last edited: May 7, 2013
  8. Dawnreaver

    Dawnreaver

    Joined:
    Oct 13, 2010
    Posts:
    131
    OK guys so we found why the character was acting strange: the blend mode of all animations was sat to additive, causing the havoc when the enemy character was spawned. Thanks for the support!