ComfyTV/3Dgenerated

Mesh Ops(MeshOpStage)

Mesh Ops is a single-stage mesh processing node in the ComfyTV 3D category.

Mesh Op Stage

model
model
image
operation
decimate
target_face_count
50000
placement_mode
midpoint
feature_edge_quadric_weight
0
feature_edge_min_dihedral_deg
30
resolution
256
sign_mode
udf
project_back
0.00
smooth_iters
0
epsilon_rel
0.000010
max_perimeter
0.030
max_verts
16
crease_angle
180
iterations
1
segmenter
pec
atlas_resolution
1024
padding
1
format
glb
ComfyTV

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.

Inputs

Core inputs

InputTypeDefaultNotes
operationCOMBOdecimateWhich mesh operation to run; the card shows its parameters.
modelCOMFYTV_MODELnone (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.

InputTypeDefaultRangeNotes
target_face_countINT50000100 to 5000000Target maximum face count.
placement_modeCOMBOmidpointmidpoint, qemmidpoint is robust and preserves thin features; qem uses QEM-optimal vertex placement, which gives sharper hard surfaces.
feature_edge_quadric_weightFLOAT00 to 1000, step 1Extra quadric weight placed on dihedral feature edges. 0 turns this off.
feature_edge_min_dihedral_degFLOAT300 to 180, step 1Minimum 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

InputTypeDefaultRangeNotes
resolutionINT25632 to 1024Voxel grid resolution. Roughly 100k faces at 256 and about 1M faces at 512.
sign_modeCOMBOudfudf, sdfudf is robust to messy input; sdf produces a clean single surface.
project_backFLOAT00 to 1, step 0.05Lerps the remeshed vertices back toward the original surface. 0 keeps the pure voxel result.
smooth_itersINT00 to 20Taubin smoothing iterations. 0 disables smoothing.

Weld parameter

InputTypeDefaultRangeNotes
epsilon_relFLOAT0.000010 to 0.01, step 0.000001Weld tolerance expressed as a fraction of the bounding box diagonal, so the effective tolerance scales with mesh size.

Fill Holes parameters

InputTypeDefaultRangeNotes
max_perimeterFLOAT0.030 to 10, step 0.001Largest hole perimeter to fill, in mesh units. Holes larger than this are left open.
max_vertsINT163 to 1024Cap on the number of boundary vertices allowed per hole.

Smooth Normals parameter

InputTypeDefaultRangeNotes
crease_angleFLOAT1800 to 180, step 1Edges sharper than this angle stay hard; 180 gives fully smooth shading everywhere.

Subdivide parameter

InputTypeDefaultRangeNotes
iterationsINT11 to 4Each iteration splits every triangle into four, so the face count grows by roughly 4x per iteration.

Unwrap parameters

InputTypeDefaultRangeNotes
segmenterCOMBOpecpec, adaptivepec is fast GPU chart segmentation; adaptive runs on the CPU.
atlas_resolutionINT1024256 to 8192, step 256Target atlas resolution, used for texel-density auto-scaling.
paddingINT10 to 16Texel padding between charts.

Export parameter

InputTypeDefaultNotes
formatCOMBOglbglb keeps everything; obj keeps UVs, normals, and colors; stl is bare triangles.

Outputs

OutputTypeNotes
modelCOMFYTV_MODELThe processed mesh, ready to feed another Mesh Ops stage, the 3D viewer, or a save/export node.
imageCOMFYTV_IMAGEAn 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.

Loading comments…