Nodes/BrainDead Nodes/BD Load Mesh
ComfyUI Node

BD Load Mesh

Get a 3D mesh into the pipeline — as TRIMESH, with everything it carries

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Load Mesh
    • mesh
    • mesh_path
    • status
    model_file(none — use file_path)
    file_path
    merge_scenetrue

    Every 3D workflow in ComfyUI-BrainDead starts the same way: you need a mesh inside the graph. BD_LoadMesh is the front door - it loads a GLB, GLTF, OBJ, PLY, STL, FBX (or a few more) into a TRIMESH object, which is the type every BD mesh node speaks (CuMesh Simplify, Blender Decimate, CubePart Segment, exports, OVoxel baking).

    The TRIMESH distinction matters and the pack's README is blunt about it: TRIMESH is a full trimesh.Trimesh that carries vertex colors, UVs, and materials - the same type TRELLIS2 and Hunyuan3D-2-1 use - whereas ComfyUI's native MESH is a thin (vertices, faces) tensor with no colors or UVs. If you want colors and UVs to survive, you stay in TRIMESH territory, and this is the node that gets you there.

    How to pick a file

    Two ways, and they don't fight:

    • model_file - a dropdown of every mesh in ComfyUI's input folder (recursively), with an upload button. The easy way for one-off loads.
    • file_path - an absolute (or input-relative) path override. It wins over the picker when set, and because it's a wirable STRING input, you can drive it programmatically - from a cache node's path output, a BD FilenameTemplate, or the mesh_path output of another load.

    One more useful toggle: merge_scene (default on). A GLB is often a scene of multiple sub-meshes; with this on, they merge into a single mesh. Off, you get only the first sub-mesh - handy when a file carries a lot of small parts and you want one specific one.

    Outputs

    • mesh - the TRIMESH, ready for any BD mesh node.
    • mesh_path - the resolved path as a STRING, which the README points out is handy for nodes that take a path.
    • status - a line reporting vertex/face counts and the path. The count is a useful quick check that you loaded what you think you loaded.

    Where it fits

    It's the first node in the CubePart decomposition flow ("mesh from Pixal3D / Trellis2 / .glb"), the entry to the whole mesh-processing side, and the thing you use when you want to re-process an existing asset rather than generate one. If you're importing a finished GLB to clean up, decimate, or re-bake, this is your loader.

    Install

    Part of the BrainDead pack:

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

    Or search "BrainDead" in ComfyUI Manager and restart. Requires trimesh; the node guards for it and reports "ERROR: trimesh not installed" if it's missing (pip install trimesh).

    Troubleshooting

    • "No mesh selected" - neither the dropdown nor file_path resolved to anything. Pick a file or set a path.
    • "File not found" - the path is wrong; absolute paths are the safe bet, and relative paths resolve against the input folder.
    • A multi-part GLB loads only one piece - check merge_scene; it's on by default, but if someone turned it off you get just the first sub-mesh.
    • Everything downstream complains about the type - you're probably mixing native MESH and TRIMESH. Use BD MESH → Trimesh to bridge if it came from ComfyUI's built-in 3D nodes.
    Category🧠BrainDead/Mesh

    Inputs (3)

    NameTypeDefaultDescription
    model_fileCOMBO(none — use file_path)Pick a mesh from ComfyUI's input folder, or upload one. Ignored when file_path is set.
    file_pathoptSTRINGAbsolute or input-relative path override. Wins over the picker. Leave empty to use the dropdown.
    merge_sceneoptBOOLEANtrueMerge a multi-part file (e.g. a GLB scene) into a single mesh. Off = keep only the first sub-mesh.

    Outputs (3)

    NameTypeDescription
    meshTRIMESH
    mesh_pathSTRING
    statusSTRING