Fix applying PBR

This commit is contained in:
kijai 2025-01-25 19:03:38 +02:00
parent e7badbe79f
commit d454e92b9b

View File

@ -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"),