Trimesh Save
The polite way to get a mesh out of ComfyUI
- trimesh
Trimesh Save is the "for keeps" counterpart to Trimesh Preview. Where the preview node writes a temp file and returns a path for a viewer, this one writes a properly named, auto-numbered file to your output folder so you can actually use the mesh - import it into Blender, drop it in a game engine, or send it to a slicer. Every workflow that generates or remeshes geometry should end at a node like this, and this is the one this pack gives you.
It's one of the four nodes in ComfyUI-BPT, the wrapper around Tencent's BPT remesher. The pack operates on the TRIMESH type - the same mesh type kijai's ComfyUI-Hunyuan3DWrapper and Microsoft's TRELLIS output - so Trimesh Save is the natural final stop for any of those meshes. The README itself points at this exact use: take the .glb that TRELLIS produces, run it through the pack, and save it back out here.
How it works
Under the hood it reuses ComfyUI's standard save-image path logic (get_save_image_path), which means the same counter behavior you know from SaveImage: write once, the file is BPT_00001_.glb; run again, BPT_00002_.glb. The mesh itself is written with the Python trimesh library, so you get the raw geometry in whatever format you asked for - no textures, no scene graph mangling, just the mesh.
Inputs
Three inputs, two of them worth touching:
- trimesh (
TRIMESH) - the mesh to save. Wire it from the BPT node, Trimesh Load, or any Hunyuan3D/TRELLIS mesh in your graph. - filename_prefix - defaults to
3D/BPT_. The3D/part creates a subfolder inComfyUI/output/, so your meshes land inoutput/3D/. ChangeBPT_to something recognizable and you'll thank yourself later. To write directly to the output root, drop the slash and use just a prefix likemy_mesh_. - file_format -
glb,obj,ply,stl,3mf, ordae. This is the one that matters for what happens next:glbfor engines and Blender,objfor interchange,stl/3mffor 3D printing. Pick based on your destination, not habit.
It's an output node with no outputs to wire onward - it terminates the chain.
Installing the pack
Install once and it applies to all four nodes. Easiest: ComfyUI Manager, search "ComfyUI-BPT". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Easymode-ai/ComfyUI-BPT
Then install the dependencies (the README targets the portable install's Python):
cd ComfyUI/custom_nodes/ComfyUI-BPT
..\..\..\python_embeded\python.exe -m pip install -r requirements.txt
The dependency list is heavy - deepspeed, torch_geometric, trimesh and friends - so expect a real install, not a blink. Saving a mesh doesn't load the BPT model weight, so you don't need that file for this node alone.
Troubleshooting
- "The filename, directory name, or volume label syntax is incorrect" when using a prefix with slashes on a single-level path - the
3D/subfolder is created automatically, but avoid weird characters in your prefix. - File appears but looks wrong in another app. Check the
file_formatyou chose matches what you actually need;glbanddaecarry more structure thanstl, which is geometry-only. - Nothing in
output/? Look inoutput/3D/- the default prefix puts it in a subfolder, easy to miss the first time.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| filename_prefix | STRING | 3D/BPT_ | — |
| file_format | COMBO | 6 options: glb, obj, ply, stl, 3mf, dae |
Outputs (0)
No outputs