Search Unity

Unity Animation Retargeting

Discussion in 'Editor & General Support' started by SilverStorm, Dec 2, 2012.

  1. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Hello Forum recently I had been trying out MecAnim and trying to get my characters animations - I have two each with similar rig but different names to playback swap animations - in other words MecAnim has been said to be able to retarget animations.
    I created an Avatar for both characters thinking that would be all that would be required to be able to play Animations on both girls without anything more needed but then theirs all this nonsense about Animator Controllers, Scripts and Also I get errors trying to play the original animations saying they must be Legacy - but if they change to legacy from humanoid then no avatar can be created.

    So I suppose either this MecAnim is a scam or Unity actually has no Retargeting right out of the box - so I simply want to basic Retargetting right out of the box. The old method of retargetting I used was never perfect as Unity scaled the bones to fit the other character and the other character had to have the same bone names - as you can see that's all a Pain.

    I managed to get it to work the way I wanted but I still prefer to use legacy as well as avatar.
    In fact I still get these errors :

    Default clip could not be found in attached animations list.
    The AnimationClip 'Anima_001' used by the Animation component 'Girl1' must be marked as Legacy.

    I get several of those and I am unsure what the problem is.
    Also I have a lot of clothes on my models and for some reason in Unity 4 When I deactivate the Top of the Hierarchy I no longer get the message "This or All" ....any help on that?
     
    Last edited: Dec 2, 2012
  2. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    the "easy geared toward artists that don't know much about scripting" was a way to hook you in the mouth lol
     
  3. Loius

    Loius

    Joined:
    Aug 16, 2012
    Posts:
    546
    The animation component Girl1 has an animationClip named 'Anima_001' and you must mark that clip as Legacy to use it the way Legacy animations work.

    Unity4 no longer allows child objects to be active while their parent is inactive.

    MecAnim isn't a scam, you just have to actually play by its rules instead of trying to create some weird fusion of 3.x and 4.x functionality. Upgrading major versions during a project is gonna give you this behaviour, no matter what engine you use (or what game you play, or what anything you anything).
     
  4. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
  5. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    I already know how to use Mechanim through experimentation now and I agree I see that power now. But my problem still remains. I have heaps of Legacy Animations But I also have Animations which need Retargetting. It doesn't seem to give both options.

    I have many Animations which are part of the Original Character and they are the Legacy Animations and I also have Other Animations from another girl which have been retargetted - I have an Animation Component Attached For Those Legacy Ones and I also have an Animator attached for the Retargetted ones.
    I also have A Mechanim Retargetted Animations. So far the retargetting works well but requires an Animator Component to work and that's fine.

    But I need both Animations to work together. I have a lot of Characters and Unity Only allows either the Legacy OR Humanoid Options - not both. The Animations from the Legacy ones activate when a button is pressed - but nothing happens because of the limitation with 1 Option for Character Type.
    It Appear so far Unity Doesn't actually have a proper solution for Re-targetting - that is what I meant by scam.
    The older retargetting method doesn't work so well because they scale and they don't work at all if the bone names are different.
     
  6. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553

    I by no means was insinuating it is a scam just saying it was harder than all the hype made it sound like it was
     
  7. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Hello Guys I think this thread should be closed now unless anyone can pose an actual solution. I suppose if this is how things are gonna be then it might be for the best. After all once you get to know the system the system can be quite powerful.
    And a Fusion is possible.
     
  8. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    This topic is funny.
    Mecanim works perfectly fine.
     
  9. Jax_Cavalera

    Jax_Cavalera

    Joined:
    Jul 22, 2013
    Posts:
    44
    I am finding that the animations I create retarget fine to other characters I have made but... to a random character from the Asset Store... it acts rather odd.

    My characters jump up into the air from their original position and then land back there again at the end... the ones off the Store pull their legs up to the height that mine jumped to and then lower them to the ground, their head not moving up or down at all.. leaving a very strange animation sequence.

    SO.. I uncheck the root position on both and then they both do the same thing as each other.. the odd leg hover retract detract thing.

    this tells me that only 1 of two things have gone wrong and I can't figure out which OR how to fix 1 of them.

    I plan to test 1 possibility again now using the sage advice of ALF from the following thread : http://forum.unity3d.com/threads/169199-Problems-with-the-Mecanim-Animation

    The other would be that the mesh I used to create MY animations with is not in the default T-Pose as it's Rest Pose so I will need to change that...

    my challenge then is to try and figure out where my mesh's origin is supposed to be located at and if it's meant to be standing above the X axis or be at the dead centre of it .. so if it's origin were at the center of it's mass then the origin would be at 0 0 0 (X Y Z) but if it's origin is meant to be at the feet at point 0 0 0 but it's body stands on top of the origin.. then yeah... well my character would already be working just fine so I don't know .

    Is there a person out there that can provide some light on how to resolve this problem please.



    WELL


    turns out i got it working .. looks like the origin point is at center of mass so all i had to do was delete the existing avatar for new models after adjusting scale or scale factor and then re-target them to copy from another avatar.. and select NONE as the one to copy from.. that deletes it.. then I simply set it back to create avatar from this model and it builds a new avatar based on the new scale or scale factor.

    I will still need to fix the T-Pose as some things don't translate right but both are at least jumping now identical heights.
     
    Last edited: Sep 12, 2013
  10. LuckyHRF

    LuckyHRF

    Joined:
    May 17, 2013
    Posts:
    6

    hello, I really want to know how to solve the question. thank you very much....
     
  11. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Well I found out their was a memory leak in Mecanim and never went back. In the end what I did was I made two files each visually the same but with different bones and just used Legacy animations on them instead of a mecanim rig.

    Because the models were identical whenever I would need to play an animation that the one visible could not do I just deactivated the current gameobject character and activated the other.

    I even went further as to keep all the head objects separate from the bodies and attach them during runtime.

    But if you still want to use mecanim I can't help you its been too long since I used it.
     
  12. LuckyHRF

    LuckyHRF

    Joined:
    May 17, 2013
    Posts:
    6
    After so long can you still remember how to solve, very good. In fact ,I want to say,how to make Legacy animations in Unity 4.5.2 version. I'm chinese man, English is very poor, wish you can understand what I say. Hope not to make you trouble.
     
  13. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    This is all I can do, I show here how to create legacy rig.
     

    Attached Files:

  14. LuckyHRF

    LuckyHRF

    Joined:
    May 17, 2013
    Posts:
    6
    Thank you very much.