I’m a complete beginner at unity. Been using it over a year but mostly I just spent most of my time in blender creating characters and animations, so I still lack a lot of acknowledge about unity. This lead to my question.
What is Mecanim and what does it do? When it first got release, so many people were excited and blown away with it, but even after reading about it, my naive brain just said “meh, nothing excited.” I thought I just have to import my character with all his animations, and use a script to play the animations. But people kept saying Mecanim makes animations SO much easier, so I wanted to know how does it make it easier?
The two big contributions of Mecanim(IMHO) is the ability to retarget animations. By this I mean you can rig one humanoid and then apply that same animation set to any other humanoid models that share the same animations.
The other contribution is the visual state machine editor, which allows a more explicit interface for combining and blending your animations.
The Root animation system is touted more often, but that doesn’t apply to all use cases where-as the other two would. For my project the root animation has been extremely nice, and removes a lot of the “fine-tuning” you’d otherwise be doing with foot placement and inverse-kinematics.
It does a couple of things that make your life easier:
Simple retargeting of humanoid animations. So, let’s say you’ve got an orc with one skeleton and his own set of animations, and an elf with a different skeleton and its own set of animations. Back in the day, if you wanted to let the orc use the elf animations or vice-versa, you’d have to do a bunch of manual work in Blender copying the animations over, adjusting them to work with the different skeleton and bone set up, or use some special software designed for retargeting animations across different models, and you’d end up with two copies of each animation, linked to each model. If you ended up changing one of those animations later, you’d have to again manually reimport and retarget it on all the copies in different models. With Mecanim, you can turn all of your humanoid animations into one big list of avatar animations, and then easily use them with every humanoid model in your game, even if they all have different skeletons. You can buy crappy models with cool animations just to use those, or good models with crappy animations and easily toss the bad ones for the ones you prefer.
It lets you easily blend your pre-made animations with computed IK and physics animations. So you can use very simple scripting to have an NPC’s head point towards you while it’s playing some other animation, or have a character correctly put his hands on an object while playing a cool parkour vaulting animation no matter what size or shape the object is.
It has a built in animation state machine, which is pretty useful (though IMO still needs a little more work). But it lets you use nodes and arrows to visually set up things like blend trees of animations for running at various speeds or getting hit with different amounts of force in different locations.
Ohh! Thanks jmatt and makeshiftwings. The info about reusing animations for other humanoid characters pique my interest the most.
Just one last question, then I can rest in peace. IK kinematic is for pro only, I know, but what does it do for the animations, that it can only be use in the pro version? What advantage does it have if you use it?
IK lets animations more precisely interact with their environment. If you want your character to flip a switch, it looks nicer if the animated hand that does it can actually reach right for the switch, whether it’s right in front of the character, or off to the side.
To make the production of Mecanim Humanoid Animations more straight-forward and use Mecanim for your game characters I’ve put together a kit which may help for those unfamiliar with animating or even those that are experienced at it due to the way the kit works. http://forum.unity3d.com/threads/203298-Mecanim-Humanoid-Animation-Kit