Mesh Vertices Smooth
Sanding the noise out of an auto-generated mesh
- BPY_OBJ
- BPY_OBJ
Meshes built automatically from a 2D character image can come out with tiny jagged spikes and noise in the geometry - not enough to be obviously broken, but enough to show up as a subtle wobble once you start deforming the mesh with shape keys. Mesh_VerticesSmooth is the sanding pass for that.
What it is and why you'd reach for it
This node wraps Blender's bpy.ops.mesh.vertices_smooth() directly. Avatar Graph runs actual Blender via the bpy package inside ComfyUI, and this is another thin passthrough to a built-in mesh operator: it's a Laplacian-style smooth, meaning each selected vertex gets pulled toward the average position of its neighbors. Repeated enough times, that averaging flattens out small local noise while mostly preserving the overall shape - as opposed to a subdivide-and-smooth pass, which adds geometry; this one just repositions what's already there.
In an Avatar Graph pipeline, this is the node you reach for after Create Mesh Layer if the auto-generated mesh has a slightly jittery surface, or after Mesh_Subdivide if the new subdivided points came out a little uneven. Run it before adding shape keys, not after - smoothing a mesh that already has shape keys on it can flatten your carefully posed blend shapes right along with the noise you were trying to remove.
Inputs and outputs that matter
BPY_OBJ(optional) - the mesh coming in.factor(float, default 0, −10 to 10) - smoothing strength. Positive values pull vertices toward their neighbors' average (the normal smoothing direction); negative values push the opposite way, which sharpens or inflates rather than smooths. Small positive values go a long way - this isn't a field you want maxed out on a character mesh.repeat(int, default 1, 1–1000) - how many smoothing passes to run. More passes compound the effect roughly the way running the node multiple times would, so treatfactorandrepeatas working together, not independently.xaxis/yaxis/zaxis(bool, all default True) - which axes vertices are allowed to move along. Lock an axis off (say, the depth axis on a flat character plane) if you want to smooth the surface detail without flattening the silhouette on that axis.wait_for_input(bool, default True) - mirrors Blender's interactive modal-adjust behavior in the viewport; in a non-interactive ComfyUI graph this mostly just runs the operator once with whatever values you set.
Output: a single BPY_OBJ, with the selected vertices smoothed.
Selection-dependent, like the rest of the Mesh_* family - nothing selected upstream means no visible change.
Installing Avatar Graph
bpy only ships wheels for Python 3.10.x, and the whole pack depends on it - pin your environment to that version first.
ComfyUI Manager: search avatar-graph-comfyui, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui.git
cd avatar-graph-comfyui
python -m pip install -r requirements.txt
Restart with python main.py --enable-cors-header (--force-fp16 on Mac too). Windows gets a prebuilt Python 3.10 environment from the README; macOS/Linux is pointed at a dedicated conda create --name comfyui python=3.10.
Common issues
Character silhouette shrinks or puffs out unexpectedly. That's factor set too high, or too many repeat passes - Laplacian smoothing pulls the whole shape inward the more aggressively you run it. Back both values down.
Shape keys look flattened after running this node. Order matters - smoothing after shape keys are added averages out the pose you built into them. Run this cleanup step earlier in the pipeline, before Object_AddShapeKeys.
Nodes not loading in ComfyUI. Check python --version reads 3.10.x - outside that range bpy fails to import and the whole pack won't register.
No live avatar preview. Needs --enable-cors-header at launch. Without it, export the finished mesh via right-click → Save File on Avatar Main Output instead of watching it update live in the embedded editor.avatech.ai panel.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| factoropt | FLOAT | 0.00-10–10 | — |
| repeatopt | INT | 11–1000 | — |
| xaxisopt | BOOLEAN | true | — |
| yaxisopt | BOOLEAN | true | — |
| zaxisopt | BOOLEAN | true | — |
| wait_for_inputopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |