Working with humanoid animations

来源:互联网 发布:java面试题spring 编辑:程序博客网 时间:2024/05/21 09:21
Working with humanoid animations 人形动画
The Mecanim Animation System is particularly well suited for working with animations for humanoid skeletons. Since humanoid skeletons are used extensively in games, Unity provides a specialized workflow, and an extended tool set for humanoid animations.
Mecanim动画系统特别适用于处理人形骨骼的动画。由于人形骨骼在游戏中广泛应用,unity为人形动画提供了一个特别的工作流程和一套外部的工具。
Because of the similarity in bone structure, it is possible to map animations from one humanoid skeleton to another, allowing retargeting and inverse kinematics. With rare exceptions, humanoid models can be expected to have the same basic structure, representing the major articulate parts of the body, head and limbs. The Mecanim system makes good use of this idea to simplify the rigging and control of animations. A fundamental step in creating a animation is to set up a mapping between the simplified humanoid bone structure understood by Mecanim and the actual bones present in the skeleton; in Mecanim terminology, this mapping is called an Avatar. The pages in this section explain how to create an Avatar for your model.

由于在骨骼结构的相似,就可能把一个人形骨架的动画映射到另外一个骨架上,并允许重定向和反向动力学。除极少数例外,人形模型都预计有相同的基本结构,表示身体主要的关节,头部和四肢。Mecanim系统很好的利用了这个概念去简化骨骼绑定和动画控制。创建一个动画最基础的步骤是建立一个简化的Mecanim系统识别的人形骨骼结构和骨架中存在的真实的骨骼的映射;在Mecanim技术中,这种映射叫做Avatar。本节中的 这几页解释如何为你的模型创建一个Avatar。

Creating the Avatar创建Avatar
After a model file (FBX, COLLADA, etc.) is imported, you can specify what kind of rig it is in the Rig tab of the Model Importer options.
一个模型文件(FBX,COLLADA等)导入之后,你可以在导入模型选项中的绑定骨骼的标签指定模型的骨骼的类型。
Humanoid animations
For a Humanoid rig, select Humanoid and click Apply. Mecanim will attempt to match up your existing bone structure to the Avatar bone structure. In many cases, it can do this automatically by analysing the connections between bones in the rig.
对于一个人形模型的骨骼绑定,选择人形然后点击应用。Mecanim将会尝试把你存在的骨骼结构和Avatar的骨骼结构相匹配。在很多情况下,它会通过分析骨骼之间连接自动完成上面的匹配。
If the match has succeeded, you will see a check mark next to the Configure menu
如果匹配成功,你将会在Configure菜单旁边看到一个确认标志。
Also, in the case of a successful match, an Avatar sub-asset is added to the model asset, which you will be able to see in the project view hierarchy.
并且,在成功的情况下,Avartar子资源会被加载模型资源下,你可以在工程视角层级下看到。
Avatar added as a sub-asset
Selecting the avatar sub-asset will bring up the inspector. You can then configure the avatar.
选中avatar子资源将会出现下面的视图。然后你就可以配置avatar。
The inspector for an Avatar asset
If Mecanim was unable to create the Avatar, you will see a cross next to the Configure button, and no Avatar sub-asset will be added. When this happens, you need to configure the avatar manually.
如果Mecanim无法创建Avatar,你将会看到Configure按钮旁边有一个叉,并且没有avatar资产被添加。当这种情况发生时,你需要手动配置avatar
Non-humanoid animations 非人形动画
Two options for non-humanoid animation are provided: Generic and Legacy. Generic animations are imported using the Mecanim system but don’t take advantage of the extra features available for humanoid animations. Legacy animations use the animation system that was provided by Unity before Mecanim. There are some cases where it is still useful to work with legacy animations (most notably with legacy projects that you don’t want to update fully) but they are seldom needed for new projects. See this section of the manual for further details on legacy animations
对于非人形动画有两种选择:通用和传统。通用动画导入后使用了Mecanim系统但是没有利用人形动画的有的额外的特性。传统的动画使用的是unity提供的在Mecanim之前的动画系统。在某些情况下使用传统动画仍旧是有用的(大多数是你不想升级的老的工程)但是对于新工程很少需要老动画系统。

0 0
原创粉丝点击