Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

動畫

支援的動畫:
  • 所有型別物件的變換動畫

  • 姿勢骨骼的變換動畫

  • 形狀鍵動畫

  • 光照動畫

  • 攝影機動畫

對單一物件的多個動作

大多數遊戲中,同一個物件會需要有數種動畫可以切換。這個擴充外掛支援一次將多個動作匯出至單一 AnimationPlayer,以更容易切換動作。

本工作流程使用 Blender 的 nla_tracks。下列介紹了如何使用本功能:

1. 暫存作用中動作

新建立的動作會設為物件的作用中動作。有各種方法可以將作用中動作放至 NLA 軌中,其中一種方法當然是在 NLA 編輯器 中進行

../../../_images/nla_editor.jpg ../../../_images/nla_pushdown.jpg

或者也可以將動作暫存至 律表 中來完成

../../../_images/dope_sheet.jpg ../../../_images/stash_action.jpg

2. 檢查 NLA 軌道的閉鎖狀態

NLA 軌道可以為 閉鎖非閉鎖 ,匯出工具會將所有 閉鎖 NLA 軌道匯出至單獨的動作,但會混合所有 非閉鎖 NLA 軌道至匯出的每一個動作中 (包含活動動作)。

../../../_images/nla_strip.jpg

3. 匯出場景

先確定有開啟 Export Stashed Action 選項。

../../../_images/stash_action_option.jpg

接著所有暫存動作與活動動作都會匯出至 AnimationPlayer。

../../../_images/in_godot.jpg

制約

有時複雜的動畫會以物件制約來製作,常見的例子即為反轉運動學。本擴充外掛會自動檢查物件是否有約束,若有約束則會將所有約束都烘焙至動作中,並與物件一起匯出。

動畫模式

Godot and Blender have different structure to store animation data. In Godot animation data is stored in an AnimationPlayer node, instead of in each animated node. In order to fix this inconsistency and still make the animation play versatile, this add-on has three animation exporting modes.

「Animation as Actions」模式

將所有動畫都當作物件動作,因此在匯出場景中,所有物件都會將動作保存於各自的 AnimationPlayer 中。

「Scene Animation」模式

若要讓動畫產生與在 Blender 時間軸上播放時相同的結果,則應選擇本模式。本模式會將場景中所有動畫放置於場景根節點的單一 AnimationPlayer 中。

「Animation as Action with Squash」模式

本模式的行為與「Animation as Action」很像,但產生的 AnimationPlayer 比較少。在父級-子級關係中的物件會共用 AnimationPlayer。適合用於有多個綁定關係、骨骼與網格都有各自的動作時,一個綁定就只會有一個 AnimationPlayer。