Page 1 of 1

Mesh vertex to point cloud conversion?

Posted: Thu Jan 17, 2019 2:47 am
by Stenrik
I need to convert all the vertices of a mesh to points in a point cloud. (Ideally a PLY file, or what a PLY could be converted from.) The colors from the mesh's vertex color channel or texture map must also transfer to the resultant point cloud's colors.

CloudCompare allows conversion of a mesh to a point cloud via Edit-> Mesh-> Sample Points. However, it simply distributes points evenly along the surface. What I need is to simply substitute all vertexes with points, because I want an unequal distribution of points along the surface. The final result is supposed to have a greater density of points where the higher detail areas of the form are, the same way a decimated mesh is composed.

How would I go about doing this?

Re: Mesh vertex to point cloud conversion?

Posted: Thu Jan 17, 2019 8:37 pm
by daniel
You just need to select the 'vertices' cloud below the mesh entity in the DB tree.

If the mesh already has per-vertex colors, then you are good. Otherwise you may have to first sample points on the surface, and then use the 'interpolate colors from another entity' to transfer the colors from the sampled points to the vertices (yes I know it's weird ;)

Re: Mesh vertex to point cloud conversion?

Posted: Thu Jan 17, 2019 9:18 pm
by Stenrik
Edit: Ah, so it was as simple as saving as .ply with the vertices selected! No sampling needed. Cool, thanks.