Nodes/ComfyUI-MeshTools/MeshTools Export Mesh
ComfyUI Node

MeshTools Export Mesh

Get your mesh out of ComfyUI and into the real world

By agenticvibes·Created 5 months ago·Updated 5 months ago· 0
MeshTools Export Mesh
  • trimesh
  • mesh_path
filename_prefix3D/Mesh
file_format
save_filetrue

MeshTools Export is the exit door of the ComfyUI-MeshTools pack. Everything before it - the generation, the cleanup, the decimation, the UV unwrap - is invisible until you write a file, and this is the node that does it. It takes a TRIMESH and drops a .glb, .obj, .ply, .stl, .3mf, or .dae into ComfyUI's output/ directory. If you've been burned by packs that only let you preview in a viewport, this is the relief: it actually saves the thing.

Where does it sit in the workflow? At the very end, after your mesh looks the way you want. The generation-model scene - Hunyuan3D, TRELLIS, TripoSR - gives you a textured mesh with questionable geometry underneath, and the KB doc on 3D generation puts it bluntly: printers don't care about topology, game engines do, and the cleanup pass in between is where the "80% of the work" complaint comes from. Export is where you choose which destination you're shipping to, because each format exists for a different consumer.

How it works

Mechanically it's clean. The node reuses ComfyUI's own save-path helper (the same one SaveImage uses), so your file lands in ComfyUI/output/ with a numbered name - Mesh_00001_.glb, then Mesh_00002_.glb - and subdirectories are created automatically. There's no GPU involved, no format conversion wizardry; trimesh handles the export.

The format choice is the real decision, and the author's tooltips spell it out:

  • glb - binary, compact, carries materials. The pick for web and game engines. Default recommendation.
  • obj - the most widely supported for editing in Blender/Maya. If you're going to keep working, choose this.
  • ply - good for point clouds and scans.
  • stl - the 3D-printing standard. Drops all color and texture, which is fine for a slicer.
  • 3mf - the modern printing format, more metadata than STL.
  • dae (Collada) - an interchange format for moving between DCC tools.

Inputs and outputs

  • trimesh (TRIMESH) - the mesh to write out.
  • filename_prefix (STRING, default 3D/Mesh) - path relative to the output directory. 3D/Mesh puts your files in output/3D/. Subfolders are created for you.
  • file_format (enum) - one of the six above.
  • save_file (BOOLEAN, default true) - when off, the node writes to a temp file instead of accumulating numbered outputs. Handy in preview workflows where you're iterating and don't want to sweep a hundred GLBs later.
  • mesh_path (STRING output) - the relative path of the file, which you can wire into a text-display node to see where it went.

Installing

It's one node in one pack:

cd ComfyUI/custom_nodes
git clone https://github.com/agenticvibes/ComfyUI-MeshTools
cd ComfyUI-MeshTools
pip install -r requirements.txt

Or search "ComfyUI-MeshTools" in ComfyUI Manager and restart. No model downloads - the heavy lifting is done by trimesh, which requirements.txt pulls in.

Common issues

  • "Where did my file go?" - check ComfyUI/output/3D/, and remember the numbered suffix. Mesh_00001_.glb, not Mesh.glb.
  • STL came out blank/colorless - not a bug. STL stores geometry only. If you need color, export GLB or OBJ with the texture next to it.
  • You want it somewhere specific - filename_prefix is relative to the output dir on purpose; you can't escape it with ... If you need a different root, this node isn't the escape hatch - move the file yourself or mount the output folder where you need it.

One more thing: this node is the terminal. It's marked as an output node, so ComfyUI treats it like SaveImage - no need to chain a preview after it.

CategoryMeshTools

Inputs (4)

NameTypeDefaultDescription
trimeshTRIMESH3D mesh to export
filename_prefixSTRING3D/MeshOutput path prefix relative to ComfyUI output directory
file_formatCOMBO3D file format. GLB recommended for web/game use, OBJ for editing
save_fileoptBOOLEANtrueWhen disabled, exports to a temporary file instead of a numbered output

Outputs (1)

NameTypeDescription
mesh_pathSTRING