unity3d手册 Avatar 身体遮罩 Avatar Body Mask

Specific body parts can be selectively enabled or disabled in an animation using a so-called Body Mask. Body masks are used in the Animation tab of the mesh import inspector and Animation Layers. Body masks enable you to tailor an animation to fit the specific requirements of your character more closely. For example, you may have a standard walking animation that includes both arm and leg motion, but if a character is carrying a large object with both hands then you wouldn't want his arms to swing by his sides as he walks. However, you could still use the standard walking animation by switching off the arm movements in the body mask.

通过身体遮罩可以对动画里面特定的身体部位进行激活或禁止。在网格导入观察器和动画层的动画标签里面可以设置身体遮罩。身体遮罩让您能根据角色需求精确的裁剪动画。例如,您有一个常见的行走动画,包括手臂和腿的动作,但是如果现在一个角色的双手举着巨大的物体,您当然不会希望她在行走的时候手臂来回摆动。 unity3d脚本 http://www.unitymanual.com当然,您可以通过身体遮罩的切换,继续使用常规的行走动画。

The body parts included are: Head, Left Arm, Right Arm, Left Hand, Right Hand, Left Leg, Right Leg and Root (which is denoted by the "shadow" under the feet). In the body mask, you can also toggle inverse kinematics (IK) for hands and feet, which will determine whether or not IK curves will be included in animation blending.

身体部位包括:头、左手臂、右手臂、左手、右手、左腿、右腿、Root (以脚的背面作为标志)。在身体遮罩界面,您可以给手或脚指定是否需要IK(反向运动学),由此可决定在动画混合里面是否包括IK曲线。

    Click the avatar section to toggle inclusion or exclusion (green/red)

    点击Avatar部位,以触发包括或不包括(绿色/红色)

    Double click in empty space surrounding the avatar to toggle all

    在avatar周围空白处双击可以翻转所有部位的状态



Body mask in the Body Mask inspector (arms excluded)

在身体遮罩观察器里面的身体遮罩(不包括手臂)

In the Animation tab of the mesh import inspector, you will see a list entitled Clips that contains all the object's animation clips. When you select an item from this list, options for the clip will be shown, including the body mask editor.

在网格导入观察器的动画标签里,您会看到一个叫做Clips的列表,里面有当前对象的所有动画剪辑。当您从列表中选择一个条目,会显示这个剪辑的选项,其中包括身体遮罩编辑器。

You can also create Body Mask Assets (Assets->Create->Avatar Body Mask), which show up as .mask files on disk.

您也可以通过Assets->Create->Avatar Body Mask菜单创建身体遮罩资源,在磁盘上的后缀名是.mask。

The BodyMask assets can be reused in Animator Controllers, when specifying Animation Layers

身体遮罩资源可以在动画控制器中重用,在指定动画层的时候。

A benefit of using body masks is that they tend to reduce memory overheads since body parts that are not active do not need their associated animation curves. Also, the unused curves need not be calculated during playback which will tend to reduce the CPU overhead of the animation.

使用动画遮罩的益处是可以减少内存消耗,因为不活跃的身体部位就不需要和它关联的动画曲线。同时,没使用的动画曲线也不会在播放动画的时候来计算,这样就减少了动画的CPU消耗。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值