Nodes/ComfyTV/Mesh Ops
ComfyUI Node

Mesh Ops

The geometry workshop ComfyTV hides in one dropdown

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Mesh Ops
  • model
  • model
  • image
force_run_token0
project_id
parent_output_id0
operationdecimate
target_face_count50000
placement_modemidpoint
feature_edge_quadric_weight0
feature_edge_min_dihedral_deg30
resolution256
sign_modeudf
project_back0.00
smooth_iters0
epsilon_rel0.0000
max_perimeter0.030
max_verts16
crease_angle180
iterations1
segmenterpec
atlas_resolution1024
padding1
formatglb
captured_image

Mesh Ops is the Swiss-army knife of ComfyTV's 3D geometry workshop - eight mesh operations live behind a single operation dropdown, and which parameters appear depends on which one you pick. It's the node you run a generated or imported mesh through to make it usable: bring a million-triangle AI mesh down to a reasonable count, remesh it into clean topology, weld the vertices, fill the holes, unwrap the UVs, and export the result - all on the canvas, none of it requiring you to leave for Blender.

ComfyTV is the canvas-style app layer on ComfyUI where every operation is its own node. Mesh Ops sits between Mesh Primitive / Mesh Boolean (which make geometry) and Mesh Bake Maps (which textures it).

How it works. One node, one operation per run; the card in the node body shows that operation's parameters. The operations, with the ones you'll actually use first:

  • decimate - bring the face count down via QEM edge collapse to a target_face_count, with placement_mode (midpoint preserves thin features, qem keeps hard surfaces sharper) and optional feature_edge_quadric_weight to protect creases. This is the first stop for AI-generated meshes.
  • remesh - rebuild topology on a voxel grid at resolution (256 ≈ 100k faces, 512 ≈ 1M), with sign_mode udf (robust to messy input) or sdf (clean single surface), plus project_back to pull vertices toward the original.
  • weld - merge duplicate vertices within epsilon_rel (a fraction of the bounding-box diagonal).
  • fill_holes - cap open borders, bounded by max_perimeter and max_verts.
  • smooth_normals - blend normals past crease_angle (180 = fully smooth).
  • subdivide - split every triangle into 4, iterations times.
  • unwrap - generate UVs with segmenter pec (fast GPU chart segmentation) or adaptive (CPU), targeting atlas_resolution with padding between charts. The setup step before baking.
  • export - write the mesh out as glb (everything), obj (UVs/normals/colors), or stl (bare triangles).

The inputs that matter. The force_run_token, project_id, parent_output_id and captured_image inputs are internal plumbing. The real set: model (required), operation, and the subset of parameters the selected operation uses - the tooltips in the node body tell you exactly which. Outputs are model (the processed mesh) and image (the viewport preview).

Install. Install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

Restart ComfyUI (full restart, not a browser refresh) and the stage appears under ComfyTV → 3D. ComfyUI Manager - search "ComfyTV" - works too. Zero Python dependencies (the pack's pyproject.toml dependency list is empty) and no model files - all geometry math. Desktop/multi-install users: clone into the running instance's path from the startup log or the node won't register.

Where people get burned. The big one is decimating to a face count that's too aggressive - generated meshes lose their surface detail fast, and at a few thousand faces a "carved from clay" look sets in. Set target_face_count generously and let feature_edge_quadric_weight protect the creases you care about. Second: remesh at high resolution is slow and produces huge meshes - 512 is a million faces, which is more than you usually want from a cleanup. And for AI-generated meshes, keep the 3D-generation reality in mind: the topology is already triangle soup, so remesh or unwrap before you bake, and expect to follow up with a decimate. The workflow that works: decimate → weld → fill_holes → unwrap → bake.

CategoryComfyTV/3D

Inputs (23)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
operationCOMBOdecimateWhich mesh operation to run; the card shows its parameters.
target_face_countINT50000100–5000000decimate — target max face count (QEM edge collapse).
placement_modeCOMBOmidpointdecimate — midpoint: robust, preserves thin features. qem: QEM-optimal vertex placement (sharper hard surfaces).
feature_edge_quadric_weightFLOAT00–1000decimate/qem — extra quadric weight on dihedral feature edges. 0 = off.
feature_edge_min_dihedral_degFLOAT300–180decimate/qem — min dihedral angle (deg) for a feature edge.
resolutionINT25632–1024remesh — voxel grid resolution. 256 ~ 100k faces, 512 ~ 1M.
sign_modeCOMBOudfremesh — udf: robust to messy input. sdf: clean single surface.
project_backFLOAT0.000–1remesh — lerp verts toward the original surface.
smooth_itersINT00–20Taubin smoothing iterations.
epsilon_relFLOAT0.00000–0.01weld — tolerance as a fraction of the bbox diagonal.
max_perimeterFLOAT0.0300–10fill_holes — max hole perimeter to fill (mesh units).
max_vertsINT163–1024fill_holes — cap boundary verts per hole.
crease_angleFLOAT1800–180smooth_normals — edges sharper than this stay hard. 180 = fully smooth.
iterationsINT11–4subdivide — each iteration splits every triangle into 4.
segmenterCOMBOpecunwrap — pec: fast GPU chart segmentation. adaptive: CPU.
atlas_resolutionINT1024256–8192unwrap — target atlas resolution for texel-density auto-scale.
paddingINT10–16unwrap — texel padding between charts.
formatCOMBOglbexport — glb keeps everything; obj keeps UVs/normals/colors; stl is bare triangles.
captured_imageSTRINGInternal — /view? URL of the preview-viewport snapshot. Written by the 3D preview in the node body; becomes the `image` output.
modeloptCOMFYTV_MODEL

Outputs (2)

NameTypeDescription
modelCOMFYTV_MODEL
imageCOMFYTV_IMAGE