Unity - Timeline 之 Using an Animation Override track and an Avatar Mask(使用动画覆盖轨道和角色骨骼动画遮罩)

目录:Unity - Timeline 知识汇总
原味:https://docs.unity3d.com/Packages/[email protected]/manual/wf_mask.html
翻译时Timeline版本:Timeline 1.2.11

Using an Animation Override track and an Avatar Mask

使用动画覆盖轨道和角色骨骼动画遮罩

在这次任务中,将演示如何使用Animation Override track(动画覆盖轨道的功能)与Avatar Mask(角色骨骼部件遮罩)来替换Animation轨道中的人物上半身动画。使用这种技术来对类人动画模型来处理,例如,跑步是搬着一个物体。如何创建Avatar Mask,查看 Avatar Mask window

假设你在Timeline实例(created a Timeline instance创建一个Timeline实例)已经给人物模型的动画轨道添加了一个简单的动画剪辑:
This example uses a humanoid bound to a simple run cycle animation (RunForward) that loops once

这个例子中使用了类人模型添加了一个可循环包补的动画(RunForward),并循环播放了一次。

鼠标右键Animation轨道并选择 Add Override Track。一个名为 'Override 0’的Animation Override track将于选择的Animation轨道链接对应着。注意Animation Override track并不是绑定到GameObject上的。因为Override track是链接在Animation track轨道上的,那么同样作用于Animation track中绑定的GameObject上的效果。
To add an Override track, right-click the Animation track and select Add Override Track from the context menu

添加Override track,通过选中Animation track轨道后,鼠标右键选择 ‘Add Override Track’ 来添加的。

在你的Project视图中,拖拽一个带有上半身动画的Animation剪辑到Override track轨道上。例如,拖拽一个同样是站立的动画,上半身是站立且会抖动他们的肩膀的。调整座标位置与剪辑大小到你想要覆盖的位置。
The Animation Override track contains an Animation clip of a humanoid standing still, waving their arms (WavingArms). This clip was resized to match the Animation clip (RunForward) of the parent Animation track.

Animation Override track轨道包含了一个模型站立着耸肩的动画剪辑(WavingArms)。该剪辑调整了位置与大小与父Animation track轨道的动画剪辑(RunForward)匹配上。

播放该Timeline实例。例子中。WavingArms剪辑完全覆盖了RunFOrward剪辑。为了让一个动画剪辑的下半身动画与另一个剪辑动画的下半身动画可以组合播放,需要制定Animation Override track的Avatar Mask属性。
To specify an Avatar Mask, select the Override track to view its properties in the Inspector window

给Override track轨道设置Avatar Mask设置,在Inspector窗口中的属性可以设置

在Project视图中,拖拽一个遮罩了下半身动画的Avatar Mask,到Inspector窗口中的Avatar Mask属性中。勾上 Apply Avatar Mask的复选框。这时会有一个Avatar Mask的图标显示在track轨道名称旁边。
An Avatar Mask, that masks the lower body animation, is specified for the Animation Overview clip in the Inspector window. This allows the upper body animation to pass through.

一个遮罩了下半身的动画的Avatar Mask,在Inspector窗口的Animation Override track的属性下制定。这将只允许Override track的上半身动画可以有效。
The Avatar Mask icon (red) indicates that the Animation Override track uses an Avatar Mask.

在Animation Override track轨道的Avatar Mask图标(红色圈的)代表着使用了Avatar Mask。

播放这个Timeline实例。这个例子中,DefaultMale模型使用了WavingArms剪辑的上半身动画,也使用了RunForward剪辑的下半身动画。点击Avatar Mask图标可禁用/启用Avatar Mask作用。
The Avatar Mask icon (red) is gray when disabled. The WavingArms clip completely overrides the RunForward clip.

Avatar Mask图标(红圈那)变灰了,就是禁用了。WavingArms剪辑将完全的覆盖RunForward剪辑。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章