
Godot4で3Dアニメーションを他のHumanoidから持ってくる
概要
Godot4で3Dアニメーションを他のHumanoidから持ってくる方法です。散々、Blenderでリターゲティングしようとと格闘した後、Godot4にAnimation Retargeting機能が有ることに気づきました。
このページ↓の動画部分の操作を参考にしています。
Animation Retargeting in Godot 4.0 (godotengine.org)
Retarget先は↓のアセットを使用しました。
【CC0】オリジナルアバター「シャペル」【VRChat想定】 - てくのろじあ - BOOTH
Retaget元は↓のアセットを使用しました。
Josie - Character Model by Jen Jell (itch.io)
アニメーションさせたいアバターの設定
アニメーションさせたい(Retargeting先)アバターのglbファイルをファイルシステムに入れます。

glbファイルをダブルクリックすると"高度なインポート設定"が開くので↓の"新規BoneMap"を選択します。

さらに、新規でできた"BoneMap"をクリックするとProfileが表示されるので"新規SkeltonProfileHumanoid"を選択します。(このインタフェースが理解できるまで難しい)

後は、"再インポート"を押して高度なインポート設定を閉じます。
アニメーションを取り出したいキャラクタ側の設定
アニメーションを取り出したい(Retargeting元)のglbファイルもファイルシステムに入れます。
そして、"インポート"で"Animation Library”を選択します。

glbファイルをダブルクリックなり"高度な設定"を押します。

そしてアニメーションさせたいアバターの時と同じように"新規BoneMap"、"新規SkeltonProfileHumanoid"、"再インポート"します。
アニメーションを利用する
"新しい継承シーン"でアニメーションさせたいアバターのglbファイルを選択して新しいシーンを作ります。

出来たシーンで子ノードにAnimationPlayerを追加します。

画面の下の方に"アニメーション"が有るので押して、"アニメーションの管理"を開きます。

"ライブラリのロード"でアニメーションを取り出したい(Retargeting元)のglbファイルファイルを選択します。

たったこれだけでアニメーションのRetargetingできました。

スクリプトでは、次のように再生しました。
@onready var animation = $player/AnimationPlayer
func _physics_process(delta):
animation.play("Josie/Run")