Refine Mesh
One node to decimate, subdivide, and smooth any mesh
- trimesh
- refined_mesh
- info
RefineMesh is the everyday utility of ComfyUI-GeometryPack: four mesh-refinement operations behind one operation dropdown, all pure CPU, all non-destructive. Decimate a bloated scan down to print-friendly face counts, subdivide a low-poly base into something with enough resolution to bake against, smooth the noise off a photogrammetry capture - one node does all of it. It's the kind of node that looks unglamorous next to the pack's Blender-and-CGAL remeshing machinery and quietly ends up in every workflow you actually ship.
Why use this one instead of the big Remesh node
The pack has a heavy multi-backend Remesh node that can dispatch to Blender, CGAL, or GPU environments for high-end results. RefineMesh is deliberately the opposite: it stays in trimesh, no external environment, no waiting for a Blender subprocess to spin up. The tradeoff is quality ceiling - you won't get quad-dominant remeshing or anisotropic adaptation here - but for the 80% of cases where you just need the face count or the noise level adjusted, this is faster, more reliable, and easier to reason about. The README's own framing ("professional geometry processing" with an experimental install) is exactly why having a boring, dependable CPU node in the pack is a relief.
The four operations
- decimation (default) - reduces faces toward
target_face_countusing quadric error metrics, the standard way to keep shape while shedding triangles. Set the count, get a smaller mesh. Great for scans headed to a 3D printer or into another pipeline with a budget. - subdivision_loop - Loop subdivision, the smooth one. Rounds off faceting and multiplies faces ~4x per iteration, which is how you add bakeable resolution.
- subdivision_midpoint - plain midpoint subdivision. Adds resolution without the smoothing, when you want density and you want the shape untouched.
- laplacian_smoothing - iterative Laplacian smoothing with a
lambda_factorstrength control. This is the denoiser for rough scans.
Inputs and outputs
The one required input besides the mesh is operation, the combo above. Everything else is optional and per-operation - unused ones are ignored, which keeps the node friendly:
- target_face_count (default 5000) - the decimation target.
- decimation_method (
trimeshorpymeshlab) - the engine for decimation. - subdivision_iterations (1–5) - how many passes for either subdivision type.
- smoothing_iterations (1–100) and lambda_factor (0–1, default 0.5) - the Laplacian controls.
Outputs are refined_mesh (the result, ready for a preview node or Save Mesh) and an info string with before/after counts and the reduction or multiplier percentage - worth glancing at, since it tells you whether that target_face_count actually bit.
Installing it
Same story as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
cd ComfyUI-GeometryPack
pip install -r requirements.txt --upgrade
python install.py
or search GeometryPack in ComfyUI Manager, then restart. The pack uses the experimental comfy-env isolated install (pixi, Blender, CGAL, libigl, VTK) so the first launch after install takes a while - that's expected, and it's also why the manual route above is the README's "most reliable" option.
Where people get burned
Two classic mistakes. First, subdivision_loop is exponential - at 4x per pass, three iterations turns a 100k-face mesh into 6.4M faces, which will happily stall a machine. Two passes is usually plenty. Second, decimation_method = pymeshlab requires pymeshlab in your environment; if the isolated install didn't provide it, the node throws exactly that error, and in a manual install pip install pymeshlab fixes it. And one expectation-setting note: decimation is lossy, and aggressive targets (like dropping a million faces to 5,000) will visibly round off detail. If you're decimating to 0.5% of the original, the info output will show you exactly what you traded away - and that's the moment to decide whether you actually want the pack's fancier remeshing backends instead.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| operation | COMBO | decimation | 4 options: decimation, subdivision_loop, subdivision_midpoint, laplacian_smoothing |
| target_face_countopt | INT | 50004–10000000 | — |
| decimation_methodopt | COMBO | trimesh | 2 options: trimesh, pymeshlab |
| subdivision_iterationsopt | INT | 11–5 | — |
| smoothing_iterationsopt | INT | 51–100 | — |
| lambda_factoropt | FLOAT | 0.50–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| refined_mesh | TRIMESH | — |
| info | STRING | — |