Unity3D之Mecanim动画系统

Posted LazyChun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unity3D之Mecanim动画系统相关的知识,希望对你有一定的参考价值。

Mecanim动画系统 Mecanim Animation System

Date:2013-05-16 07:48

Unity has a rich and sophisticated animation system called Mecanim. Mecanim provides:

Unity有一个丰富并且精密的动画系统叫做Mecanim。Mecanim提供了:

  • Easy workflow and setup of animations on humanoid characters. 
    为类人角色设计的简单的工作流
  • Animation retargeting - the ability to apply animations from one character model onto another. 
    动画重定向-能够把一个动画应用到多个不同模型的能力
  • Simplified workflow for aligning animation clips. 
    用于对齐影片剪辑的简化的工作流
  • Convenient preview of animation clips, transitions and interactions between them. This allows animators to work more independently of programmers, prototype and preview their animations before gameplay code is hooked in. 
    方便的影片剪辑预览,变换和交互。这使得动画师的工作可以更多地独立于程序员的,方便在游戏逻辑代码挂接之前建立原型和预览。
  • Management of complex interactions between animations with a visual programming tool. 
    使用一个可视化编程工具来管理动画之间复杂的交互。
  • Animating different body parts with different logic. 
    对身体不同的地方使用不同的逻辑进行动画控制。

技术分享

Typical setup in the Visual Programming Tool and the Animation Preview window
可视化编程工具和动画窗口典型的设置。

Mecanim workflow (Mecanim工作流程)

Workflow in Mecanim can be split into three major stages.

Mecanim的工作流可以被分割为如下3个主要的阶段:

  1. Asset preparation and import. This is done by artists or animators, with 3rd party tools, such as Max or Maya. This step is independent of Mecanim features. 
    资源预备和导入。这是由美工或者动画师完成的工作,使用第三方的工具,比如Max或者Maya。这一步是独立于Mecanim的特性的。
  2. Character setup for Mecanim, which can be done in 2 ways:
    为Mecanim设定角色,有以下2种途径:
    • Humanoid character setup. Mecanim has a special workflow for humanoid models, with extended GUI support and retargeting. The setup involves creating and setting up an Avatar and tweaking Muscle definitions
      类人角色配置。Mecanim对于类人角色有一个特别的工作流,使用扩展后的GUI和重定向。配置包含创建和设定一个Avatar并且调整肌肉定义。
    • Generic character setup. This is for anything like creatures, animated props, four-legged animals, etc. Retargeting is not possible here, but you can still take advantage of the rich feature set of Mecanim, including everything described below. 
        通用角色配置。这是为任何东西像是人,有动画的柱子,四足动物之类设计的。重定向在这里是不支持的,但是你仍然可以得到后文中描述的Mecanim的好处。
  3. Bringing characters to life. This involves setting up animation clips, as well as interactions between them, and involves setup of State Machines and Blend Trees, exposing Animation Parameters, and controlling animations from code. 
    让角色动起来。这包括设定动画剪辑和它们之间的交互,还包括状态机和混合树,列出动画参数,还有从代码中控制动画。

Mecanim comes with a lot of new concepts and terminology. If at any point, you need to find out what something means, go to our Animation Glossary.

Mecanim带来很多概念和术语。如果在某些时候你需要查找它们的意思,来我们的动画术语页面。

Legacy animation system 旧版动画系统

While Mecanim is recommended for use in most situations, especially for working humanoid animations, the Legacy animation system is still used in a variety of contexts. One of them is working legacy animations and code (content created before Unity 4.0). Another is controlling animation clips with parameters other than time (for example for controlling the aiming angle). For information on the Legacy animation system, see this section

虽然在大多情况Mecanim是推荐使用的,特别是针对类人动画进行工作的时候,但是旧版的动画系统仍然会在很多的情况下被使用。其中之一是在之前的代码和动画中使用(在Unity4.0之前创建的内容)。另外一个例子是使用参数而不是时间控制的动画(比如控制瞄准角)。更多有关旧版动画系统的内容,参看这里

Unity intends to phase out the Legacy animation system over time for all cases by merging the workflows into Mecanim.

Unity计划逐步淘汰旧版动画系统把工作流都并入Mecanim。

页面最后更新:2013-02-14

分类:Manual翻译: FancyBit












以上是关于Unity3D之Mecanim动画系统的主要内容,如果未能解决你的问题,请参考以下文章

Unity3D之Mecanim动画系统学习笔记:Mecanim动画的资源加载相关

Unity3D之Mecanim动画系统学习笔记:Animation State

[Unity3D]Unity3D游戏开发之自己主动寻路与Mecanim动画系统的结合

Unity3D之Mecanim动画系统学习笔记:使用脚本控制动画

Unity3D之Mecanim动画系统学习笔记:模型导入

Unity3D之Mecanim动画系统学习笔记:Animator Controller