Mesh vertex to point cloud conversion?

Feel free to ask any question here
Post Reply
Stenrik
Posts: 6
Joined: Thu Jan 17, 2019 2:41 am

Mesh vertex to point cloud conversion?

Post 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?
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh vertex to point cloud conversion?

Post 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 ;)
Daniel, CloudCompare admin
Stenrik
Posts: 6
Joined: Thu Jan 17, 2019 2:41 am

Re: Mesh vertex to point cloud conversion?

Post by Stenrik »

Edit: Ah, so it was as simple as saving as .ply with the vertices selected! No sampling needed. Cool, thanks.
Post Reply