trimesh icon indicating copy to clipboard operation
trimesh copied to clipboard

How to get color when loading a mesh?

Open zhaoyuanyuan2011 opened this issue 3 years ago • 1 comments

I'm trying to load colors from a COFF file and an example row in it is: 0.0487114 -0.456213 0.216446 89 71 57 255 . The first three are xyz and I believe the last four elements are the color for the vertex. I also tested with open3d and it returns true with the has_vertex_colors method. But when I load the color with trimesh.visual.vertex_colors, it always give me an array with [102 102 102 255] in all rows. I'm wondering how can I get it's vertex colors using Trimesh?

Thank you!

zhaoyuanyuan2011 avatar Jul 20 '22 08:07 zhaoyuanyuan2011

Hey, vertex colors in OFF files aren't currently implemented. PR's welcome if you can find a nice way to vectorize the loading!

mikedh avatar Aug 08 '22 16:08 mikedh