Nodes/BrainDead Nodes/BD Trimesh → MESH
ComfyUI Node

BD Trimesh → MESH

The adapter that lets BrainDead meshes talk to ComfyUI's built-in 3D nodes

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Trimesh → MESH
  • mesh
  • MESH
  • status

Every now and then ComfyUI throws two perfectly good meshes at you that can't talk to each other, and this node is the interpreter. On one side you have the TRIMESH type - a full trimesh.Trimesh object carrying vertex colors, UVs, and materials, which is what this pack (and TRELLIS2, Hunyuan3D-2-1, and GeometryPack) all pass around. On the other side you have ComfyUI's native MESH type - a thin, batched (vertices, faces) tensor container that the built-in 3D nodes like Save 3D Model / SaveGLB expect. They are genuinely different data models, not interchangeable spellings of the same thing. BD Trimesh → MESH converts one into the other so you can hand a BrainDead-generated mesh to a built-in node.

How it works, and the honest catch

Mechanically it's boring in the best way: it takes your TRIMESH, pulls out vertices and faces as tensors, wraps them in a batched native MESH with shape [1, N, 3] / [1, M, 3], and hands it over. The status output tells you how many verts and faces made the trip.

The catch is in the source code and it's worth reading before you wire it up: native MESH carries geometry only. Vertex colors, UVs, and materials don't survive the conversion - the format literally can't hold them, and the node's own status message says "(colors/UVs dropped)". If you convert a textured, vertex-colored mesh to native MESH and then export it, you'll get a clean white shell, not your asset.

So the decision rule is:

  • Use this node when the destination is a built-in node that only cares about geometry - previewing, a native Save 3D Model, or feeding some other core 3D node that wants native MESH.
  • Don't use it when colors/UVs must survive. For a textured export, reach for BD Export Mesh With Colors (GLB/PLY/OBJ) or the Blender-based BD Blender Export Mesh (GLB/FBX), which keep the material. This is the standard Bridge-the-gap advice: keep work inside TRIMESH whenever the surface data matters, and only cross over to MESH when you must.

Installation

This one's dependency-free, which is a nice change of pace in the 3D corner. It ships in ComfyUI-BrainDead:

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

Or via ComfyUI Manager (search "BrainDead"). No extra model downloads for this node - you only need trimesh, which the pack installs as part of its normal dependencies.

Common issues

  • The output is white / missing its texture - that's not a bug, that's the format. You crossed into native MESH, and it dropped your colors and UVs. Re-route through a TRIMESH-preserving export node instead.
  • "mesh is None" status - you've wired the input from a node that didn't actually produce a mesh, or the upstream TRIMESH socket is empty. Check the generator, not this node.
  • Nothing plugs into the MESH output - if the built-in node you're targeting expects a different socket type, you may actually want the reverse direction. This pack ships BD MESH → Trimesh for pulling native results into the TRIMESH pipeline; make sure you're converting the way you think you are.
Category🧠BrainDead/Mesh

Inputs (1)

NameTypeDefaultDescription
meshTRIMESH

Outputs (2)

NameTypeDescription
MESHMESH
statusSTRING