Search Unity

Unity 4: More Mecanim!

June 20, 2012 in Technology | 4 min. watch
Placeholder image Unity 2
Placeholder image Unity 2
Topics covered
Share

Is this article helpful for you?

Thank you for your feedback!

Hi,

My name is Robert Lanciault. I am lead developer for Mecanim at Unity. I wrote this post to provide more information about what you can do with the new Mecanim character animation system in Unity 4, and how. We are thrilled that so many of you guys and gals are psyched about getting your hands on Mecanim!

Sonny Myette, Pierre-Paul Giroux and I started to develop Mecanim Animation Middleware almost 3 years ago now. When Unity approached us last year, we quickly realized that it was a unique chance for our technology to be natively integrated in a game engine and that with Unity we could develop the best animation tool ever. We joined this fantastic team 6 moths ago and we are now thrilled to release this first version of Mecanim in Unity 4.0.

A lot of you are hungry for more specific technical information. This is understandable, and we will provide extensive documentation for Mecanim when Unity 4.0 is officially released soon. In the meantime, I hope you find this additional information helpful!

Mecanim is a complete turnkey solution for character animation in games. It abolishes the need to spend expensive development efforts to integrate 3rd party middleware. Mecanim is natively integrated with and optimized to run in the Unity Engine. From the Editor, you get all the tools and workflows needed to create and build animation assets directly into your game.

Retargeting your animations

The retargeting aspect of Mecanim lets you choose among a vast library of existing motions or prebuilt controllers to immediately start animating your favorite characters without extensive planning on mocap sessions. Kickstart or realize your entire project with animation assets found on the Unity Asset Store or bring in your mocap or keyframe animation files to the Editor, and convert them to your own retargetable animation asset.

The retargeting rig can be set up on your humanoid character with just a few mouse clicks using automatic bone mapping and stance pose computing algorithms. The retargeting rig breaks down human body motion into a set of muscle contractions and uses a mass model to compute body mass center and average body orientation for motion trajectory. The retargeting rig can be used to extract muscle space animation out of your standard animation files or, as in most cases, apply animation assets to your animated character.

Blend trees and state machines

The Unity Editor provides powerful tools to split, create loops and extract trajectory from imported animation files. Those animation clips can then be used as leaves in a multilevel Blend Tree or as a State in a Hierarchical State Machine. Blend Trees let you create a wide variety of motion using only a few motion clips. In the Blend Tree Editor, you define blending parameters and preview the blended animations in a 3D view. Blend Trees, like Animation Clips, can be used as states in a hierarchical State Machine.

The Animator Tool is where the Multilayer Hierarchical State Machines are created. A controller can define an arbitrary number of Layers. Each Layer can use its own State machine or share a State Machine with a master Layer. Layers can be overridden or additive and the use of a Body Mask defines which part of the humanoid body they will affect. Finally, you can use a Hierarchy of State Machines to break down a complex and huge controller into smaller reusable modules.

The transition previewer, combined with a Multilayer Hierarchical State Machine, lets you easily author and tweak transition timings to perfection. The Live Link visual feedback provides an immediate overview of your states and transitions, and lets you debug the most complex controllers needed for your game.

IK rigs

You can then apply the final touch to your animation using the automatically created IK rigs to adjust feet on the ground, hands on the edge of a wall or look at something using eyes, head and full body adjustments. Other features, such as feet stabilization, auto compute of blending pivot and trajectory matching will help you create incredibly life-like interactive animation.

So, are you wondering about how many characters you’ll be able to drive using this powerful feature set? Well, we reached the magic number of 1,000 characters running at 30fps on a standard laptop!

And be sure to check out this cool video. Thanks!

This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.

June 20, 2012 in Technology | 4 min. watch

Is this article helpful for you?

Thank you for your feedback!

Topics covered