Nodes/ComfyUI-ComfyUI-Hunyuan3DWrapper/Hy3D Set Mesh PBR Attributes
ComfyUI Node

Hy3D Set Mesh PBR Attributes

Tune the material knobs — how shiny, how metallic, how emissive your mesh is

By kijai·Created 2 years ago·Updated 5 months ago· 1,033
Hy3D Set Mesh PBR Attributes
  • trimesh
  • trimesh
baseColorFactor1.00
emissiveFactor0.00
metallicFactor0.50
roughnessFactor0.50
doubleSidedfalse

Hy3DSetMeshPBRAttributes is the scalar side of Hunyuan3D's PBR material control. Where Hy3DSetMeshPBRTextures stamps whole maps onto a mesh, this node sets the numbers that scale those maps - the classic glTF material factors. Metallic, roughness, emissive, base color intensity, and whether the material is double-sided. Five sliders and a toggle, and your mesh's physical feel changes completely.

It's the kind of node that feels like nothing when you first see it and then becomes your favorite polish step. A baked Hunyuan3D texture comes out with whatever defaults the pipeline chose; one pass of this node turns a too-glossy floor into matte, pushes a prop into "clearly metal," or makes an emissive element actually glow. And because it's pure material math, it's instant - no model, no sampling, no GPU load.

The five knobs

  • baseColorFactor (default 1.0) - scales the base color brightness. Drop toward 0 to darken the whole surface uniformly.
  • metallicFactor (default 0.5) - how metal the surface is, 0 = dielectric, 1 = pure metal. Hunyuan's default of 0.5 is a middle ground; real materials usually want to pick a side.
  • roughnessFactor (default 0.5) - how rough, 0 = mirror, 1 = matte. This is the one you'll fiddle with most, because "why is my asset so shiny/washed out" is usually a roughness problem.
  • emissiveFactor (default 0.0) - glow intensity. Off by default; crank it only if your emissive texture map actually has something in it.
  • doubleSided (default off) - render both faces of the geometry. On fixes meshes that show black backsides; off is faster and usually correct.

All three color factors write as a uniform RGB triple, so you're setting intensity, not hue - for actual color edits you're back in Hy3DSetMeshPBRTextures territory with an image.

How it works

It copies the TRIMESH, then assigns each factor straight onto the material: baseColorFactor as an RGBA triple, emissiveFactor as RGB, plus the metallic/roughness scalars and the double-sided flag. Output is the edited TRIMESH. Standard chain: after bake/apply, before export - or even after export-adjacent nodes, since it's cheap to re-run.

Install

Pack-level clone (Manager search "Hunyuan3DWrapper", or git clone https://github.com/kijai/ComfyUI-Hunyuan3DWrapper, then pip install -r requirements.txt). Nothing beyond trimesh is needed here - the compiled-dependency pain lives in the render/bake nodes, not this one.

Common issues

  • Looks the same after setting values - check that a texture map is actually set on the mesh and that your viewer respects PBR factors (many quick previews ignore them). Also confirm you're not being shown vertex colors instead of the material.
  • Metal everywhere - metallicFactor 0.5 on a fully textured prop is a strong default. Set it toward 0 for non-metals; the base color map does the rest.
  • Holes where you can see through - you want doubleSided on, or the geometry genuinely has no back faces. Toggle it and see which.
CategoryHunyuan3DWrapper

Inputs (6)

NameTypeDefaultDescription
trimeshTRIMESH
baseColorFactorFLOAT1.000–1
emissiveFactorFLOAT0.000–1
metallicFactorFLOAT0.500–1
roughnessFactorFLOAT0.500–1
doubleSidedBOOLEANfalse

Outputs (1)

NameTypeDescription
trimeshTRIMESH