Nodes/ComfyUI_Antonioilev_Lightpack/πŸ•³οΈ Hole hub
ComfyUI Node

πŸ•³οΈ Hole hub

One Node, Five Hole Tools, and a Colour-Coded Answer

By AntonioilevΒ·Created 2 days agoΒ·Updated a day agoΒ· 0
πŸ•³οΈ Hole hub
  • mesh
  • mesh
  • report
β—„do_findfalseβ–Ί
β—„do_growfalseβ–Ί
β—„do_deletefalseβ–Ί
β—„do_fill_bigfalseβ–Ί
β—„do_fill_smallfalseβ–Ί
β—„grow_amount1β–Ί

What it's actually for

Generated meshes have holes you can't see. The silhouette looks right, the render looks right, and then you try to boolean it, 3D print it, or run it through a remesher and discover the shell is a colander. Classic suspects: the underside of anything the image-to-3D model couldn't see, the inside of a mouth, thin features the reconstruction gave up on.

HoleHub is the pack's one-stop for that job. Five toggleable operations on one node - find, grow, delete, fill-big, fill-small - sharing a single colour-coded selection channel so you can see exactly what it's about to do. The colour feedback is the feature. trimesh.repair.fill_holes on an unknown mesh is a coin flip; seeing the bad region highlighted before you commit is not.

How it works

The operations run in order, each writing into the same mesh, with the toggles acting as pipeline stages:

  • do_find finds boundary edges - edges used by exactly one face - and paints the vertices on those boundaries pure red (255,0,0) as a vertex colour layer. Everything else goes white. It also stashes a hole count in the mesh metadata.
  • do_grow expands that red region outward by grow_amount rings of vertex neighbours. This is for the common case where the hole isn't the problem - the ragged lip around it is, and you want to delete a bit of margin with it.
  • do_delete removes every face that touches a red vertex. Note what that means: it deletes around the selection, it doesn't just trim the boundary.
  • do_fill_big and do_fill_small run a fill pass that first removes duplicate faces and unreferenced vertices, runs inversion and normal fixes, then calls trimesh.repair.fill_holes, checks watertightness, and tries broken_faces plus a second fill if the first pass didn't close it. The two modes differ in what they target, not in the underlying machinery.

The mesh comes out as a real edit, and the report string lists which stages fired. If you turn nothing on, it does nothing and says No operations performed. - which is the correct behaviour and also the most common "it's broken" report.

The inputs that matter

  • mesh - your TRIMESH.
  • do_find first, always. Run it alone, look at the red, and only then decide whether the answer is fill or delete-and-fill.
  • grow_amount (default 1, 0-5) - how many rings of neighbours to include when do_grow is on. Use 1-2 to beat up a ragged edge; more than that and you're deleting good surface.
  • do_fill_big / do_fill_small - the two fill stages. Big fills the large boundary loops first (they're the ones worth closing), small mops up the little pinprick holes after.
  • do_delete - the destructive one, and the reason to preview first.

Outputs are mesh and report. The report is a log of stages; the mesh is the edit. Chain the mesh into mesh_uv_watertight or preview_mesh_uv to see it.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Antonioilev/ComfyUI_Antonioilev_Lightpack.git
# restart ComfyUI

Or ComfyUI Manager, searching "Antonioilev Light Pack". The pack ships no requirements.txt, and its __init__.py catches import failures and prints [...] Loaded N nodes (M failed) instead of raising - a missing node in the menu means a missing dependency, and the console line tells you which. HoleHub needs networkx alongside trimesh:

pip install networkx trimesh

Where people get burned

  • Preview the red before you delete. do_delete removes whole faces around the highlighted vertices, which is great for trimming a bad lip and terrible if your "holes" are actually 200 boundary edges from an unwelded mesh. Weld first, re-find, and half the holes usually disappear.
  • A "hole" that isn't one. If you have hundreds of tiny loops, your mesh is split into charts, not full of holes. Run AntonioilevUVWatertight before this node, or you'll spend an afternoon deleting surface for no reason.
  • Order is fixed. The stages always run find β†’ grow β†’ delete β†’ fill-big β†’ fill-small, so you can't, say, grow after filling. If you need a different order, use two HoleHub nodes.
  • It doesn't guarantee watertight. The fill pass tries hard and reports what happened; a mesh with genuinely open topology (a skirt, an open shell) stays open, and the honest report will say so.
CategoryAntonioilev/Mesh/Fix

Inputs (7)

NameTypeDefaultDescription
meshTRIMESHβ€”
do_findBOOLEANfalseβ€”
do_growBOOLEANfalseβ€”
do_deleteBOOLEANfalseβ€”
do_fill_bigBOOLEANfalseβ€”
do_fill_smallBOOLEANfalseβ€”
grow_amountINT10–5β€”

Outputs (2)

NameTypeDescription
meshTRIMESHβ€”
reportSTRINGβ€”