Using Retargeter
1. Installation
- Copy the tool to your preferred folder (e.g.
C:\Work\MayaPython). - Use the script below to launch the tool. Make sure the path matches where the tool is stored.
import sys
sys.path.append(r"C:\Work\MayaPython") # Adjust the path as needed
import retargeter.retargeter_gui as rgui
import imp
imp.reload(rgui)
rgui.show_gui()
sys.path.append(r"C:\Work\MayaPython") # Adjust the path as needed
import retargeter.retargeter_gui as rgui
import imp
imp.reload(rgui)
rgui.show_gui()
- Once it’s working, create a custom shelf button for quick access.
2. Binder File
- Contains the skeleton onto which the FBX animation will load (e.g. Epic skeleton, Mixamo, etc.).
- This skeleton should be placed inside a locator or group named
scale_locto allow scaling it to match the target rig. - The binder file must also include a control rig.
- Any rig will work as long as it can be aligned with the skeleton.
- The control rig should have a namespace like
Char:orCR:.
3. Aligning Skeleton and Control Rig
- The goal is to overlap the skeleton and control rig as closely as possible.
- Add locators with unique names to the skeleton hierarchy.
- Use them to adjust scale and rotation as needed.
- Start with zeroed values and fine-tune only if necessary.
4. JSON Mapping File (mapping_dict)
- Defines how each bone maps to a control.
- Tells the system which bones drive which controls during retargeting.
- Refer to the example JSON for guidance on setup.
Syntax Reference:
{}— replaced by "left" or "right" based on naming conventionp— parentConstraintr— orientConstraintt— translation onlyrx— rotateX constraintry— rotateY constraintrz— rotateZ constrainttx— translateX constraintty— translateY constrainttz— translateZ constraint
To change default naming conventions for control rig and skeleton, edit the config.py file.