Nodes/ComfyUI-HY-Motion1/HY-Motion Export GLB (Mixamo)
ComfyUI Node

HY-Motion Export GLB (Mixamo)

Retarget your motion onto a real character, minus the SDK nightmare

By jtydhr88·Created 8 months ago·Updated 5 days ago· 307
HY-Motion Export GLB (Mixamo)
  • motion_data
  • glb_paths
target_glb_path
output_dirhymotion_glb
filename_prefixmotion
yaw_offset0
scale0.00

The FBX exporter's little sibling, and for a lot of people the better one. HY-Motion Export GLB takes your generated motion and retargets it onto a Mixamo-rigged .glb character you supply, writing out a new .glb that keeps the character's mesh, skin, and materials but swaps in your animation. Where the FBX path drags in the official (and famously fragile) fbxsdkpy binding, this one does the same retargeting job with pygltflib - a plain pip package that actually installs. Same pack, no SDK fight.

The mechanism mirrors the FBX retarget: your SMPL-style motion is exported to a temp NPZ, the source skeleton is mapped onto the target's mixamorig: bones via the built-in Mixamo bone mapping, the animation is applied, and a new GLB is saved with the character intact. The README frames it as mesh, skin, and materials preserved - only the animation is replaced, which is exactly what you want when you've spent time on a character.

Inputs

  • motion_data - from Generate.
  • target_glb_path - the required path to your Mixamo-rigged character. Same resolution rules as the FBX node: 3d/char.glb defaults to ComfyUI/input/3d/char.glb, input/ and output/ prefixes work, absolute paths work. This one has no built-in default character - if it can't find the file, you get a clear "Target GLB path not found" string back rather than a fallback.
  • output_dir / filename_prefix - output subfolder (default hymotion_glb) and file prefix (default motion), relative to ComfyUI's output/.
  • yaw_offset / scale - same orientation and scaling controls as the FBX node: Y-rotation in degrees, and a force-scale where 0.0 means automatic height-based scaling. Keep scale at 0.0 unless you have a reason.

Output is glb_paths, the list of written files, with a .txt next to each recording the source prompt.

How it differs from the other GLB path

There are two GLB routes in this pack and people mix them up constantly. Preview Animation (3D) exports a GLB in your browser from the built-in wooden boy - zero Python deps, no retargeting, no custom character. This node runs in Python, requires your own Mixamo-rigged .glb, and actually retargets the motion onto it. Preview Animation is the zero-effort path; this is the one you use when the character matters. Note the README's framing that custom character support is "Mixamo supported, right now" - the mapping table is built around mixamorig: prefixed rigs, so a non-Mixamo rig is a gamble.

Practical notes

Grab a Mixamo character (auto-rigged via Mixamo's site, exported as .glb), drop it in ComfyUI/input/3d/, and pass 3d/char.glb - that's the whole setup. If the node returns "pygltflib not installed," that's a pack install issue (pip install pygltflib is in requirements.txt; re-run it). And because the retargeting math is shared with the FBX path, quality is consistent between them - if a motion lands badly on a rig here, it'll land badly there too, so don't blame the format. For game engines and web viewers, .glb is often the better deliverable anyway.

CategoryHY-Motion

Inputs (6)

NameTypeDefaultDescription
motion_dataHYMOTION_DATA
target_glb_pathSTRINGPath to a Mixamo-rigged .glb character. Supports 'input/3d/char.glb', 'output/3d/char.glb', '3d/char.glb' (defaults to input/), or absolute paths.
output_dirSTRINGhymotion_glb
filename_prefixSTRINGmotion
yaw_offsetoptFLOAT0-180–180Rotate the character around Y-axis in degrees.
scaleoptFLOAT0.000–10Force a specific scale multiplier. 0.0 = automatic height-based scaling.

Outputs (1)

NameTypeDescription
glb_pathsSTRING