You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to load a GLTF with the option merge_primitives set to True. Once the model is loaded all of the face_colors to all of the Trimesh objects are set to [102, 102, 102, 255], which seems to be some default value set in the ColorVisuals class. I took a look at the code and it seems that the materials of the GLTF aren't loaded into the kwargs when loading with merge_primitives=True. Is that right or am I missing something?
The text was updated successfully, but these errors were encountered:
Okay, so I saw that you have defined an array called face_colors in the ColorVisuals class where you define the color for each face. Would it be possible to have the same thing but instead have the material for each face, as otherwise a lot of the information would be lost? The concatenation of the materials itself is easy, but the tricky part I believe is how you store the materials, as you have thousands of faces per mesh and probably only few materials if not just one.
So would it be reasonable to create a new class inheriting from the Visuals that possibly contains an array of PBRMaterial instances and then another array face_materials that contains the indexes of the corresponding material in the first array? I am down for creating PR for that just want to hear your thoughts about such an implementation.
Hi, so I went a head and implemented a new class that can store materials for each face (#1246 ). There is a lot of things to be done in order to visualize the new visual and etc. but its an initial idea that can be build on. Is it something that sounds reasonable, so that I can polish it a bit and integrate it better with the rest of the library?
I'm trying to load a GLTF with the option
merge_primitives
set toTrue
. Once the model is loaded all of theface_colors
to all of the Trimesh objects are set to[102, 102, 102, 255]
, which seems to be some default value set in theColorVisuals
class. I took a look at the code and it seems that the materials of the GLTF aren't loaded into thekwargs
when loading withmerge_primitives=True
. Is that right or am I missing something?The text was updated successfully, but these errors were encountered: