This is an editor window for the Unity game engine that allows for the retargeting of animations from different paths (aka game objects) and properties(aka keyframes on those objects). The main focus is to allow for the conversion of different items such as blend shapes between different common formats such as Apple's FaceCap and Mixamo's rigs. Allows for:
MyGameObject
to AnotherGameObject
).browInnerUp
to BrowsOuterLower_Left
This package should work on Unity 2018+
You can install this editor through Unity's package manager.
In Unity 2019 you can install the latest from this github by following these instructions. Alternatively you can add the following to your 'dependencies' in your Packages/manifest.json file:
"com.enemyhideout.retargeting": "https://github.com/robotron2084/animation-retargeting.git#0.0.2",
First open the utility via Window->Animation->Retargeting
Upon first open, you will probably need to select a retargeting preset or create a new one. A retargeting preset defines the actions you want to occur on your animations.
Next you must specify which Animation Clips you would like to modify. You can do this by dragging items into the Items
UI. You can drag the following items into the UI:
You must specify a number of 'attribute' or 'path' mapping actions. These are the properties and paths to game objects that you'd like to modify, and how you'd like to modify them.
An attribute is the name of a property that is being animated. There are three parameters to remapping an attribute:
From Path
- The path, or property that you'd like to modify. For example if you'd like to modify the Position
of a transform input Position
.To Path
- The new name of the property.Action
- This can be either Copy
, Replace
, or Delete
.
Copy
- Make a copy of this property with the To Path
name.Rename
- Rename the property to the To Path
's name.Delete
- Delete this property.Paths are the paths to a game object. These paths are relative to the location of the Animator
object in the hierarchy. You can view the path by clicking, then hovering your mouse, and Unity will reveal the whole path. Paths are formatted grandparent/parent/child
with forward slashes between them.
There are three parameters to remapping a path:
From Path
- The original path.To Path
- The new path.MatchType
- Whether you want this to be an exact match and replace.
Exact Match
- Replaces the From Path
with the To Path
grandparent/parent/child' To:
grandparent/childwill replace all instances of
grandparent/parent/child' found with grandparent/child
Contains
- Replaces instances of From Path
with instances of To Path
grandparent
To: parent
with the path grandparent/parent/child' will create the path
parent/parent/child`parent/
To: ''(blank) with the path grandparent/parent/child' will create the path
grandparent/child Once you have input your clips and mappings, then press the
Retarget` button, and the tool will iterate over your animation clips and update them. And that's it! A log of all modifications, and any issues, will be displayed in the Console.You can create as many retargeting presets as you need by duplicating an existing preset via Copy
or creating a new one by selecting New
. The location the preset is created is determined by the currently selected asset in the Project hierarchy.
Perhaps you will also find my Unity asset Project Search & Replace helpful.