Nodes/BrainDead Nodes/BD MeshLib Fill Holes
ComfyUI Node

BD MeshLib Fill Holes

The hole-filler for the holes the other hole-fillers miss

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD MeshLib Fill Holes
  • mesh
  • mesh
  • status
max_hole_edges300
nice_filltrue

BD MeshLib Fill Holes fills holes in a mesh - using MeshLib's curvature-aware filler instead of the more common PyMeshLab or CuMesh paths. If you've repaired a handful of generated meshes you know this is not a solved problem: some holes are tiny artifacts, and some are gaping craters in the middle of a surface. This node exists for the craters.

The honest framing from the node itself: MeshLib's fillHoleNicely produces smooth, fair patches that respect the surrounding curvature - significantly better than CuMesh or PyMeshLab for the large, irregular holes that are common in TRELLIS2 and DC-remesh output. Which is to say: it's not your everyday repair tool, it's your "the cheap tools couldn't handle it" tool. The README recommends it for cleaning up DC remesh output before UV unwrap or export - a spot in the pipeline where a hole would otherwise become a UV island from hell.

How it works

It's a classic mesh-repair step with a quality switch:

  • max_hole_edges (default 300) - the boundary edge count above which a hole is left alone. This is your safety valve: raise it to fill bigger holes, lower it to only fill small artifacts and avoid touching the deliberate openings (mouth, eye sockets) you might want to keep. A mesh has intentional holes - "which holes are the mistakes" is literally the decision this input encodes.
  • nice_fill (default ON) - curvature-aware filling (slower, much better quality) versus the fast trivial fill. Turn it off when you're iterating or the holes are trivial and you want speed.

Outputs are the repaired mesh (same TRIMESH type, so it feeds straight into the next BD mesh node - unwrap, simplify, export) and a status string.

Where it fits

In the pack's mesh workflow you typically see it chained after a decimation or remesh pass (BD Blender Remesh, BD Smart Decimate, DC remesh output) and before UV unwrap or export. BD Mesh Repair handles the routine cleanup - duplicates, degenerates, normals, small holes - and this is the one you swap in when close_holes there taps out. They're complementary: Mesh Repair is the daily driver, this is the specialist.

Installing

Standard BrainDead install - ComfyUI Manager search "BrainDead" or clone + pip install -r requirements.txt, restart. The dependency to know about: this node calls into the meshlib Python package, and if it's not installed you get a clear ERROR: meshlib not installed in the status output rather than a crash. pip install meshlib fixes it (the pack lazy-imports it, so the rest of the mesh nodes keep working regardless). It needs trimesh as usual, and a current ComfyUI for the V3 API.

One tip

Don't crank max_hole_edges to 10000 "to be safe." Bigger holes filled aggressively can weld together geometry you wanted separate, and the curvature-aware fill has to invent more surface the larger the hole gets. Start at the default, look at the result in BD Mesh Inspector, and only raise it if a real hole is still open.

Category🧠BrainDead/Mesh

Inputs (3)

NameTypeDefaultDescription
meshTRIMESH
max_hole_edgesINT3003–10000Maximum boundary edge count for a hole to be filled. Larger = fill bigger holes.
nice_fillBOOLEANtrueUse curvature-aware fill (slower but much better quality). False = fast trivial fill.

Outputs (2)

NameTypeDescription
meshTRIMESH
statusSTRING