友情鏈接:
blog: https://www.cgsgood.tech/ue_retarget
語雀: https://www.yuque.com/cgsgood/dshx0b/hgzp2d
博客園: https://www.cnblogs.com/cgsgood/articles/16857410.html
UE4中有一個Retarget Manager,在UE5中不存在了,操作方式有些改變
此處記錄一下UE5 Retarget的操作步驟
1. Animation Retarget目的
復用不同骨架上的影片檔案
基本思路:
- 把Source Skeleton的影片檔案,利用關鍵骨骼bone的映射,映射到Target Skeleton上,
- 映射完后,Target Skeleton就可以播放Source Skeleton上的影片檔案(如Animation Sequence、Montage)
主要流程如下:
A=>start: 準備好2套骨骼
op_a=>operation: 新增2套IK Rig(對應2套骨骼)
op_b=>operation: 配置IK Rig映射的骨骼
op_c=>operation: 選擇要匯出的source影片
op_d=>operation: 在target skeleton中播放影片
e=>end: 完結
A->op_a->op_b->op_c->op_d->e

2. 創建和配置IK Rig骨骼映射檔案
2.1 建立IK Rig檔案
在Content Broswer空白處右鍵建立IK Rig,
建立2個,一個Source Skeleton,一個Target Skeleton

選擇IK Rig對應的Skeleton

配置映射的關系:映射名 開始骨骼 結束骨骼

| Chain Name | Start Bone | End Bone |
|---|---|---|
| head | neck_01 | head |
| arm_l | clavicle_l | hand_l |
| arm_r | clavicle_r | hand_r |
| leg_l | thigh_l | foot_l |
| leg_r | thigh_r | foot_r |
| spine | spine_01 | spine_03 |
在IK Rig中,設定從pelvis開始重定向(從root開始重定向的話,可能會產生高度不一樣的問題)

2.2 建立IK Retargeter檔案
-
Step 2.2.1 在Content Broswer空白處右鍵建立IK Retargeter(選擇Source Skeleton)

-
Step 2.2.2 選一下Target IKRig Asset(剛剛配置的IK Rig)

-
Step 2.2.3 打開剛剛創建的IK ReTargeter
-
- 在【Chain Mapping】點一下Auto-Map Chains,系結映射對應關系
-
- 在【Asset Browser】中,選擇影片,點Export Selected Animations即可

- 在【Asset Browser】中,選擇影片,點Export Selected Animations即可
-
Step 2.2.4 打開在Target Skeleton,可以在里面播放剛剛Export的影片了,
上述步驟,針對沒有Root Motion的影片,可以完美匹配,
如果涉及Root Motion,需要額外再設定一下,
3. Retarget Root Motion
3.1 首先,確保完成了2. 創建和配置IK Rig骨骼映射檔案
3.2 source IK Rig和target IK Rig的重定向的骨骼,從root開始

3.3 source IK Rig和target IK Rig的再添加2組chain:root和pelvis
| Chain Name | Start Bone | End Bone |
|---|---|---|
| root | root | root |
| root | root | root |
3.4 IK_Retargeter檔案中,把選中root和pelvis chain中的 [FK Adjustments | Translation Mode]改成"Globally Scaled"

3.5 重新匯出一遍,就可以看到影片帶有Root Motion了

4. 參考資料
https://www.youtube.com/watch?v=5Or8yQ_QecQ
https://dev.epicgames.com/community/learning/tutorials/l0mK/unreal-engine-root-motion-animation-retargeting-manny-to-metahuman
https://www.youtube.com/watch?v=f_qhtpIsapo
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/528780.html
標籤:其他
上一篇:「組合數學」隔離區
