Skip to content

Conversation

@JBKacerovsky
Copy link

Small changes to fix texture loading errors that caused crashes when converting some glb models loaded with trimesh to pyrender scenes using pyrender.Scene.from_trimesh_scene

  • material.py: updated baseColorTexture.setter to check for "L" and "LA" mode textures and convert them to RGBA (avoids ValueError('Cannot reformat 2-channel texture into RGB') for greyscale baseColorTextures
  • utils.py: updated format_texture_source to handle bool textures to aviod TypeError('Invalid type {} for texture'.format(
    type(texture)

convert PIL mode "L" or "LA" to "RGBA" for basecolorTexture
added condition to handle bool array textures in format_texture_source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant