|
动画重定向 是重新利用现有动画以供多个 Character 使用的过程,从而使您无需创建全新动画,因为您可以改为在不同 Character 之间共享动画资源。
动画重定向有两种形式,一种是要与其共享动画的 Character 将和最初创建该动画的 Character 使用 相同骨架。另一种形式包含称为 Rig 的中介对象,该对象可让您从一个 Character 的骨架重定向动画,然后将该骨架的骨骼信息传递给使用两个骨架共用的 Rig 的 不同骨架。
有关您要实现的动画重定向的类型,请参阅以下两个链接:
本页面的内容:
使用相同骨架重定向
使用不同骨架重定向
使用相同骨架重定向
本部分将介绍如何设置 骨架,以将重定向动画用于所有使用该骨架的两足 Character。
1.在 内容浏览器 内,打开用于每个 Character 的 骨架 资源。
在 Persona 的 骨架树 中,选中 Show Retargeting Options 复选框。
在 骨架树 中 右键单击 您的 根 骨骼,然后选择 Recursively Set Translation Retargeting Skeleton。
此操作将确保所有骨骼均使用骨架的静态转换(我们将修改某些骨骼,以便立即重定向)。
找到 Pelvis 骨骼(或其对应的骨骼),然后单击下拉框并选择 AnimationScaled。
此操作将确保 Pelvis 骨骼位于合适的高度,并仍处于动画状态。要转换成动画和重定向的任何其他骨骼也应使用此设置。
找到您正在使用的 根 骨骼、任何 IK 骨骼、任何 武器 骨骼或其他标记型骨骼,然后将其设置为 动画。
通过将 动画 用作“骨骼转换重定向模式”,骨骼的转换将源于动画数据本身,并且没有任何更改。
上图是设置为使用不同 转换重定向 方法的 骨架树 的示例。使用的方法各有不同,您可能必须针对不同骨骼试验不同方法,以产生所需的结果。
单击当前网格体旁的 网格 按钮,以调出网格体选择框,然后选择一个不同的网格体(不同的 Character)。
在不同的 骨骼网格体 上试验不同的动画,以确保您的骨架已针对各个动画设置正确。
在视窗内单击 Show,然后选中 NonRetarget Animation 和 Bones,以显示普通骨架和重定向骨架。
现在,您应可以在骨架上看到如下所示的画面。
基本角色矮粗版本的角色高瘦版本的角色
上图中显示为米黄色的部分是原始骨架,同时当前重定向的骨架显示为白色。当重定向应用于 Character 后,将在对等处理过程中剔除不同 Character 的比例差异,所应用的动画即可在各个 Character 上正常播放,并会在矮胖和高瘦的 Character 的相同位置描画出原始骨骼(米黄色骨骼)。
上述步骤旨在让您快速入门,学习如何为共享相同骨架资源的 Character 重定向动画。有关其他更详细的信息,请参阅动画重定向文档。
使用不同骨架重定向
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.
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.
Click image for full view.
Click Save then close the window.
In the Content Browser under the Game/MixamoAnimPack/Mixamo_SWAT/Anims folder, open the SWAT_Skeleton asset.
Click the Retarget Manager button, then under Set up Rig, click the Pick Asset icon and select the Humanoid Rig.
Click image for full view.
With the Rig assigned, next you will need to match up the Bones from the Target to the Nodes on the Rig.
Use the drop-down menus to select the Bones on the Skeleton that are similar in location to the Bones (Nodes) on the Rig.
Click image for full view.
In the image above, on the left is our Source Skeleton (with Show Bone Names enabled) and on the right is the Target Skeleton (also with Show Bone Names enabled). In the center is the Set up Rig window and we are specifying which Bones from our Target Skeleton are the same (or similar to in location) as the Bones on our Source Skeleton.
While the naming conventions for each Skeleton may differ, you can see where each bone is on each Skeleton and match them up accordingly. You do not need to specify all Bones and some tweaking may be needed based on your needs.
Continue to specify each Bone from the Target Skeleton to a corresponding Node on the Rig.
The table below demonstrates the setup for the HeroTPP_Skeleton and SWAT_Skeleton
Node (Rig)
Bone (Skeleton)
RootNonePelvisHipsspine_01Spinespine_02Spine1spine_03Spine2clavicle_lLeftShoulderupperarm_lLeftArmlowerarm_lLeftForeArmhand_lLeftHandclavicle_rRightShoulderupperarm_rRightArmlowerarm_rRightForeArmhand_rRightHandneck_01Neck1headheadthigh_lLeftUpLegcalf_lLeftLegfoot_lLeftFootthigh_rRightUpLegcalf_rRightLegfoot_rRightFoot
There are two configurations that can be used when setting up the Rig, Base or Advanced. The Base Configuration (denoted in the chart above) uses the key elements that are needed to ensure the animation is successfully retargeted. The Advanced Configuration allows you to include and specify additional Bones that should be included as part of the retargeting process.
In the example above, the left and right hands were included as part of the retargeting process however individual fingers were not. Retargeting an animation with the Base Configuration will ensure that the base motion is copied to the new Skeleton, however if the Source Skeleton had animated fingers and the Target did not, the retargeted animation would not animate the fingers and you would have stiff looking hands.
Click the Show Advanced button to toggle Advanced configuration.
Specify Bones from the Target Skeleton to a Node on the Rig for the Advanced Configuration.
Node (Rig)
Bone (Skeleton)
index_01_lLeftHandIndex1index_02_lLeftHandIndex2index_03_lLeftHandIndex3middle_01_lLeftHandMiddle1middle_02_lLeftHandMiddle2middle_03_lLeftHandMiddle3pinky_01_lLeftHandPinky1pinky_02_lLeftHandPinky2pinky_03_lLeftHandPinky3ring_01_lLeftHandRing1ring_02_lLeftHandRing2ring_03_lLeftHandRing3thumb_01_lLeftHandThumb1thumb_02_lLeftHandThumb2thumb_03_lLeftHandThumb3lowerarm_twist_01_lLeftHandupperarm_twist_01_lLeftArmindex_01_rRightHandIndex1index_02_rRightHandIndex2index_03_rRightHandIndex3middle_01_rRightHandMiddle1middle_02_rRightHandMiddle2middle_03_rRightHandMiddle3pinky_01_rRightHandPinky1pinky_02_rRightHandPinky2pinky_03_rRightHandPinky3ring_01_rRightHandRing1ring_02_rRightHandRing2ring_03_rRightHandRing3thumb_01_rRightHandThumb1thumb_02_rRightHandThumb2thumb_03_rRightHandThumb3lowerarm_twist_01_rRightHandupperarm_twist_01_rRightArmcalf_twist_01_lNoneball_lLeftToeBasethigh_twist_01_lLeftUpLegcalf_twist_01_rNoneball_rRightToeBasethigh_twist_01_rRightUpLeg
You may encounter situations where there may be additional Bones in one Skeleton that are not included in the other; you can omit these as adjustments can be made to the Target Skeleton to account for this.
For this example, you can also leave the IK bones to None on the Mixamo character as IK retargeting is still in development.
In the Content Browser, under Game/AnimStarterPack, select an animation that you want to retarget to the new Skeleton.
Right-click on the animation and choose Retarget Animation Assets -> Duplicate Anim Assets and Retarget.
In the Select Skeleton window, you should see your Skeleton in the upper portion of the window, select it and click Select.
A copy of the animation you selected to retarget will be created in the same folder of your Target Skeleton.
This new animation can now be used with your character.
上述步骤说明了如何在两个不同骨架之间重定向动画,但是,您还可采取其他措施来改善重定向动画的质量。有关详细信息,请参阅 Animation Retargeting (Different Skeletons) 文档。
相关页面
动画重定向
Animation Retargeting (Different Skeletons)
骨架资源
动画系统概述
|
|