Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

When will Unity start supporting Mixamo animations?

Discussion in 'Animation' started by MrDude, Jun 12, 2018.

  1. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    For a while there it looked like Unity and Mixamo loved each other so much there might be a baby on the way with the sheer amount of times that Mixamo was included in sales while the rest of us patiently waited the months or year+ to go on sale and, heck, Mixamo even had a permanent slot on the front page so nobody could miss looking at Mixamo...

    Well I have over 800 animations from Mixamo and whenever I try to use them with Humanoid characters so I can make use of the retargeting which is why Mecanim was brought into existence for in the first place I still cannot use a single one of those files as all of them get messed up insanely badly. I was looking for a solution to the problem and all I got was people complaining about this from YEARS ago and yet, in 2018.1 you STILL can't use Mecanim to retarget a Mixamo animation. As soon as you convert the animation to Humanoid it gets messed up...

    If you leave it as Generic then the animation plays just fine... but you can't use the retargeting so yo better hope that every single character you buy on the store has the exact same skeleton setup. In my case, I bought the Kunoichi character which comes pre-rigged and is mecanim compatible but doesn't come with any animations. After trying to add some animations, this is the best result I got:
    1.JPG
    from this setup
    2.JPG
    A prize to anyone who can correctly guess what this animation is supposed to be... Clearly it's obvious, right?

    Trust me, the rest of the animations look scores of magnitudes of infinity or more worse than this. So what the hell, man? After all these many years when is Mecanim finally going to be able to retarget animations?

    The only way for me to use the Macanim animations was to open the mesh in Maya, remove the skinning, export to OBJ, upload to Mixamo to be reskinned with their skeleton then download each of the animations I want to use while exporting a copy of that model with each animation. Now I just have to repeat for every character in the game and download the same animations again for each of them.

    How totally pointless is that? So when can we expect to see Mixamo retargeting working in Unity?
     
    Last edited: Jun 12, 2018
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Sounds like a problem with the original rig or the avatar setup, rather than issue with mecanim and mixamo anim support.

    Can you show the rig hierarchy (all bones) and the avatar definition created from the character and applied to all the animations?
     
  3. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    This happens with every character including characters of my own that I rigged on Mixamo a well as Mixamo's own characters

    Notice in the screenshot there is a blue character. That is one of their characters that got included in the download of their animation. If you want to see the bones history, just rig any character via their rigger or download any of their characters.

    I used the same animationcontroller on the Kunoichi character from the Asset Store (which does include more bones than required for Humanoid) as well as the one from Mixamo and both had the exact same poses on a frame by frame basis. I tried exporting the animation as FBX for Unity, FBX (no idea what the difference is) and Collada but all three had the same issue (although the collada model was also scaled 100x as expected)

    You know the problem is with Unity when Mixamo animations can't work with Mixamo's own characters...

    Try this: Downlod any animation from Mixamo.com. Now upload any of your characters to Mixamo.com and let the rig it for you. Now try to combine the two in Unity in a Humanoid rig. Now you will see my issue first hand...
     
  4. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
  5. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    70
    Decided to spend 15 minutes checking this out while I wait for my morning coffee (procrastinate). I had no problem downloading 3 characters of varying proportions from Mixamo, setting them up as Humanoid characters and successfully retargeting the Mixamo Capoeira and Bellydance animations onto them within Unity. It took me longer to find and download the assets than it did to set them up and and test the retargeting in Unity. You might want to try re-reading the docs and checking your setup.
     
  6. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    ???????????

    I spent 2 days on this and even tasked my level designer to try since he said he had some experience with this and ... nope... neither of us got anywhere.... I have not had any luck since the time Mixamo still had the plugin on the asset store to download the animations directly. So what in the world are you doing differently?

    Please note, though, what I said in my original post... If I download the animation with the character skin then I can play them as Generic just fine... but downloading the animation first then trying to use it with another character, no chance.

    Are you saying you downloaded the animation once and used it on three characters? How the hell????
    What part of downloading a mesh from Mixamo and trying to apply an animation I downloaded from Mixamo resulting in the image above could be caused by my (and his) setups? What part of the docs will explain why an animation from Mixamo doesn't work with a character from Mixamo?

    Just google this exact same issue as me and see how many people have been having this issue for how many years now. If it works out of the box for you then either you are a savant or there is some magic going on here.

    It's not like it's rocket science... You download the mesh from mixamo, import it into a project, set the rig to humanoid.
    You import an animation from mixamo into the project, you set it as humanoid.
    You create an animationcontroller, assign it to the character and then drag the animation into the controller
    The character is configured since Mixamo generates the correct bones
    The animation is the first and only animation in there so it will play by default... so hit play.

    Instant errors... What part of that was wrong? What part of the newly downloaded character do I need to check or which section of the docs will explain what step above is wrong? I am at my wits end with this.... Telling em to go check the docs after years of checking the docs is not a viable answer, I'm afraid. Those are the steps I follow. What am I doing wrong?
     
  7. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    70
    It's not rocket science and the steps you described are basically exactly what I did:
    Download characters, import and set to Humanoid.
    Download animations, import and set to Humanoid.
    Create simple, single state Animator to test animations.
    I still had the project open so here's a groovy screencap:


    If you're following the instructions and still having problems I can only suggest you try again in a clean new project and figure it out. The feature definitely works in my project and I'm not aware of any special steps that I'm taking.
     
  8. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I figured the same thing so I did just that. I created a new project, imported their Beta Female and some animations ... same story.

    Busy uploading the project now. Check it out yourself and you will see what I mean when I say totally screwed up! :O
    Can it be that a small % of Mixamo animations actually work and the rest are all configured wrongly? But why then do they work correctly as Generic but not as Humanoid if the animation isn't broken???

    You can download the project here: http://www.mybadstudios.com/Downloads/MixamoTest.zip
    It's a 10Mb Unity 2018.1.2 project ... in retrospect I should have made the sample in an earlier version, my bad. ;)
    If you or anyone is willing to help and want to see for themselves that I am not crazy in the head, click above and see for yourself... Then figure out wtf is the deal here and let me know, please! :D

    I look forward to learning from your wisdom! :)

    p.s. "Gooofy" my backside. Seeing that demon do his belly dancing is the stuff of nightmares
     
    Last edited: Jun 13, 2018
  9. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
  10. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    OMG... That actually worked...... :O
    So the secret is to set the ANIMATIONS to the avatar of a character it was MADE for and THEN use it.
    I tried changing the character's avatar to that of the character the animations were made for and I tried using it's own avatar but the constant here is that I tried changing the avatar on the CHARACTER, not on the animation... Guh!

    In that sample project above I imported the Kunoichi character now and I have the kunoichi using it's own avatar. The Beta character still generates it's avatar from itself but since all animations were exported with the Beta character selected I changed the avatar on all animations to use the avatar created by the Beta character.

    With that done, both characters with separate avatars work perfectly. Holy cow. I can't believe I am finally saying those words....

    Key thing here, though... the avatars on the ANIMATIONS needed to be changed... Now the animations work just fine on characters with DIFFERENT avatars. In fact, I'm not even using the Kunoichi model that I reriged yesterday to match the Beta character's skeleton. I am using the normal avatar that contains far more bones than what is needed by the Humanoid system and even though the avatars do not match, the animations works.

    Amazing that the animations were all exported using the same character and yet telling it to create the avatar from itself doesn't work. Telling them to get the avatar from the static character instead.... that works. Now why couldn't someone have told me this years ago? Cause that makes no sense at all... bu at least it gives you a means of getting things to work!

    Finally!

    Thanks @dibdab
    By the way, your signature is broken. Neither itch nor the asset store links work.
     
    AB498, Lleron, twobob and 2 others like this.
  11. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Humbly pointing out - the solution is what I mentioned in the first post. :p:cool:
    Yeah - I was going to say - I've done this about 2 dozen times on multiple projects.

    But this is the important part - I noticed you skipped the avatar generation and associating it with the animation file.

    Happy that you found a solution. Can't wait to see all the awesome animated characters in your game!
     
    MrDude and teutonicus like this.
  12. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Yeah it seemed i missed that part. My bad. It makes sense to think "I am using different characters. I should make this one use the avatar of that other one so they can work the same". It still doesnt make sense to me to say "I downloaded 800 animations using the same character. I better go tell all 800 of them that they have the same setup"...when I read your reply the first time my brain must have done that thing where it reads the first and last word and deduces the rest from that That is a thing,right?

    But yeah...simple enough solution but nonsensical enough for me to not feel stupid for never making that connection. I always thought about it as retargetting one CHARACTER's animation onto another. I never imagined I would have to tell the animations themselves: Okay, so loop over your bones,take note of what you have,okay,now know that those are the bones you have. I thought that would be obvious enough. Since they were made from the same character why would they be different from one another? And would'nt "rotate the left shin" determine "Hey, I know where the left shin is cause I have that node"?

    That,to my mind is, just as useless as this bit of code:
    Code (csharp):
    1. Transform[] bones = transform.GetComponentsInChildren<Transform>();
    2. foreach (Transform t in bones)    ;
    Anyway, as I said, I now know where I have been going wrong (and it seems I thought about then in all the excitement forgot to add: Hey looky there! There was a step missing in my workflow. My bad again :) Meant to highlight that) so now I can finally move forward :)

    Many, many thanks for finally solving the great mystery that was Macanim. Now if you could fix my lighting setups just as easily then you would be my hero for life! Lol.

    Ive been usung Unity for a decade now and finally started on some unreal tutorials,planning on leaving Unity behind me for no other reason than the lighting system... But I'll leave that story for another day :)

    Thanks again, very much so.
     
    Last edited: Jun 14, 2018
    theANMATOR2b likes this.
  13. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Yeah I understand the disconnect. Best to think animations are separate assets as are characters, and texture files. It doesn't help that characters, rigs, textures and animations can all be imported into the engine at the same time, but considering animations are separate assets from the character helps associate them correctly.

    Think of the avatar as the map to match the bones in the animation - with the bones in the character asset, and allow the animation to be played ON each character with a humanoid setup. ;)
     
    MrDude likes this.
  14. ex0r

    ex0r

    Joined:
    Nov 9, 2012
    Posts:
    29
    So is the solution to copy the avatar from the animator controller into the animation prefab, replacing the avatar that comes from Mixamo in the animation? Got a little confusing there, and I am running into the same issues.

    My characters aren't from Mixamo, they are Uma characters but use the same bone structure.
     
  15. Rakesh6720

    Rakesh6720

    Joined:
    Jun 14, 2018
    Posts:
    5
  16. Rakesh6720

    Rakesh6720

    Joined:
    Jun 14, 2018
    Posts:
    5
    Thanks for sharing your issue and being so thorough about it! You totally saved my butt.
     
  17. jonnytracker

    jonnytracker

    Joined:
    Sep 13, 2016
    Posts:
    31
    the problem is unity consider root bone to be on ground... meanwhile mixamo root bone is hips
     
  18. LordCafe

    LordCafe

    Joined:
    Aug 26, 2015
    Posts:
    35
    Use mixamo as last resource for animations they have good animations but they are so problematic to deal that almost don't worth.
     
  19. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    197
    what a cool summarization of this thread. really glad you chimed in. actually, if you bothered reading the thread youd notice the animations work great when you set them up the way youre supposed to. maybe you should go help someone else.
     
  20. LordCafe

    LordCafe

    Joined:
    Aug 26, 2015
    Posts:
    35
    Lol you're bit toxic aren't you? mixamo animations don't work properly with Unity you have to do a lot of preparation like you did just to use, i can download any animation from unity asset store for any model and just put a humanoid config and use but for mixamo with have to import our character to their platform, rig, download again, import and config if this is "work properly" with unity so go ahead but when you had two animations for diagonals and mixamo animations start to glitch because they have a compatibility problem don't ask in unity forum okay? go ask for help in another place. Since this little glitch had to be solved download another animation from the same angle because mirror don't work in mixamo animations but you can overcame this problem using offset to adjust and mirror at the same time but normal animations don't need all this work just to work with mirror options, for me animations that need this whole work should be only used in last case cenario.

    Btw i read the whole post and saying that mixamo animations are good for everthing and that work properly with no work it's no true as i said they need a lot of preparation since mixamo humanoid and unity humanoid aren't the same.

    Cheers.
     
  21. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    197
    you're discouraging people from using a great resource, and after the problem had nothing to do with said resource. you also said that we should use mixamo as a last resort. so, ok. i decided im going to take your advice. would you mind pointing me in the right direction?
     
  22. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    197

    Hey, come on. I thought you were interested in helping out around here? So can we all take that as a no?