Mechanim vs Legacy Animations

I’m just curious how many of you use Mechanim or Legacy Animations for your Projects, or if you are using Legacy currently do you plan to move on to Mechanim eventually? and why?

I honestly can’t say I have put to much effort into learning how to work with Mechanim, I’m pretty comforable with Legacy Animation System it has suited my needs so far, so I just haven’t had a real need to move on to Mechanim just yet.

What would say are the biggest benefits of Mechanim vs Legacy Animations besides the fact that you can easily share animations?

Those of you familiar with both Mechanim and Legacy, which would you say is easier / harder to work with?

Sorry if this has been posted before, I guess you can just link me to a similar thread if this has all been discusses already.

While I still like Legacy Animation, because it gives me a lot of control, you have some nifty features in Mecanim as well.

Perhaps the best feature, bipedal rig re-targeting: Make a set of animations once. Then share them among every other two legged character you’ll ever make.

Root motion: you give Mecanim an animation that already has movement… and you don’t have to worry about the feet sliding on the floor. Especially when it’s a movement with irregular speed… such as zombie walks, pushing heavy boxes, or any motion that doesn’t translate at a constant speed.

Blend trees: You can blend several animations using a float value. (Yeah, same as legacy, hehe)… but in Mecanim is faster to setup. And I especially like 2D blend trees… take two float values (such as forward speed and strafe speed)… and then start adding the animations to the respective values. And if two float values are not enough (say you want to add angular speed, or even acceleration) … use a blend tree inside a blend tree (nested blend trees).

Layers: you can override all animations with a layer on top at any moment. For example I use a layer when the character is mid-air… so whatever the character is doing, he blends into fly mode and goes into a free falling state, and lands as soon as he hits the ground.
*And layer mask are very useful, to mix animations. Such a walk animation + torso animation. Just make a layer with a mask that only allows torso and arm animations.

Transitions: They’re great to switch and forget, to any state you need, without any conflict. Switch from normal movement, to combat mode… back to normal, to climb ladder, to dying, etc.

All of the above are only the Unity free benefits.

@dogzerx2 awesome thanks for all the info! yea those sound like some pretty awesome features. I guess when, or if I ever work a huge project mechanim might be the way to go.

Yep! Legacy is still very powerful, and you can do everything you need with it. And also Mecanim workflow is slightly confusing at first… but I think once you know how to use it, it can give very nice results in very little time!

Later!

Do you happen to know the difference in performance between the two, especially on mobile? At the moment I’m using legacy, but I’ve been considering switching to mecanim, just a little worried about performance on an older iPhone.

Legacy.

Mecanim is to complicated for my simple stuff and confusing.

Why should I change something when it works good enough for me, right?

I use legacy for simple stuff, but if I were to do anything that required non0trivial state management Mechanim would be my preference. At the end of the day if you’re making your own complex animation management system with legacy animations you’re essentially re-inventing the wheel now that Mechanim is available.

ive tried both. im going to use legacy. i have very large collection of mecanim animations, but sadly i cant use them cause of issues with mecanim. and cause i dont want to create crappy low quality game just so that i can use technology that is not ready for primetime.

in my opnion mecanim is not ready for prime time and is still an unfinished work in progress.

dont get fooled/lured into it as a result of marketing hype and nice ui

when petal hits the metal the flags come out

just try any of the mecanim samples and they all have the same issue

sadly without unity supporting events for mecanim animations it is little more than a toy

basically you end up with game that is somewhat unresponsive to input and animations that feel sluggish/laggy

all this is because the code does not dont quite know when an animation completes

legacy work just great non of the above issue exist.

and if you are worried about the same re-targeting animations to different models then you can inexpensively buy fragmotion to re-target them…

for more detail look at my recent posts in character system.

http://forum.unity3d.com/threads/143609-Character-System/page52?p=1400560&viewfull=1#post1400560

basically author has resorted to add WaitForSeconds () in his code and while i guess he could have put better falues to mask the issue its not the correct way of doing it. what should happen is when an animation completes it should cause an event. and while events can be faked it still fake and not proper solution. so mecanim needs proper events.

so keep using legacy until the finish mecanim or get it to a level of functionality equivalent or exceeding legacy…

now having beat up on mecanim as soon as they add events and give more control i’ll switch to them in a heart beat cause the ui / unity integration / conceptually so much easier. its just being crippled by such little thing. i just ant understand why its taking this long to finish up… i mean events cant be that hard. internally know when an animation is complete, just have some delegates / events defined that we can tie into, dont have it like black box with very limited functionality toy api.

perhaps someone should take a look at using reflection/instrumentation to get around limitations. of the other side is in .net and even in native unmanaged c++ it can be intercepted / directly accessed and events may even be possible to be added. im not sure the version of mono .net supports such stuff, but microsoft has added api for doing such things in their .net.

There is an even system in the asset store that you can use.
Robin didn’t have a choice but to do what he did for the Character System.
Mecanim is a vastly more powerful system then legacy. You just have to know how to use it. I have seen a lot more complex systems beyond that of the character system.
According the the keynote from Unite 2013… there are a lot of updates to Mecanim with 4.3

The ONLY reason i use Mecanim : re-targeting. I hate the Mecanim workflow.

A tutorial would be nice :smile:

+1 haha yes, thats exactly what i say… but i think i see the value of using Mechanim based on all these features dogzerx2 mentioned, and what angrypenguin says. I’ll probably continue using Legacy for everything unless i plan to work on some huge game project that requires tons of animations for many unique characters. it will probably save alot of time and money.

Thanks for sharing your experience @im , I kind of get the impression that it will be a big learning curve, and will take time to really master mechanim and get it working right, so it seems… ahhh I’ll just stick to what works lol! I vote Legacy all the way! haha…

The number of animations and/or number of characters isn’t really the issue. Well… I guess the number of characters could be since a lot of animations could be very easily shared, but to me that’s not a big draw at the moment.

It’s the state management that gets my attention. A couple of years ago I wrote a really complex system on top of the legacy system. Characters needed multiple layers of animation, each of which had to play multiple animations at once blended together in order to get the required functionality. With legacy it took a lot of code to get it working, and was pretty model specific. With Mechanim the impression I get is that it’d take no code to get similar output, and would not be model specific. That’s two huge wins before even considering that it’d take less time (and thus be cheaper) to implement, or that the animation states could potentially be updated by our animator rather than the coders on the project.

i dont think its a learning curve problem. its very easy. its a missing functionality problem that they desperately need to address. so you see that the controller doing strange things to get around that fact that required functionary it missing. so its needlessly like square peg in round hope. and you see kludges of different kind to get around the missing functionality, but that never quite do so it looks / feel unnatural / strange. just try the demo you will see what i mean. and this is supposedly from the people who know mecanim. if they cant make it look/feel natural there is little hope that others will. and they dont.

i sending up with legacy myself. i would be willing to jump ship cause legacy require using 3rd party solutions and we all know that as soon as mecanim missing features are added its the place to be cause its builtin and very easy to retarget and do other stuff with. its just things like limited api, not having events.

@ angrypenguin

yeap, but without like getting an event when animation ends and getting api its sort of wasted since the controller is sort of like in its own little black box that cant be easily interface with. so you dont have ability to micromanage things. and you end up with case where user presses a key and it dont quite response as expected or as it does in legacy.

anways i think there has to be way to bubble this up and have things like mecanim events/expanded api go up priority list.

one way is to continue to use and support legacy. that will cause it to bubble up in priority…

so is there unity site where we can add / vote on what is to be fixed / added in upcoming release. that way the community can influence development…

from some of the posts it sounds like it. ive not seen the site. if someone posts a link im happy to go there and vote for mecanim events/expanded api

oh yeah and update update to latest mono or at least to garbage collector :wink:

Actually, if someone were to write a good tutorial demonstrating everything mentioned on dogzerx2’s original post in this threat it’d probably do well in the Asset Store.

I do feel mecanim, like a few other unity addons have been rush out the door. Legacy gives alot of power as is and for coders is the better choice right now imho due to a full api. Mecanim is still a great tool but has limited control where your stuck using there state machine to set it all up. I have played with mecanim quite abit but will still say im not an advanced user so far.

I do think its greatest feature is retargetting. Root motion is an ok thing as is its controller/statemachine and ik is something possible in legacy with code.

Mecanim appears to me, so far, as a quick n easy tool to get animations in and jumping to different ones with little coding ie for artist or novice coder. When you get into serious character stuff ie complex mechanics things go wrong and this system becomes very painful and limited. In my system characters have animations, physics, movement, transitions, control etc all working seamlessly and offering total control. Mecanim takes that away where i have limited api control and having to setup node graphs then painfully syncin with my stuff.

When mecanim offers the ability to use all its features via code then thats when it will be a more complete solution and make me switch from legacy.

Pretty sure if this feature existed with Legacy, few people would use Mecanim. :frowning:

Since I’m using Blender to do all animation, I can do “retargetting” pretty easily. I just keep separate .blend file with armature that is fully animated, then after modelling new character, using this shape:

   O
---|---
  / \
 /   \

(simplified, but it shows how they’re modelled), I just import armature from said “animation” file and skin to new character (rescaling if needed). Works surprisingly well.

And I’m too getting feeling that Mecanim was rushed out. Aside of being overly complex (it’s not “import animation, split into sequences by start and end frames, then put Animation.Play(name)” deal like it is with Legacy), there are little to no tutorials explaining how to use it properly.

Best of all would be an export of the skinned mesh + animations compatibles with Legacy after a retargeting by Mecanim. A dream…

Yep! Honestly im a bit weird that UT create Mecanim as completely different anim solution instead of create extension for legacy anim (like fragmotion) - then we have all power of “full code access” and other nice features which mecanim has now…(retargetting and event system incoming in 4.3…) but i think they have some good reason for this decision…