1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. Unity 2017.1 beta is now available for download.
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  8. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice

Mecanim, Animations, Skeletons and Avatars. Oh my.

Discussion in 'Developer Preview Archive' started by Jaimi, Aug 29, 2012.

  1. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    3,439
    I have 2,672 animations in my application. 1388 tied to a male skeleton, and 1284 tied to a female skeleton (The female skeletons have 2 additional bones). I have 8 other skeletons of various proportions that I can use as "base characters" to tied body parts to (I'm hoping to add more).

    Of the 2672 animations, all are exported individually as per the previous recommendations. Since these are individual FBX files, it seems that in order to "retarget" with Mecanim I would need to individually select each animation, and make it create an Avatar (even though they're the same skeleton).

    So my questions are:

    What are the implications of creating so many "Avatars" - ie, memory overhead, processing overhead, etc?
    Is there a way (beyond loading all of the files up in Max, and combining them into one animation) that I can reduce them to just two avatars with all the animations on them (ie, some preprocessing script or something)?

    Also - What are the implications of binding all of these animations to the 8 different skeletons? If I retarget all of these animations in advance to the 8 different skeletons, is there overhead involved if they are not in use? These are skeletons that would be selected by the player, so there will be only one in use at a time.
     
    Last edited: Aug 29, 2012
  2. BRShins

    BRShins

    Joined:
    Aug 22, 2012
    Posts:
    29
    You dont need to create an avatar for each one, you can use the avatar pose from one of them, for all of them (if the skeletons are the same).

    Select the FBX with the anim you want (an FBX which currently ISNT an avatar), in the inspector click the Animations button, under that in Muscle Definition choose 'Copy From Other Avatar' and pick an avatar from one you've already made.
     
    Last edited: Aug 29, 2012
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    3,439
    Thanks - I see in the scripting reference a function "ModelImporter.CopyAvatarFromOtherModel", Looks like it should be possible in the PostProcessor to get (and save) the Avatar on the first model by getting the Animator behaviour from the model, and it has an as-yet-undocumented GetAvatar() function.

    Still curious if there is an issue with so many Avatars being created/copied. Guess we'll see. :)