Hy3D Fast Simplify Mesh
The decimator that makes a million-triangle blob shippable
- trimesh
- trimesh
Hunyuan3D's VAE decode is generous with triangles. You'll routinely get meshes in the hundreds of thousands to millions of faces, which is great for detail and terrible for everything downstream - UV wrapping, exporting, game engines, and Blender all slow down or choke. Hy3DFastSimplifyMesh is the decimator that fixes that, using Fast Quadric Mesh Reduction (pyfqmr) to collapse the mesh down to a target triangle count while keeping the silhouette mostly intact.
The name "fast" is doing real work here. Quadric error reduction is the standard approach, but pyfqmr's implementation is meaningfully quicker than the alternatives at aggressive reductions, which is why this is the pack's go-to for slimming down a raw decode before it becomes a problem.
Inputs that matter
trimesh- the mesh to simplify.target_count(default 40000) - the target number of triangles. 40k is the sweet spot for this pipeline: underHy3DMeshUVWrap's 50k warning line, plenty for a painted texture, small enough to move around.aggressiveness(default 7) - how aggressively it raises the reduction threshold each iteration. Higher = more aggressive = faster to target but coarser. 7 is a good default; the source calls this "the growth rate of the threshold."max_iterations(default 100),update_rate(default 5) - the reducer's loop controls. Defaults are fine.preserve_border(default true) - keeps open-border vertices intact. Leave it on, it prevents the mesh from developing torn edges.lossless(default false) - if true, switches to a lossless simplification that only removes triangles withinthreshold_lossless(default 0.001) of the original surface. This is the "shave off redundant triangles without losing shape" mode; use it when you're not trying to hit a big reduction, just clean up.threshold_lossless- the error budget for lossless mode.
Output: trimesh (TRIMESH).
Where it goes
Two idiomatic placements:
- Right after decode, before UV wrap:
Hy3DVAEDecode → Hy3DFastSimplifyMesh (40k) → Hy3DMeshUVWrap. This keeps the xatlas unwrap fast and under the warning threshold. - At the end, as a final pass: after
Hy3DApplyTexture, to produce the export tri-count. Texture bakes happen on the dense mesh, then you decimate the final asset.
Either way, Hy3DMeshInfo before and after gives you the before/after counts so you know what you actually paid in detail.
Install note
The node is in the pack, but the dependency isn't bundled: it imports pyfqmr, and if it's missing you'll get an explicit ImportError telling you to pip install pyfqmr. That's the one extra step for this node on top of the normal pack install (ComfyUI Manager, search "Hunyuan3DWrapper", or clone into custom_nodes and pip install -r requirements.txt).
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| target_count | INT | 400001–100000000 | Target number of triangles |
| aggressiveness | INT | 70–100 | Parameter controlling the growth rate of the threshold at each iteration when lossless is False. |
| max_iterations | INT | 1001–1000 | Maximal number of iterations |
| update_rate | INT | 51–1000 | Number of iterations between each update |
| preserve_border | BOOLEAN | true | Flag for preserving the vertices situated on open borders. |
| lossless | BOOLEAN | false | Flag for using the lossless simplification method. Sets the update rate to 1 |
| threshold_lossless | FLOAT | 0.00100–1 | Threshold for the lossless simplification method. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| trimesh | TRIMESH | — |