Nodes/ComfyUI-ComfyUI-Hunyuan3DWrapper/Hy3D Mesh Vertice Inpaint Texture
ComfyUI Node

Hy3D Mesh Vertice Inpaint Texture

The mesh-aware texture filler that knows where your triangles are

By kijai·Created 2 years ago·Updated 5 months ago· 1,033
Hy3D Mesh Vertice Inpaint Texture
  • texture
  • mask
  • renderer
  • texture
  • mask
  • renderer

The paint stage of Hunyuan3D never covers the whole mesh, and the gaps are exactly where you don't want them. Hy3DMeshVerticeInpaintTexture is the pack's smarter answer to filling those holes: instead of smearing pixels in flat 2D like the CV2 node, it uses the actual mesh geometry to fill the texture, so color flows along the surface instead of across the UV islands.

It earns the name "vertice" inpainting because it works with the renderer's vertex data. It reads the mesh's vertex positions and UVs (vtx_pos, vtx_uv) and the face indices (pos_idx, uv_idx) straight off the MESHRENDER object you pass in, runs the fill, and hands back a cleaned texture plus an updated mask.

Inputs and outputs

Three inputs, all from the nodes you already have in the texture chain:

  • texture (IMAGE) - the baked texture from Hy3DBakeFromMultiview.
  • mask (MASK) - the bake's mask, marking where the texture is valid.
  • renderer (MESHRENDER) - the renderer from Hy3DRenderMultiView, which carries the mesh geometry and UV layout this node needs.

Outputs are texture, mask, and the same renderer passed through. The renderer pass-through matters: you typically chain Hy3DBakeFromMultiviewHy3DMeshVerticeInpaintTextureHy3DApplyTexture, and Hy3DApplyTexture needs that renderer to bake the finished texture back onto the mesh.

The hidden dependency

This is the node the README warns about. The actual fill runs in a compiled C++ extension, mesh_processor.pyd, which kijai ships prebuilt in the repo for Windows Python 3.12. If that file isn't present or doesn't match your environment, the fallback runs on CPU - and the README is blunt that it's much slower. The vertex inpainting is its own node precisely so you can bypass it in the worst case; the downside is worse filling of the texture, not a broken graph.

So if this node crawls, check that hy3dgen/texgen/differentiable_renderer/mesh_processor* exists. If it doesn't, either rebuild it (python setup.py build_ext --inplace in that folder) or fall back to the CV2 inpainter and accept the smear.

How to use it

Run it once after the bake, before the CV2 polish. The typical chain in kijai's example workflow is:

Hy3DBakeFromMultiviewHy3DMeshVerticeInpaintTextureCV2InpaintTexture (light cleanup) → Hy3DApplyTextureHy3DExportMesh

One pass of vertex inpainting followed by a cheap CV2 pass looks noticeably cleaner than CV2 alone, especially on organic shapes where the missing areas are large. Install-wise it ships with the pack (ComfyUI Manager, search "Hunyuan3DWrapper", or clone the repo into custom_nodes); just be ready for the mesh_processor build step on non-Windows setups - that's the one piece of this node that's genuinely fiddly.

CategoryHunyuan3DWrapper

Inputs (3)

NameTypeDefaultDescription
textureIMAGE
maskMASK
rendererMESHRENDER

Outputs (3)

NameTypeDescription
textureIMAGE
maskMASK
rendererMESHRENDER