Search Unity

  1. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  2. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  3. If you couldn't join the live stream, take a peek at what you missed.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    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,525
    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,730
    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,525
    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,525
  5. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    17
    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,525
    ???????????

    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:
    17
    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,525
    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:
    603
    theANMATOR2b and MrDude like this.
  10. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,525
    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.
     
    theANMATOR2b likes this.
  11. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,730
    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,525
    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,730
    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.