Retargeting Animations
In this tutorial we will explain how to retarget FPS animations.
Last updated
In this tutorial we will explain how to retarget FPS animations.
Last updated
Note: this tutorial requires Retarget Pro. It is already included in the Ultimate version of the package.
It is highly recommended to check out the Retarget Pro Official Documentation.
Once Retarget Pro is imported into your project, place the SK_Arms_Mono and your character models into the scene. In this example, we will be using the Unity Robot model:
Now, we need to create Rig Assets for each skeleton. To do that, expand the character hierarchy, find the root bone, and right-click → Auto Rig Mapping:
Now you should see an Auto Rig Mapping window. You can specify what bones to avoid when creating bone chains (e.g., twist or root bones can be ignored in this case):
Once you press the "Create Rig Mapping" button, a new rig asset will be generated in the current directory:
Rig Assets contain information about the character skeleton, specifically the bone chains (e.g., arms, fingers, spine, etc.). The retargeting solver will use these bone chains to transfer animations from one skeleton to another:
Let's add a new bone chain that will contain the ik_hand_gun (weapon bone). To do this, right-click on the "+" icon and edit the chain to include the gun bone:
Note: the ik_hand_gun bone contains weapon movement, so it is essential for FPS retargeting.
Our source model is ready; let's set up the second skeleton.
The process is the same for the second model. However, it is very common for full-body skeletons to exclude the weapon bone. As a workaround, you can create an empty Game Object, name it ik_hand_gun, and parent it to the character root:
Once the bone is added, you can create a new Rig Asset via the Auto Rig Mapping tool.
It's time to create a Retarget Profile, which will tell the system how to transfer first-person animations. To do that, select the source, then the target rig, and right-click → Create Retarget Profile:
Once you create a new profile, you will see its data asset in the current directory:
Tip: Retarget Profile contains settings for each bone chain, which will tell the system how to transfer animations from one skeleton to another.
Let's select our profile and see what it has:
Our profile contains many "None" chains. This means the system did not find similar bone chains in the target skeleton. To fix this, we can manually click on the "Edit Layer" and assign the missing chain:
The profile might also generate the chains we don't need, like:
root
arms
ik_hand_gun (weapon bone)
Make sure to remove these chains and add the FPS Retargeting feature:
Once the feature is added to the list, place it on top of everything else:
Finally, we need to assign the bone chains in the FPS Retarget Feature. Right-click on the "Edit Layer" button and select the source and target chains:
At this point, we are ready for a retargeting test!
Before we proceed to retargeting, ensure that both characters have similar initial poses. If characters look different by default, you can assign pose clips in the Retarget Profile:
Tip: base poses directly contribute to the retargeting quality, so characters should look as similar as possible.
Next, we must ensure the weapon bones have the same orientation:
Next, open up the Retarget Pro Window using the toolbar:
Once the window is opened, make sure to assign all properties:
You can find out more about all properties here. To start the retargeting, click the "Play" button
Our animation preview looks great; let's add a weapon now:
Once the weapon is added to the gun bone, drag its model into the Item slot in the Retarget Pro Window:
Next, we need to assign the weapon animation. All animations in the pack follow the same naming convention, and weapons include a "W" tag in their names:
Now, we can preview both character and weapon animations. Make sure to adjust the pose to your liking, preview the animatio,n and bake it.