Retarget animations onto any humanoid character — CLI & Python SDK for game developers
Project description
ohao
Retarget animations onto any humanoid character
CLI & Python SDK for game developers
ohao retargets BVH / FBX animations onto your characters — Mixamo, UE5 Mannequin, or any humanoid rig.
Install
pip install ohao
Retargeting requires Blender (3.6+) installed locally.
Quick Start
Python
from ohao.mogen3d import retarget
retarget("dance.bvh", "MyCharacter.fbx")
CLI
ohao mogen3d retarget dance.bvh MyCharacter.fbx --preset mixamo
Retargeting
The SDK auto-detects your character's rig type and maps bones automatically.
| Rig Type | Detection | Characters |
|---|---|---|
| Mixamo | Hips bone (with optional prefix like mixamorig:) |
X Bot, Y Bot, any Mixamo character |
| UE5 Mannequin | pelvis bone |
Quinn, Manny, Quaternius models |
# Auto-detect (works for most characters)
retarget("dance.bvh", "XBot.fbx")
# Explicit preset
retarget("dance.bvh", "Quinn.gltf", preset="ue5")
# Custom Blender path
retarget("dance.bvh", "MyChar.fbx", blender_path="/path/to/blender")
# Open in Blender GUI to inspect
retarget("dance.bvh", "MyChar.fbx", background=False)
Supported Formats
| Input | Output |
|---|---|
Animation: .bvh, .fbx |
Retargeted .blend file |
Character: .fbx, .glb, .gltf |
API Reference
retarget()
retarget(
bvh_path, # Path to BVH file
character_path, # Path to character (.fbx / .glb / .gltf)
*,
output_path=None, # Output .blend path (default: auto-named)
preset=None, # "mixamo", "ue5", or path to JSON
blender_path=None, # Blender executable (default: auto-detect)
background=True, # Run headless (default: True)
)
Examples
See the examples/ directory for runnable scripts:
| Example | Description |
|---|---|
basic_retarget.py |
Minimal one-liner retarget |
batch_retarget.py |
Apply one BVH to a folder of characters |
retarget_with_preset.py |
Force a specific rig preset |
inspect_in_blender.py |
Open result in Blender GUI |
custom_blender_path.py |
Use a specific Blender install |
Adding a Custom Rig Preset
If your character uses a non-standard skeleton, create a JSON preset:
{
"name": "My Rig",
"bone_map": {
"Hips": "my_pelvis",
"Spine": "my_spine_01",
"Head": "my_head",
"LeftArm": "my_upper_arm_L",
"LeftForeArm": "my_lower_arm_L",
"RightArm": "my_upper_arm_R",
"RightForeArm": "my_lower_arm_R",
"LeftUpLeg": "my_thigh_L",
"LeftLeg": "my_shin_L",
"RightUpLeg": "my_thigh_R",
"RightLeg": "my_shin_R"
},
"root_bone": "Hips"
}
Keys on the left are the BVH bone names. Values on the right are your character's bone names. Then pass it:
retarget("dance.bvh", "MyRig.fbx", preset="my_rig.json")
ohao mogen3d retarget dance.bvh MyRig.fbx --preset my_rig.json
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ohao-0.1.0.tar.gz.
File metadata
- Download URL: ohao-0.1.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed11f22567a09312b4162d034ec723f4a1dd7be3e441b615d37fddd6a0688a6a
|
|
| MD5 |
daff08e8e11938d5c838a4225fa2f6f8
|
|
| BLAKE2b-256 |
ec10a30dde2628807f91dc7fb96e8fd7be5884a7c6bbd1a9fd038693f0c3821a
|
File details
Details for the file ohao-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ohao-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c88da0cfebb06d4168102d06bf71377794ff2b7b9292c57c0bde4f2bca800ab
|
|
| MD5 |
6bf192d974773862014a4edc5fb8221d
|
|
| BLAKE2b-256 |
7d27f43c203284a7c39e8ffa6c1b4b28c71ac315363bb72233dfa5309515f078
|