π¦ 3D Mesh Exporter
The one node in this pack that just works β OBJ, PLY, STL out
- mesh_data
- file_path
- status
Every 3D pipeline ends the same way: get the mesh out of the node graph and into a file you can open in Blender, Unity, or a slicer. That's this node's whole job. MeshExporter takes the mesh_data that FaceReconstructor3D (or FLAMEOptimizer) hands you and writes it to disk as OBJ, PLY, or STL. It's the unglamorous end of the pack, and - refreshingly - the one piece that's genuinely solid. The export plumbing is real: it actually writes valid mesh files, which is more than you can say for some of the model weights in this pack.
How it works
The exporter takes the mesh dictionary, applies any scaling and centering you asked for, then serializes vertices and faces to the chosen format. OBJ is written with a hand-rolled serializer that can include UV coordinates if the mesh has them and include_textures is on; PLY and STL go through the trimesh library. center_mesh (on by default) translates the mesh so its center sits at the origin, and scale_factor multiplies all vertices - handy if you're targeting a specific unit scale for a 3D printer or a game engine.
The inputs that matter
- mesh_data - the
MESH_DATAoutput from FaceReconstructor3D or FLAMEOptimizer. Required. - output_format -
obj,ply, orstl. Defaults toobj, and that's usually right. - filename - what the file gets called (default
face_mesh). The extension is added for you.
The optional output_directory (default output/meshes), include_textures (default off), scale_factor (0.1β10), and center_mesh (default on) are the fine-tuning set. Two things worth knowing:
- Which format? OBJ is the safe general-purpose choice - Blender, Unity, and most DCC tools open it, and it's the only one of the three that carries texture coordinates when
include_texturesis on. PLY is the format you want if you're headed toward point-cloud or scanning workflows. STL is for 3D printing - it's solid geometry with no color or texture support, so don't expect it to look pretty, just printable.
The outputs
- file_path (STRING) - where the file actually landed. This is the value you copy to open the mesh.
- status (STRING) - format, vertex/face counts, scale, and whether centering was applied.
Where people get burned
Three gotchas, all avoidable:
- The output directory is relative to where ComfyUI was launched, not to the ComfyUI folder. If you can't find
output/meshes, check the working directory - or just type an absolute path. include_texturessilently does nothing if the mesh data has no UV coordinates. That means the UV predictor needs to have actually worked, which loops back to the pack's placeholder-weights problem. A "textured" export of a random-weight mesh is just a gray OBJ with no UVs.- Silly results in the file are usually the pipeline's fault, not the exporter's. Garbage in, garbage out - the exporter faithfully writes whatever geometry it's given. If the mesh looks wrong, fix the reconstruction first.
Installing it
Standard pack install: ComfyUI Manager (search "Pixel3DMM"), or clone https://github.com/A043-studios/comfyui-pixel3dmm into ComfyUI/custom_nodes, pip install -r requirements.txt, restart. The exporter leans on trimesh, which is in the requirements - if you see a trimesh import error, that dependency didn't install.
The full flow is Load Image β Pixel3DMMLoader β FaceReconstructor3D β MeshExporter, and this is the node that finally gives you a file you can drag into Blender. For anyone who's spent time with depth maps and displacement, this is the next level up: an actual watertight-ish mesh you can rotate, light, and print.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| mesh_data | MESH_DATA | β | |
| output_format | COMBO | obj | 3 options: obj, ply, stl |
| filename | STRING | face_mesh | β |
| output_directoryopt | STRING | output/meshes | β |
| include_texturesopt | BOOLEAN | false | β |
| scale_factoropt | FLOAT | 1.00.1β10 | β |
| center_meshopt | BOOLEAN | true | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| file_path | STRING | β |
| status | STRING | β |