Nodes/Avatar Graph/Mesh Vertices Smooth Laplacian
ComfyUI Node

Mesh Vertices Smooth Laplacian

Smoothing jagged mesh geometry without deflating it

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Vertices Smooth Laplacian
  • BPY_OBJ
  • BPY_OBJ
repeat1
lambda_factor1.00
lambda_border0.00
use_xtrue
use_ytrue
use_ztrue
preserve_volumetrue

This is a straight wrapper around Blender's Laplacian Smooth operator, running inside Avatar Graph - avatech.ai's node pack for turning a flat character illustration into a rigged, animatable avatar mesh entirely from ComfyUI. If you've ever taken a mesh built from an automatic segmentation step (SAM cuts out an eye or a mouth shape, and the resulting outline is a bit jagged) and needed it clean before it becomes a shape-key target, this is the node that does the cleanup.

Why Laplacian, specifically

Regular smoothing averages a vertex toward its neighbors, which is simple but shrinks the mesh over multiple passes - a sphere run through basic smoothing enough times collapses toward a point. Laplacian smoothing is the more careful version: it smooths while trying to preserve the mesh's overall volume, so you can run several iterations without your character's mouth outline visibly deflating. That's exactly the behavior you want when the input is noisy segmentation geometry rather than hand-modeled topology.

The inputs that matter

Everything here is optional and defaults to something sane, so most of the time you're only touching a couple of these:

  • repeat (default 1, up to 1000) - how many smoothing passes to run. One pass on lightly noisy geometry, more if the outline is genuinely jagged.
  • lambda_factor (default 1) - how strongly each pass smooths the interior surface.
  • lambda_border (default ~0.00005 - deliberately tiny) - smoothing strength specifically on the mesh's boundary edges. It's set far lower than lambda_factor on purpose: over-smoothing a border tends to visibly round off the silhouette of whatever shape you cut out, which is the last thing you want on a character's mouth or eye outline.
  • use_x / use_y / use_z (all default true) - lock the smoothing to specific axes if you need to; for a flat, plane-based mesh you'd typically leave all three on.
  • preserve_volume (default true) - the setting that keeps the mesh from visibly shrinking as you crank repeat up. Leave it on unless you have a specific reason not to.

Input and output are both BPY_OBJ - this pack's socket type for a live Blender object reference. Feed it whatever mesh you want cleaned, and it comes back out smoothed, ready for the next node in the chain (typically something that turns it into a shape-key target).

Installing it

Same install as every node in this pack: search avatar-graph-comfyui in ComfyUI Manager, or clone 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 catch that trips people up isn't this node specifically - it's the pack's Python requirement. bpy (Blender packaged as a plain pip install) only works on Python 3.10.x, so this needs its own environment if your ComfyUI is on anything newer. The README's Windows path is a dedicated Python 3.10 build of ComfyUI made specifically for this pack; on Mac/Linux they recommend a fresh conda env pinned to 3.10 rather than fighting your existing one. Restart with --enable-cors-header afterward if you want the live avatar preview panel to talk to editor.avatech.ai; skip it and you just export the result as a .glb/.gltf instead.

Troubleshooting

If nothing visibly changes, check that repeat is actually above the default of 1 and that the mesh coming in genuinely has the jaggedness you're trying to fix - this operator has nothing to do if the geometry is already clean. If the shape looks like it's collapsing or losing detail over multiple runs, check preserve_volume is still on and back off lambda_factor. This pack went quiet not long after its 2023 launch and the README still carries its original "still making changes" warning, so there's no active troubleshooting thread to lean on beyond the pack's Discord - treat the parameter ranges above as your main reference.

Categoryblender

Inputs (8)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
repeatoptINT11–1000
lambda_factoroptFLOAT1.001.000000011686097e-7–1000
lambda_borderoptFLOAT0.001.000000011686097e-7–1000
use_xoptBOOLEANtrue
use_yoptBOOLEANtrue
use_zoptBOOLEANtrue
preserve_volumeoptBOOLEANtrue

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ