BD Bake Vertex Colors From Texture
Bake a texture into per-vertex colors so your GLB isn't a white placeholder
- mesh
- texture
- mesh
- status
Here's a specific, annoying failure mode in the image-to-3D pipeline: you've got a mesh with a nice baked texture and its UVs, you run it through some processing, and the output file you export comes out as a flat white object because the texture didn't survive the trip. BD Bake Vertex Colors From Texture is the insurance policy: it samples a texture through the mesh's UVs and writes the result into per-vertex COLOR_0 colors, so the mesh carries its look in a format that survives mesh processing and export.
The key word is additive. This node doesn't strip the UVs or the baked material - it writes vertex colors alongside them. You end up with a mesh that carries both the texture and matching vertex colors, which is exactly what you need when downstream tools (or game engines) read COLOR_0 but not the material's baseColorTexture.
How it works
For every vertex, it looks up the texture at that vertex's UV coordinate and stores the sampled color as COLOR_0. Straightforward UV sampling, two flavors:
- bilinear (default) - smooth, interpolated sampling; softer results.
- nearest - exact texel; useful when you want hard color boundaries preserved rather than averaged.
You can wire any texture IMAGE in (e.g. the diffuse output of BD_OVoxelBake). Leave it unwired and the node pulls the mesh's own baseColorTexture - that's the trick for those white-placeholder GLBs, because many exported meshes do have the texture in memory, it just doesn't survive the export path.
The one input that matters
Just the sampling choice, honestly. The mesh is required; texture is optional. Outputs are the updated mesh (TRIMESH) and a status string that tells you which source got sampled (mesh baseColorTexture vs. your wired texture) or an ERROR if there's no texture anywhere.
Wire the result into BD Export Mesh With Colors (GLB/PLY/OBJ with COLOR_0), BD Blender Export Mesh, or BD Pack Bundle - any of the pack's export paths that consume vertex colors. That's the full loop: texture in, COLOR_0 baked, mesh exported without losing its look.
Install
Part of ComfyUI-BrainDead - the standard install:
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt
(ComfyUI Manager → "BrainDead" works too.) Restart; this pack needs a ComfyUI current enough for the V3 node API, so update if nodes don't register.
The catch, as always with vertex colors: they're per-vertex, so resolution is bounded by mesh density. A low-poly mesh will give chunky color blobs no matter how good the source texture is - if you need fine detail, keep the texture path (this node is for when COLOR_0 is the thing that survives, not the thing that's prettiest). And if your mesh has no UVs, the sample has nowhere to look; run a UV unwrap first.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| mesh | TRIMESH | — | |
| textureopt | IMAGE | Diffuse/atlas to sample (e.g. BD_OVoxelBake 'diffuse'). If omitted, the mesh's own baseColorTexture is used. | |
| samplingopt | COMBO | bilinear | Bilinear is smoother; nearest is exact texel. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mesh | TRIMESH | — |
| status | STRING | — |