Memory issue when adding colour as a custom point attribute to mesh
JeffreyWardman opened this issue · comments
Creating a mesh with colour as a custom point attribute results in corrupted, unsorted chunks of memory. It also isn't possible to add RGBA attributes due to having more than 3 channels.
m.add_vertex_custom_point_attribute(data.astype(np.float64), k)
Source of reproducible result:
marcomusy/vedo#934
https://vedo.embl.es/docs/vedo/utils.html#vedo2meshlab
The supported custom attributes for vertices and faces are floats and points (3 floats, xyz).
We cannot add more than that because custom components must have a type that is known at compile time.
The data passed to the function add_vertex_custom_point_attribute
must have #V*3 floats.
@alemuntoni I've also tried simply RGB and it corrupted when passed as float64. I provided a reproducible result in the link.
Sorry, my bad! Fixed, it will work in the next pymeshlab version!
Legendary. Thank you!