ComfyUI Node

Mesh Poke

Turning a flat face into a fan of triangles around one center point

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Poke
  • BPY_OBJ
  • BPY_OBJ
offset0.00
use_relative_offsetfalse
center_mode

"Poke" is a great name for what this does: pick a face, and instead of leaving it as one flat quad or n-gon, it adds a new vertex right in the middle and connects it to every corner, turning the face into a fan of triangles that all meet at that center point. It's one of Blender's smaller, more specific mesh operators, and it earns a spot in this pack because that center vertex is exactly what a lot of localized deformation needs.

What it is and why you'd reach for it

This wraps Blender's mesh.poke operator directly. The practical reason you'd want it in an avatar-rigging context: a shape key deformation (built with Mesh_ModifyShapeKey) often wants a clean pivot point to pull or push around - a mouth corner, a cheek, an eyelid crease - and a flat n-gon face doesn't give you one. Poking that face gives you a new vertex sitting exactly at its center (or somewhere you offset it to), which is a much better handle for that kind of localized, believable deformation than trying to drag a whole flat face around.

How it works

For each selected face, it inserts a new vertex and re-triangulates the face into a fan connecting that vertex to every original corner. The offset and center_mode parameters control exactly where that new vertex lands.

The inputs and outputs that matter

  • offset (default 0, range −1000 to 1000) - pushes the new center vertex along the face's normal, away from the original flat plane. Zero keeps it flush; positive or negative values give you a subtle bump or dimple, which is sometimes a nice effect entirely on its own, poke aside.
  • use_relative_offset (boolean, default off) - when on, offset scales relative to the face's own size instead of being an absolute distance, which matters if you're running this node across faces of very different scales.
  • center_mode - where "center" is calculated from: MEDIAN_WEIGHTED (weighted by edge length, generally the most natural-looking for irregular faces), MEDIAN (simple average of corners), or BOUNDS (center of the face's bounding box, which can land outside the actual face on concave shapes).

Output is the standard single BPY_OBJ.

How to install it

ComfyUI Manager: search Avatar Graph, install, restart. By hand:

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

The whole pack rests on bpy, Blender shipped as a Python package, which only publishes wheels for specific Python minor versions - the README doesn't bury this, it states outright that you need Python 3.10.x. Windows users get a dedicated embedded-Python-3.10 zip built specifically to avoid the mismatch; macOS/Linux users should pin a conda create --name comfyui python=3.10 environment rather than trust whatever's already installed. Restart with --enable-cors-header (add --force-fp16 on Mac) for the live avatar preview panel; without it, everything still runs, you just lose the real-time viewer and would check your result by exporting a .glb/.gltf from the Avatar Main Output node instead.

Common issues

If the poked vertex lands somewhere that looks off-center on an irregular face, try switching center_mode - MEDIAN_WEIGHTED almost always looks more natural than BOUNDS on anything that isn't a simple convex shape. If offset seems to do nothing, check use_relative_offset - on a very small face, an absolute offset of even a modest number can push the vertex way out of proportion, or on a very large face, barely move it at all. And as with the whole pack: an install failure pulling in bpy is almost always a Python-version mismatch, not a broken package - confirm you're on 3.10.x before digging further.

Categoryblender

Inputs (4)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
offsetoptFLOAT0.00-1000–1000
use_relative_offsetoptBOOLEANfalse
center_modeoptCOMBO3 options: MEDIAN_WEIGHTED, MEDIAN, BOUNDS

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ