From d454e92b9b4c7adeb7a7320fad4c589287bdbe40 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sat, 25 Jan 2025 19:03:38 +0200 Subject: [PATCH] Fix applying PBR --- nodes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nodes.py b/nodes.py index 5b33ee2..84d793e 100644 --- a/nodes.py +++ b/nodes.py @@ -814,6 +814,11 @@ class Hy3DSetMeshPBRTextures: CATEGORY = "Hunyuan3DWrapper" def set_textures(self, mesh, image, texture): + from trimesh.visual.material import SimpleMaterial + if isinstance(mesh.visual.material, SimpleMaterial): + log.info("Found SimpleMaterial, Converting to PBRMaterial") + mesh.visual.material = mesh.visual.material.to_pbr() + TEXTURE_MAPPING = { 'base_color': ('baseColorTexture', "Base color"),