Nodes/ComfyUI-ComfyUI-Hunyuan3DWrapper/Hy3D Fast Simplify Mesh
ComfyUI Node

Hy3D Fast Simplify Mesh

The decimator that makes a million-triangle blob shippable

By kijai·Created 2 years ago·Updated 5 months ago· 1,033
Hy3D Fast Simplify Mesh
  • trimesh
  • trimesh
target_count40000
aggressiveness7
max_iterations100
update_rate5
preserve_bordertrue
losslessfalse
threshold_lossless0.0010

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: under Hy3DMeshUVWrap'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 within threshold_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:

  1. Right after decode, before UV wrap: Hy3DVAEDecode → Hy3DFastSimplifyMesh (40k) → Hy3DMeshUVWrap. This keeps the xatlas unwrap fast and under the warning threshold.
  2. 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).

CategoryHunyuan3DWrapper

Inputs (8)

NameTypeDefaultDescription
trimeshTRIMESH
target_countINT400001–100000000Target number of triangles
aggressivenessINT70–100Parameter controlling the growth rate of the threshold at each iteration when lossless is False.
max_iterationsINT1001–1000Maximal number of iterations
update_rateINT51–1000Number of iterations between each update
preserve_borderBOOLEANtrueFlag for preserving the vertices situated on open borders.
losslessBOOLEANfalseFlag for using the lossless simplification method. Sets the update rate to 1
threshold_losslessFLOAT0.00100–1Threshold for the lossless simplification method.

Outputs (1)

NameTypeDescription
trimeshTRIMESH