美文网首页UE
UE中动画的Retarget基本操作

UE中动画的Retarget基本操作

作者: GS_88 | 来源:发表于2022-11-03 12:21 被阅读0次

友情链接:
blog: https://www.cgsgood.tech/ue_retarget
语雀: https://www.yuque.com/cgsgood/dshx0b/hgzp2d
简书: https://www.jianshu.com/p/9e146d482638

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

[图片上传失败...(image-feaada-1667535641957)]

<span id="title_2">2. 创建和配置IK Rig骨骼映射文件</span>

2.1 建立IK Rig文件

Content Broswer空白处右键建立IK Rig。

建立2个,一个Source Skeleton,一个Target Skeleton

[图片上传失败...(image-987b93-1667535641957)]

选择IK Rig对应的Skeleton
[图片上传失败...(image-8b05bb-1667535641957)]

配置映射的关系:映射名 开始骨骼 结束骨骼
[图片上传失败...(image-ca03ad-1667535641957)]

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开始重定向的话,可能会产生高度不一样的问题)
[图片上传失败...(image-13adb8-1667535641957)]

2.2 建立IK Retargeter文件

  • Step 2.2.1 在Content Broswer空白处右键建立IK Retargeter(选择Source Skeleton)
    [图片上传失败...(image-17303d-1667535641957)]

  • Step 2.2.2 选一下Target IKRig Asset(刚刚配置的IK Rig)
    [图片上传失败...(image-1a1496-1667535641957)]

  • Step 2.2.3 打开刚刚创建的IK ReTargeter

    • 在【Chain Mapping】点一下Auto-Map Chains,绑定映射对应关系
    • 在【Asset Browser】中,选择动画,点Export Selected Animations即可
      [图片上传失败...(image-e0b127-1667535641957)]
  • 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开始

[图片上传失败...(image-8fd9d0-1667535641957)]

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"

[图片上传失败...(image-beaa05-1667535641957)]

3.5 重新导出一遍,就可以看到动画带有Root Motion了

[图片上传失败...(image-d30d23-1667535641957)]

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

相关文章

网友评论

    本文标题:UE中动画的Retarget基本操作

    本文链接:https://www.haomeiwen.com/subject/runytdtx.html