cnr-isti-vclab / meshlab

The open source mesh processing system
http://www.meshlab.net
GNU General Public License v3.0
4.72k stars 822 forks source link

mesh export removes elements and properties #979

Open christian-rauch opened 3 years ago

christian-rauch commented 3 years ago

I am loading a PLY mesh with vertices and edges (MeshLab 2020.12). The vertices have 3D coordinates and an additional property vector. The edges connect the vertices. The header:

ply
format ascii 1.0
element vertex 4722
property float32 x
property float32 y
property float32 z
property list uint16 float32 descriptor
element edge 4068
property uint32 vertex1
property uint32 vertex2
end_header

This shows correctly in MeshLab, including the edges.

After exporting the mesh, only the vertices with their 3D coordinates are left and the datatypes are changed. The header after export:

ply
format ascii 1.0
comment VCGLIB generated
element vertex 4722
property float x
property float y
property float z
element face 0
property list uchar int vertex_indices
end_header

Is there a way to keep the original data? I actually intended to remove some of the vertices in MeshLab and export the mesh (including all the properties) again, but this already happens without changing the mesh.

alemuntoni commented 3 years ago

Sorry, right now there is no way to keep this data (like the descriptor property in your file example) when importing and then exporting from meshlab. It is a known issue, but it requires to reimplement the ply importer/exporter almost entirely. It is not an easy fix...