Nodes/ComfyUI-Hunyuan3d-2-1/Hunyuan 3D 2.1 Instant-Meshes Remesh
ComfyUI Node

Hunyuan 3D 2.1 Instant-Meshes Remesh

Read the fine print before you trust it

By visualbruno·Created about a year ago·Updated 5 days ago· 375
Hunyuan 3D 2.1 Instant-Meshes Remesh
  • trimesh
  • trimesh
merge_verticestrue
vertex_count10000
smooth_iter8
align_to_boundariestrue
triangulate_resulttrue
max_facenum40000

Remeshing is the black art of mesh cleanup: instead of just removing triangles, you rebuild the mesh with a uniform, well-spaced grid of them. Hy3D21IMRemesh does this using Instant-Meshes, via the pynanoinstantmeshes binding. When it works, you get a clean, evenly-tessellated mesh that decimates and unwraps beautifully. The catch is right in the node's own description: "this will remove all vertex colors and textures." Remeshing rebuilds the surface from scratch, so anything painted on the old mesh is gone.

The inputs that matter

  • vertex_count (default 10,000) - the target number of output vertices. This is the main dial: higher = denser remesh. 10k is a reasonable working default; go lower for a light base mesh.
  • smooth_iter (default 8) - how many smoothing passes the remesher runs while placing vertices. More smoothing = rounder, but it blurs fine detail. 8 is fine.
  • merge_vertices (default true) - weld coincident vertices before remeshing. Keep it on for scanned or imported geometry that has seams.
  • align_to_boundaries (default true) - try to line up remesh edges with feature boundaries. Keep it on; turning it off tends to make flat regions look noisy.
  • triangulate_result (default true) - split any quads the remesher produces into triangles, since the rest of the pipeline expects triangles.
  • max_facenum (default 40,000) - an upper cap on output faces.

The honest caveat

Read the source before you trust this node's output. It calls PyNIM.remesh(...) to get new_verts/new_faces, checks the result, and then... returns the input mesh copy (with a possible face reduction) - the freshly remeshed vertices and faces from Instant-Meshes never actually get rebuilt into the returned mesh in the current code. So in practice, what this node gives you may not be the remesh you asked for; it behaves more like a vertex-merge plus optional face reduction. If your goal is true Instant-Meshes output, verify on your version and don't be shy about reporting upstream. It also needs pynanoinstantmeshes, which is not in the pack's requirements.txt - you install it yourself (pip install pynanoinstantmeshes), or the node raises an ImportError telling you exactly that.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/visualbruno/ComfyUI-Hunyuan3d-2-1
cd ComfyUI-Hunyuan3d-2-1
pip install -r requirements.txt
pip install pynanoinstantmeshes

Common issues

Besides the extra dependency, the big gotchas are texture/vertex-color loss (the node says it, but people still hit it) and the "Instant-meshes failed to remesh" ValueError when vertex counts don't line up. If you're after a clean base mesh for re-texturing and don't care about Instant-Meshes specifically, the meshlib decimators are the more predictable path. Reach for this node when you specifically want uniform quad-ish remeshing - and check the output before you build a workflow on it.

CategoryHunyuan3D21Wrapper

Inputs (7)

NameTypeDefaultDescription
trimeshTRIMESH
merge_verticesBOOLEANtrue
vertex_countINT10000100–10000000
smooth_iterINT80–100
align_to_boundariesBOOLEANtrue
triangulate_resultBOOLEANtrue
max_facenumINT400001–10000000

Outputs (1)

NameTypeDescription
trimeshTRIMESH