Hy3D Get Mesh PBR Textures
Pull the individual PBR maps out of a textured mesh
- trimesh
- image
Modern 3D textures aren't one image - they're a stack. The albedo (base color), the normal map, the roughness, the metallic mask, the emissive, the occlusion. A single baked diffuse map looks flat; a PBR stack can be relit in any engine. Hy3DGetMeshPBRTextures is the node that reaches into a textured mesh's glTF material, grabs one of those channels, and returns it as a regular ComfyUI image you can preview, edit, upscale, or re-apply.
It's the read side of the PBR story. (The write side - stuffing edited maps back - is the pack's Hy3DSetMeshPBRTextures node.) You feed it a trimesh that carries a PBR material, pick a channel, and out pops an IMAGE.
The input
trimesh- a mesh with a glTF/PBR material attached. Where does that come from? Meshes with real PBR materials in this pack come out of the paint pipeline when the model produced PBR channels (Hunyuan3D 2.1's paint model ships metalness/roughness/albedo as a proper material - that's one of the headline features of the 2.1 line). A plain 2.0 bake produces a single diffuse map, so there won't be separate PBR channels to extract.texture- the channel picker, one of five:base_color,emissive,metallic_roughness,normal,occlusion. These map directly onto glTF material slots.
Output: image (IMAGE) - the selected map.
The error to know about
If the mesh doesn't have the requested channel, the node raises a clear ValueError - e.g. "Normal texture not found." That's not a bug, it's the honest signal that your mesh's material doesn't include that map. Check which channels the mesh actually has before wiring five extraction nodes.
Why you'd use it
Two solid reasons:
- External editing. Pull the base color, edit it in an image editor or ComfyUI (clean up seams, repaint a region), then push it back with the set-texture node and re-export. This is the texture-iteration loop without re-running the whole paint pipeline.
- Relighting studies. Grab the normal or metallic-roughness maps to see exactly what the model generated, and decide whether it's worth keeping.
Install
Ships with the pack - ComfyUI Manager, search "Hunyuan3DWrapper", or git clone https://github.com/kijai/ComfyUI-Hunyuan3DWrapper into custom_nodes and pip install -r requirements.txt. No extra dependencies; the mesh just needs to carry the PBR material for it to have anything to pull. And a license reminder since PBR usually means 2.1: the 2.1 model's Tencent license excludes the EU, UK, and South Korea - read it before shipping commercial work.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| texture | COMBO | 5 options: base_color, emissive, metallic_roughness, normal, occlusion |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |