查看: 877|回复: 10

[引擎各个功能] 【Animation Retargeting (Different Skeletons) | Unreal Engine】

[复制链接]

1

主题

342

帖子

7万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
75866
发表于 2016-6-25 13:38:46 | 显示全部楼层 |阅读模式



【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



本页面的内容:

      
Overview

Getting Started

Retargeting Adjustments

Retargeting an Animation Blueprint

Retargeting a Base Pose
     
Note: This feature is not available before Engine Version 4.5
Overview
Animation Retargeting (Different Skeletons) is a feature that allows animations to be reused between characters that do not share the same Skeleton asset, unlike 动画重定向 which involves retargeting animations between characters that share the same Skeleton asset.

The process of retargeting animations between characters that have different Skeletons uses an asset called a Rig to pass Bone information from one Skeleton to another. After selecting your Rig, you will share it between your Source Skeleton and a Target Skeleton (the Skeleton you wish to retarget animations to). Once you have done so, you will then match up the Target Skeleton's Bones to the Nodes stored in the Rig.

Once all the Bones in the Target Skeleton have been setup in the Rig, you can then retarget animations that are used by your Source Skeleton to your Target Skeleton. You can even retarget entire Animation Blueprints along with all its associated data, which saves time if you want to quickly move all animation assets from one Skeleton to another.
Getting Started
In order to get started with animation retargeting between different skeletons, you will need to select a Rig asset for both Skeletons to share. This section will show you how to access the Humanoid Rig that comes as part of the Engine Content and assign it for use.

We are also going to use two asset packs that are available for free via the Marketplace that have multiple skeletons and animations in it that we can use to retarget. If you have two Skeleton Assets ready to use, you can skip the note below and use your assets. If you do not, you can follow along with the steps by adding the two packs outlined in the note below.

In this example, we are using the following assets which are available for download via the Marketplace.

The Source Skeleton we are using is the HeroTPP_Skeleton that is included in the Animation Starter Pack.

The Target Skeleton we are using is the SWAT_Skeleton that is included in the Mixamo Character Pack.

Once you have installed the packs above, you can add them to a project via the Add to project button in the Unreal Launcher.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



The Animation Starter Pack includes several animations that we will retarget for a character from the Mixamo Character Pack.

Also, your version of Unreal Engine 4 may vary from the one depicted above.

The steps below will show you how to access the default Rig and retarget animations:

Inside the Content Browser under the Game/AnimStarterPack/Character folder, open the HeroTPP_Skeleton asset.

Click the Retarget Manager button, then under Set up Rig, click the Pick Asset icon and select the Humanoid Rig.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]

Duplicate Anim Assets and Retarget.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



In the Select Skeleton window, you should see your Skeleton in the upper portion of the window, select it and click Select.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



A copy of the animation you selected to retarget will be created in the same folder of your Target Skeleton.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



This new animation can now be used with your character.
Retargeting Adjustments
When setting up a Rig to share between Skeletons, you may encounter situations when one Skeleton has additional Bones that the other does not have (in the Getting Started section, if you used Skeletons specified in the example, you may have noticed extra Bones in the Mixamo Skeleton's hands for example). This can sometimes cause issues but can be fixed by recursively setting translation retargeting to the Skeleton.

For example, here is a shot before adjustments:

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



Notice how the fingers appear contorted due to the extra Bone not specified during the Rig set up.

Here is an example after adjustments were made:

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



You can specify Bone Translation Retargeting through the Skeleton Tree view. Here we are Right-clicking on the last digit in each finger and setting Bone Translation to Recursively Set Translation Retargeting Skeleton.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]


Retargeting an Animation Blueprint
Once you have gone through the process of setting up a Rig for two Skeleton assets to share, if there is an Animation Blueprint associated with the Source Skeleton, you can select to retarget it for use with your Target Skeleton.

Right-click on an Animation Blueprint and select the Retarget Anim Blueprints -> Duplicate Anim Blueprints and Retarget option.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



The Select Skeleton window will appear. Select your Target Skeleton and press Select.




All the assets associated with the Animation Blueprint (Animation assets, Blend Spaces, etc.), along with any logic defined in the Animation Blueprint itself will be copied and placed in the same location as your Target Skeleton.



Retargeting a Base Pose
There may be instances where you want to retarget animations to a Skeleton that is not quite using the same base pose as your Source Skeleton.

Take for example the Skeleton in the image below on the right.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



Our Source Skeleton on the left is in a T-Pose while our Target Skeleton is using an A-Pose. Even though a Rig has been set up for them to share, if we were to retarget animations as is now, we may encounter issues as seen below.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



In the image above, an animation has been retargeted for our Target Skeleton; however his arms clip into his side because the base poses were not the same. Thankfully, you can also retarget the Base Pose of your Target Skeleton prior to retargeting animations to reduce or eliminate issues like this from occurring.

In your Target Skeleton, under Retarget Manager, there is an option called Manage Retarget Base Pose.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]



If you click the View Pose button, you will see the current Base Pose. You can adjust it by clicking on a Bone and using the Rotation (E) widget.




In the image above, the right arm has been adjusted while the left arm is using the default base pose (which we can adjust by using the rotation widget). Once you have adjusted the pose, you can click the Save Pose option to save the retargeted Base Pose. With similar Base Poses between Skeletons, you can now retarget an animation and when the Skeleton Select window appears, you will notice that your Target Skeleton is now using a retargeted Base Pose.




Retargeting the animation with the retargeted Base Pose, results in a better looking animation.

【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]


【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]
【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]
【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]
【虚幻4翻译文档-Animation Retargeting (Different Skeletons) | Unreal Engine】[虚幻4中文文档]
回复

使用道具 举报

0

主题

809

帖子

2661

积分

vip会员

Rank: 1

积分
2661
发表于 2016-7-2 18:48:38 来自手机 | 显示全部楼层
好资源,谢谢
回复 支持 反对

使用道具 举报

0

主题

888

帖子

2948

积分

vip会员

Rank: 1

积分
2948
发表于 2016-7-3 20:53:05 来自手机 | 显示全部楼层
来看看......
回复 支持 反对

使用道具 举报

0

主题

865

帖子

2854

积分

vip会员

Rank: 1

积分
2854
发表于 2016-7-4 10:48:20 | 显示全部楼层
好棒好棒好棒,谢谢楼主分享
回复 支持 反对

使用道具 举报

0

主题

855

帖子

2831

积分

vip会员

Rank: 1

积分
2831
发表于 2016-7-8 16:45:05 来自手机 | 显示全部楼层
谢谢 分享 这个我还记得 不错
回复 支持 反对

使用道具 举报

0

主题

855

帖子

2823

积分

vip会员

Rank: 1

积分
2823
发表于 2016-7-13 09:56:42 来自手机 | 显示全部楼层
谢谢分享,顶一个
回复 支持 反对

使用道具 举报

0

主题

934

帖子

3017

积分

vip会员

Rank: 1

积分
3017
发表于 2016-7-13 18:01:47 来自手机 | 显示全部楼层
不错哦  下载看一下啊
回复 支持 反对

使用道具 举报

0

主题

931

帖子

3101

积分

vip会员

Rank: 1

积分
3101
发表于 2016-7-14 10:12:31 | 显示全部楼层
好棒好棒好棒,谢谢楼主分享
回复 支持 反对

使用道具 举报

0

主题

843

帖子

2793

积分

vip会员

Rank: 1

积分
2793
发表于 2016-7-15 18:21:01 来自手机 | 显示全部楼层
快没金币了,看看需要多少?
回复 支持 反对

使用道具 举报

0

主题

937

帖子

3062

积分

vip会员

Rank: 1

积分
3062
发表于 2016-7-20 10:13:41 | 显示全部楼层
等会儿下载看看
回复 支持 反对

使用道具 举报

*滑块验证:
您需要登录后才可以回帖 登录 | enginedx注册

本版积分规则

 
 



邮件留言:


 
返回顶部