Nodes/Avatar Graph/Mesh Convex Hull
ComfyUI Node

Mesh Convex Hull

Shrink-wraps your selection into a simple, dent-free shape

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Convex Hull
  • BPY_OBJ
  • BPY_OBJ
delete_unusedtrue
use_existing_facestrue
make_holesfalse
join_trianglestrue
face_threshold0.70
shape_threshold0.70
uvsfalse
vcolsfalse
seamfalse
sharpfalse
materialsfalse

Another of Avatar Graph's Blender-operator wraps - this one is bpy.ops.mesh.convex_hull, unmodified, auto-generated from Blender's real mesh API into a ComfyUI node. Convex hull is a standard concept in computational geometry, not something specific to this pack: given a set of points, find the smallest shape that contains all of them with no concave dents - imagine shrink-wrapping a loose cluster of points.

Why you'd reach for it

Anywhere Avatar Graph's pipeline produces a messy, unordered point set or an over-complex mesh selection - a traced boundary with noise in it, or a set of vertices you just want a simplified outer shape for - Convex Hull gives you a clean, guaranteed-simple replacement. It's a common trick for building a rough bounding shape rather than working with the full-detail original: faster to process, no self-intersections possible by definition.

The inputs that matter

  • BPY_OBJ (optional) - the mesh object, with the vertices you want hulled selected.
  • delete_unused (default true) - vertices that end up inside the hull (not on its outer boundary) get removed rather than left dangling.
  • use_existing_faces (default true) - tries to reuse faces already present in the selection instead of re-triangulating everything from scratch, which generally gives a cleaner result when your input was already reasonably face-connected.
  • join_triangles (default true) - merges the hull's generated triangles back into larger n-gons where the geometry is flat enough, governed by face_threshold and shape_threshold; turn this off if you specifically want a pure triangle mesh out the other end.

The rest - make_holes, uvs, vcols, seam, sharp, materials - control whether various secondary mesh data (UV coordinates, vertex colors, seam/sharp marks, material assignments) get carried over from the source geometry into the new hull faces. Leave these off unless you specifically need that data preserved; they default to off for a reason.

Output is the same BPY_OBJ, passed through for chaining.

How to install it

Via ComfyUI Manager: search "Avatar Graph" (avatar-graph-comfyui), install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt

The pack's hard blocker: bpy==3.6.0 is pinned in requirements.txt and only builds on Python 3.10.x. Windows users get a bundled Python 3.10 ComfyUI zip from the README; Mac/Linux users should build a dedicated conda environment (conda create --name comfyui python=3.10) rather than fighting an existing 3.11/3.12 setup. Expect a heavier install overall - segment-anything, mediapipe, and OpenCV all come along.

Common issues & troubleshooting

"Operator poll() failed, context is incorrect." Needs an actual mesh selection with vertices to hull - an empty selection or a non-mesh object will fail here, same as any of this pack's other Blender-wrapped nodes.

Result looks flatter/simpler than expected, missing detail you wanted kept. That's the entire point of a convex hull - any concave feature in your original selection gets filled in, by definition. If you need to preserve concave detail, this isn't the right operation; it's specifically for producing a simplified, dent-free outer shape.

Lost UVs, vertex colors, or material assignments after running it. Those are all off by default (uvs, vcols, materials) - turn on whichever ones you actually need carried through if the hull result is missing data you expected to survive.

Categoryblender

Inputs (12)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
delete_unusedoptBOOLEANtrue
use_existing_facesoptBOOLEANtrue
make_holesoptBOOLEANfalse
join_trianglesoptBOOLEANtrue
face_thresholdoptFLOAT0.700–3.141592741012573
shape_thresholdoptFLOAT0.700–3.141592741012573
uvsoptBOOLEANfalse
vcolsoptBOOLEANfalse
seamoptBOOLEANfalse
sharpoptBOOLEANfalse
materialsoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ