Nodes/ComfyUI-Hunyuan3d-2-1/Hunyuan 3D 2.1 MultiViews Generator
ComfyUI Node

Hunyuan 3D 2.1 MultiViews Generator

The texturing engine — paint your mesh from a single image, six angles at a time

By visualbruno·Created about a year ago·Updated 5 days ago· 375
Hunyuan 3D 2.1 MultiViews Generator
  • trimesh
  • camera_config
  • image
  • pipeline
  • albedo
  • mr
  • positions
  • normals
  • camera_config
  • metadata
view_size512
steps10
guidance_scale3.0
texture_size1024
unwrap_meshtrue
seed0

Hunyuan3D-2.1's party trick isn't just making a mesh - it's giving that mesh a texture that looks like the object you asked for. Hy3DMultiViewsGenerator is the half of the pipeline that does it. Feed it a mesh plus the image you want it textured like, and it renders the source image from six (or however many your camera rig defines) angles onto the surface, producing albedo, metallic/roughness, position, and normal maps as separate outputs.

Don't confuse it with Hy3DMeshGenerator. That node creates the geometry; this one paints it. In the Mesh_Texturing workflow the flow is: load an existing mesh (Hy3D21LoadMesh), UV-wrap it, pick a source image, generate multi-views, bake them, then inpaint the seams. If you're only ever doing full image-to-3D, this node still appears - the Full_Workflow runs it after decode and postprocess.

The inputs that matter

  • trimesh - the mesh to paint. It should already be UV-wrapped (Hy3D21MeshUVWrap) and reasonably clean, or baking gets ugly.
  • camera_config - the HY3D21CAMERA from Hy3D21CameraConfig, which defines the view angles and their weights. The six-view default rig is the pack's tested setup; fewer angles = faster but patchier coverage.
  • image - the picture whose look you're baking onto the mesh. Same image you fed the mesh generator is the usual move.
  • steps (default 10) - painting diffusion steps. Way cheaper than the shape model's 50; 10 is fine, bumping to ~20 sharpens fine detail if you have the patience.
  • guidance_scale (default 3.0) - adherence to the source image.
  • view_size (512–1024, default 512) - resolution of each rendered view. 512 is standard; 1024 for closeups.
  • texture_size (512–4096, default 1024) - resolution the views get projected onto. This drives final texture quality and memory. 1024 is the sweet spot for most objects; 2048+ is where the bake gets expensive.
  • unwrap_mesh (default true) - re-unwrap the mesh before painting. Leave it on unless you already have a UV map you want preserved.
  • seed - reproducibility.

The outputs

The node returns a pile of stuff, but you'll realistically use three of them: pipeline (the HY3DPIPELINE state object), albedo (diffuse color views), and mr (metal/rough views). The positions and normals maps are diagnostics and leftovers; the camera_config passes your rig through unchanged. pipeline, albedo, and mr wire straight into Hy3DBakeMultiViews - that's the whole job.

Installing it

This node is where the pack's C++ extensions stop being optional. The paint pipeline runs a custom rasterizer and a differentiable renderer to do the view projection and the later inpainting:

cd ComfyUI/custom_nodes
git clone https://github.com/visualbruno/ComfyUI-Hunyuan3d-2-1
cd ComfyUI-Hunyuan3d-2-1
pip install -r requirements.txt
# then the wheels in hy3dpaint/custom_rasterizer/dist and hy3dpaint/DifferentiableRenderer/dist

On Windows, wheels for Python 3.10–3.12 are precompiled. On Linux there's a cp311 wheel; otherwise you compile both extensions with python setup.py install, which is where most texturing workflows die before they start.

Where people get burned

If views come out blank or gray, the rasterizer extension didn't install - that's the #1 symptom. If the texture looks smeared, check that you UV-wrapped before generating views. And remember this node does not save anything: the painted views live in RAM until you bake them. For runs that save state to disk (for upscaling or reuse later), the pack's WithMetaData variants do that instead.

CategoryHunyuan3D21Wrapper

Inputs (9)

NameTypeDefaultDescription
trimeshTRIMESH
camera_configHY3D21CAMERA
view_sizeINT512512–1024
imageIMAGEImage to generate mesh from
stepsINT101–100Number of steps
guidance_scaleFLOAT3.01–10Guidance scale
texture_sizeINT1024512–4096
unwrap_meshBOOLEANtrue
seedINT00–18446744073709550000

Outputs (7)

NameTypeDescription
pipelineHY3DPIPELINE
albedoIMAGE
mrIMAGE
positionsIMAGE
normalsIMAGE
camera_configHY3D21CAMERA
metadataHY3D21METADATA