Nodes/Avatar Graph/UV Select Similar
ComfyUI Node

UV Select Similar

The only selection node in Avatar Graph with real settings

By avatechai·Created 3 years ago·Updated 2 years ago· 264
UV Select Similar
  • BPY_OBJ
  • BPY_OBJ
type
compare
threshold0.00

Most of the Avatar Graph UV selection nodes are one-knob affairs. UV Select Similar is the exception - it's the one with a real control panel, and it's the one you'll reach for when "grow the selection" isn't enough. The idea: select a few UVs, tell the node what property they share, and it finds every other UV on the mesh that matches.

It wraps Blender's bpy.ops.uv.select_similar() - the same "Select Similar" operator in the UV editor - exposed as a ComfyUI node by the pack's auto-generated Blender operator family. On an auto-created avatar mesh it's the fastest way to answer questions like "where are all the tiny, bleeding islands?" or "which UVs are pinned?"

The settings that matter

Three of them, and the first is the whole show:

  • type - what to match on:
    • PIN - every pinned UV (a broader cousin of UV Select Pinned).
    • LENGTH / LENGTH_3D - UV edge length, or the corresponding 3D edge length.
    • AREA / AREA_3D - island area in UV space or in 3D. The killer use: AREA + LESS to flag the micro-islands that cause texture smearing.
    • MATERIAL, OBJECT, SIDES, WINDING, FACE - property matching for less common housekeeping.
  • compare - EQUAL, GREATER, or LESS. This is the qualifier that turns "find the same area" into "find the too-small ones."
  • threshold (float, 0–1) - how strict the match is. Near zero is strict; higher values broaden the net.

The combination that earns its keep: start with one decent-size island selected, set type AREA, compare LESS, and sweep threshold up until the mesh's garbage islands light up. Then delete or repack them. In avatar work, where seams are visible on every blink, that cleanup is not optional.

How it works

Like all UV nodes in the pack, it runs in Blender edit mode on your BPY_OBJ: activate the mesh, call the operator with the type/compare/threshold you wired, hand the same object back. Selection persists on the mesh, so you can pipe the result into a pin, snap, or delete-style operation downstream. Note the operator measures against whatever is selected first - so what the node finds is entirely dependent on the seed selection feeding it.

Inputs and outputs

  • BPY_OBJ in/out - the mesh object.
  • type, compare, threshold - as above.

Installing it

Same pack, same install: Avatar Graph pins bpy==3.6.0 and therefore needs Python 3.10 in your ComfyUI environment. ComfyUI Manager search: "Avatar Graph." Manual:

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

Restart ComfyUI and let the first launch download the SAM ViT-H model (~2.5 GB) and mediapipe landmarkers. Running with --enable-cors-header gives you the live preview in editor.avatech.ai; without it, export a .GLB from Avatar Main Output's right-click menu.

Troubleshooting

The trap here is threshold. Set it too tight and the operator finds only a few UVs; too loose and it floods the whole mesh, which reads as "it selected everything, broken!" - it isn't. Start at 0 and work up in small steps. And remember the seed-selection dependency: feed it a representative island first, or the "similar" set will be nonsense. If the node selects nothing at all, the usual suspects apply - no UV map, or no prior selection to measure against.

Categoryblender

Inputs (4)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
typeoptCOMBO10 options: PIN, LENGTH, LENGTH_3D, AREA, AREA_3D, MATERIAL, +4
compareoptCOMBO3 options: EQUAL, GREATER, LESS
thresholdoptFLOAT0.000–1

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ