BD Export Mesh With Colors
Get your mesh out the door with its texture intact
- mesh
- diffuse
- normal
- file_path
- status
Every 3D pipeline ends the same way: get the thing off disk, with the colors on it. BD Export Mesh With Colors is the BrainDead exit door - it writes a TRIMESH to GLB, PLY, or OBJ and, critically, can embed your baked PBR textures into the GLB so the file isn't a white placeholder. The pack keeps telling you to keep everything inside TRIMESH until this moment, and this is why.
It's the node at the end of the chain: load a mesh (or CubePart part) → sample vertex colors / bake PBR → export. Pair it with a BD Save Context for template-based filenames if you're doing batch output.
Inputs that matter
- mesh (TRIMESH) - required.
- format -
glb,ply, orobj(default glb). GLB is the one that can carry embedded textures. - diffuse and normal (optional IMAGEs) - your baked atlas maps, e.g. from
BD_OVoxelBake. Embeddingdiffuseas the GLB'sbaseColorTexture(andnormalas itsnormalTexture) is what turns the export from a gray shell into an actually-textured asset. GLB only, and the mesh needs UVs - which any bake already gave it. - filename, name_prefix (supports
Project/Namesubdirs), auto_increment (on by default so you don't clobber previous exports). - context_id / suffix / context_custom_vars - if you've registered a BD Save Context, leave
context_idempty and it auto-picks (when exactly one is registered); the template then drives the path and%suffix%. Thesuffixinput is wirable - connect BD CubePart Get Part'snameoutput so each part exports as_body,_head, etc. automatically.
Outputs: file_path (STRING, wire it into a text preview or downstream) and status.
Installing
ComfyUI Manager → search "BrainDead" → install. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt
Restart ComfyUI after cloning. It needs trimesh (a normal ComfyUI dependency) and PIL; no extra model downloads.
Where people get burned
The most common complaint is "my GLB is white" - that's the mesh having vertex colors but no material, and it's exactly why diffuse exists. If you skip wiring diffuse, you get vertex colors at best (which GLB carries fine) and nothing at all if the mesh is material-only. Second: don't reach for OBJ when you need the texture embedded - OBJ/PLY are for vertex-colored or pure-geometry output; GLB is the only one of the three that takes diffuse/normal. And remember the pack's TRIMESH-vs-MESH rule: if the colors are on a native ComfyUI MESH, convert to TRIMESH first - native MESH can't hold colors or UVs at all.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| mesh | TRIMESH | — | |
| filename | STRING | mesh_colored | — |
| format | COMBO | glb | 3 options: glb, ply, obj |
| name_prefixopt | STRING | Prepended to filename. Supports subdirs (e.g., 'Project/Name') | |
| auto_incrementopt | BOOLEAN | true | Auto-increment filename to avoid overwriting |
| context_idopt | STRING | BD_SaveContext id for template-based naming + foldering. Empty + exactly one registered context = auto-pick. When it resolves, the template (with %suffix%) drives the path; filename/name_prefix pass through as %filename%/%name_prefix%. | |
| suffixopt | STRING | Per-save suffix → %suffix% in the template (e.g. '_body', '_combined'). Wirable — e.g. connect BD CubePart Get Part's `name` output. Only used when context_id resolves. | |
| context_custom_varsopt | STRING | Extra key=value template vars (one per line), layered on top of the context (e.g. subfolder=parts). Only used when context_id resolves. | |
| diffuseopt | IMAGE | Baked diffuse/base-color atlas (e.g. from BD_OVoxelBake) to embed as the glb baseColorTexture, so the exported file is textured (not a white placeholder). GLB only; needs the mesh to carry UVs. | |
| normalopt | IMAGE | Baked tangent-space normal atlas to embed as the glb normalTexture. GLB only. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| file_path | STRING | — |
| status | STRING | — |