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剪輯。

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