Description
Mesh Ops is a single-stage mesh processing node in the ComfyTV 3D category. It takes an optional mesh input, runs one operation chosen from a combo box, and returns the processed mesh together with an image preview. The operation you pick determines which of the parameter widgets are relevant: the node keeps one card, and the card shows the parameters for the currently selected operation.
Typical uses include reducing a dense sculpt or photogrammetry mesh down to a workable face count, rebuilding a clean watertight surface from messy input, welding duplicate vertices, closing holes before export, smoothing normals for shading, subdividing for extra detail, and generating UVs before exporting to glTF, OBJ, or STL.
| Input | Type | Default | Notes |
|---|
operation | COMBO | decimate | Which mesh operation to run; the card shows its parameters. |
model | COMFYTV_MODEL | none (optional) | The mesh to process. When omitted the node has no geometry to operate on. |
Decimate parameters
Decimation uses QEM (quadric error metric) edge collapse to reduce the triangle count toward a target.
| Input | Type | Default | Range | Notes |
|---|
target_face_count | INT | 50000 | 100 to 5000000 | Target maximum face count. |
placement_mode | COMBO | midpoint | midpoint, qem | midpoint is robust and preserves thin features; qem uses QEM-optimal vertex placement, which gives sharper hard surfaces. |
feature_edge_quadric_weight | FLOAT | 0 | 0 to 1000, step 1 | Extra quadric weight placed on dihedral feature edges. 0 turns this off. |
feature_edge_min_dihedral_deg | FLOAT | 30 | 0 to 180, step 1 | Minimum dihedral angle, in degrees, for an edge to count as a feature edge. |
Non-manifold input (for example, raw Hunyuan3D output) collapses far below the requested target. In that case, run a remesh pass first and then decimate the remeshed result.
Remesh parameters
| Input | Type | Default | Range | Notes |
|---|
resolution | INT | 256 | 32 to 1024 | Voxel grid resolution. Roughly 100k faces at 256 and about 1M faces at 512. |
sign_mode | COMBO | udf | udf, sdf | udf is robust to messy input; sdf produces a clean single surface. |
project_back | FLOAT | 0 | 0 to 1, step 0.05 | Lerps the remeshed vertices back toward the original surface. 0 keeps the pure voxel result. |
smooth_iters | INT | 0 | 0 to 20 | Taubin smoothing iterations. 0 disables smoothing. |
Weld parameter
| Input | Type | Default | Range | Notes |
|---|
epsilon_rel | FLOAT | 0.00001 | 0 to 0.01, step 0.000001 | Weld tolerance expressed as a fraction of the bounding box diagonal, so the effective tolerance scales with mesh size. |
Fill Holes parameters
| Input | Type | Default | Range | Notes |
|---|
max_perimeter | FLOAT | 0.03 | 0 to 10, step 0.001 | Largest hole perimeter to fill, in mesh units. Holes larger than this are left open. |
max_verts | INT | 16 | 3 to 1024 | Cap on the number of boundary vertices allowed per hole. |
Smooth Normals parameter
| Input | Type | Default | Range | Notes |
|---|
crease_angle | FLOAT | 180 | 0 to 180, step 1 | Edges sharper than this angle stay hard; 180 gives fully smooth shading everywhere. |
Subdivide parameter
| Input | Type | Default | Range | Notes |
|---|
iterations | INT | 1 | 1 to 4 | Each iteration splits every triangle into four, so the face count grows by roughly 4x per iteration. |
Unwrap parameters
| Input | Type | Default | Range | Notes |
|---|
segmenter | COMBO | pec | pec, adaptive | pec is fast GPU chart segmentation; adaptive runs on the CPU. |
atlas_resolution | INT | 1024 | 256 to 8192, step 256 | Target atlas resolution, used for texel-density auto-scaling. |
padding | INT | 1 | 0 to 16 | Texel padding between charts. |
Export parameter
| Input | Type | Default | Notes |
|---|
format | COMBO | glb | glb keeps everything; obj keeps UVs, normals, and colors; stl is bare triangles. |
Outputs
| Output | Type | Notes |
|---|
| model | COMFYTV_MODEL | The processed mesh, ready to feed another Mesh Ops stage, the 3D viewer, or a save/export node. |
| image | COMFYTV_IMAGE | An image preview of the result, useful for wiring into preview or comparison nodes in the graph. |
Usage Notes
- Only the parameters belonging to the selected
operation matter. The other widgets stay on the card but are ignored, so you can leave them at their defaults.
- For difficult input, chain operations in a sensible order:
weld to remove duplicate vertices, remesh to rebuild a clean manifold surface, then decimate to reach a face budget. Decimating a non-manifold mesh directly tends to undershoot the target badly.
remesh at high resolution values produces very dense output. Pair it with decimate if the downstream node or exporter has a face-count budget.
project_back is a useful compromise after remeshing: the voxel surface is regular but slightly shrunken and rounded, and pushing the vertices partway back to the original surface recovers some fidelity without reintroducing noise.
smooth_iters uses Taubin smoothing, which shrinks the mesh far less than naive Laplacian smoothing, so moderate values are safe on hard-surface models.
- The
qem placement mode plus a nonzero feature_edge_quadric_weight is the combination to reach for when hard surface edges need to survive decimation. Raise feature_edge_min_dihedral_deg if too many edges are being treated as features.
unwrap should run before export if you need UVs in the output; a glb or obj export without UVs will have no texture coordinates to carry.
stl discards UVs, normals, and colors. Choose glb or obj whenever shading or texture data has to survive the round trip.
Comments
Sign in with GitHub to join the discussion.