Mecanim, Animations, Skeletons and Avatars. Oh my.

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

  1. Jaimi

    Jaimi

    Member

    Joined:
    Jan 10, 2009
    Messages:
    2,252
    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

    New Member

    Joined:
    Aug 22, 2012
    Messages:
    26
    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

    Member

    Joined:
    Jan 10, 2009
    Messages:
    2,252
    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. :)