ComfyUI Node

Hy3DExportMesh

The last node in every workflow — get your mesh out of ComfyUI

By kijai·Created 2 years ago·Updated 5 months ago· 1,033
Hy3DExportMesh
  • trimesh
  • glb_path
filename_prefix3D/Hy3D
file_format
save_filetrue

Every Hunyuan3D workflow ends the same way: Hy3DExportMesh. It's the save button for the whole operation - it takes your finished trimesh and writes it to disk in the format you actually need, from .glb for engines to .stl for printing. It's an output node (the little "Output" tag on the corner), which just means it's meant to be the end of the line.

Inputs

  • trimesh - the mesh to save. Comes from Hy3DApplyTexture for a textured result, or straight from Hy3DVAEDecode/Hy3D_2_1SimpleMeshGen for raw geometry.
  • filename_prefix (default 3D/Hy3D) - where it lands and what it's called. The default writes to ComfyUI/output/3D/Hy3D_00001_.glb (the 3D/ prefix becomes a subfolder; the counter keeps runs from clobbering each other).
  • file_format - the format dropdown: glb, obj, ply, stl, 3mf, dae. Pick by destination:
    • glb - the default and the sensible default. Textured, widely supported, the format this pack's own tools assume.
    • obj - classic interchange, opens everywhere, loses some material niceties.
    • stl - the 3D printing format. Flat, no color.
    • ply - point-cloud/mesh workhorse.
    • 3mf - the newer, richer printing format (multi-material capable).
    • dae - COLLADA, for older pipelines.
  • save_file (default true) - this one's a subtle trap. When true it writes the file normally. When false it still writes a temp file (so the pipeline runs) but doesn't keep it - useful if you only need the node for the path string or to keep a workflow self-contained.

Output: glb_path (STRING) - the path to the written file, even though the name says glb it's whatever format you picked. You can wire it into other nodes that want a path, or just read it in the UI.

Practical notes

  • Textured exports need the texture applied first. If you export right after Hy3DVAEDecode, you get geometry with no UV texture - the mesh Hy3DApplyTexture would have attached is what carries the painted skin. Export after apply.
  • The output folder is ComfyUI/output/, not next to your input. People hunting for their first GLB forget this; it's the same place images go, under the 3D/ subfolder.
  • The node returns a path even when save_file is false (pointing at the temp file), which is how some clever workflows use it purely for the string.

Install

Ships with the pack - ComfyUI Manager, search "Hunyuan3DWrapper", or git clone https://github.com/kijai/ComfyUI-Hunyuan3DWrapper into custom_nodes and pip install -r requirements.txt. Needs trimesh (bundled in requirements) to do the actual writing. It's pure disk I/O otherwise: no model, no GPU, no surprises.

CategoryHunyuan3DWrapper

Inputs (4)

NameTypeDefaultDescription
trimeshTRIMESH
filename_prefixSTRING3D/Hy3D
file_formatCOMBO6 options: glb, obj, ply, stl, 3mf, dae
save_fileoptBOOLEANtrue

Outputs (1)

NameTypeDescription
glb_pathSTRING