Nodes/Avatar Graph/Mesh Mark Sharp
ComfyUI Node

Mesh Mark Sharp

Flagging edges to hold their shading break in Avatar Graph

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Mark Sharp
  • BPY_OBJ
  • BPY_OBJ
clearfalse
use_vertsfalse

This node pairs naturally with Mesh Edges Select Sharp: that one finds edges bent past an angle threshold, this one flags the selected edges as Sharp - Blender's edge attribute that tells shading and subdivision where a hard break belongs, rather than letting it smooth over like the rest of the surface.

How it works

This wraps Blender's mesh.mark_sharp operator, the same as the Edge menu's "Mark Sharp." It doesn't move geometry at all - it sets a flag on the selected edges that other systems read: auto-smooth shading uses it to decide where to break the smooth-shaded look and show a visible edge instead, and a Subdivision Surface modifier reads it to know which edges to preserve as hard corners rather than rounding them off during subdivision. Without marking anything, a subdivided mesh softens every corner uniformly; with edges marked sharp, the corners you actually want crisp - an eyelid line, a mouth corner, a jaw edge - stay defined through subdivision instead of dissolving into a smooth blob.

The inputs and outputs that matter

  • BPY_OBJ - the mesh with edges selected.
  • clear (default false) - flip this on to do the opposite: remove the Sharp flag from selected edges instead of adding it (Blender's "Clear Sharp").
  • use_verts (default false) - extends the operation based on vertex selection rather than requiring the edges themselves to be directly selected, useful if your upstream selection logic worked in terms of vertices.

Output is a single BPY_OBJ, the same mesh with sharp flags set (or cleared) on the selected edges.

How to install it

ComfyUI Manager, search "Avatar Graph" and install, or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui

then pip install -r requirements.txt and restart. Needs Blender's bpy module, pinned to Python 3.10.x - a dedicated conda environment on macOS/Linux, or Avatech's prebuilt Python-3.10 ComfyUI zip on Windows with the pack installed through Manager afterward.

Common issues & troubleshooting

If nothing seems to change visually, remember this is a flag, not a geometry edit - you won't see anything different unless something downstream actually reads sharp edges, like a Subdivision Surface modifier or auto-smooth shading. Marking edges sharp on a mesh with no subdivision and no auto-smooth enabled has no visible effect at all, which is correct behavior, not a broken node.

If corners still look soft after marking them, double-check whether auto-smooth or your subdivision setup is actually configured to respect sharp edges in the first place - this node only sets the flag, it doesn't turn on the shading settings that make the flag matter.

A bpy import failure at ComfyUI startup is the pack's Python-version pin, not this operator - confirm a clean Python 3.10.x environment with requirements.txt installed without errors. And the natural pairing worth remembering: run Mesh Edges Select Sharp first to find the candidate edges by angle, then this node to actually flag them, rather than hand-selecting edges for marking.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
clearoptBOOLEANfalse
use_vertsoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ