Saving colors on mesh/polygons?

Feel free to ask any question here
Post Reply
Youngtimer
Posts: 17
Joined: Mon Jun 08, 2015 9:17 am
Location: Nuremberg, Germany

Saving colors on mesh/polygons?

Post by Youngtimer »

Please forgive me if I'm asking maybe another stupid question, but I'm currently struggling with another problem. When I create a mesh based on a point cloud (with Poisson surface reconstruction), I'm asked if I want to import the colors. When I click on "yes", it works and shows me the colored mesh (picture 1). But when I safe this file as an .stl and open it again, I can't see any colors at all (picture 2). Can't this information be stored in this file format, or am I doing something wrong?
Attachments
picture2.JPG
picture2.JPG (67.81 KiB) Viewed 4776 times
picture1.JPG
picture1.JPG (64.52 KiB) Viewed 4776 times
daniel
Site Admin
Posts: 7682
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Saving colors on mesh/polygons?

Post by daniel »

Exactly, neither STL nor OBJ can save per vertex colors (especially not STL which is the worst format ever ;).

You have to save it as PLY or FBX.

P.S.: you should compute the 'density' (see the PoissonRecon plugin dialog) in order to remove the 'bubble' below the car (see the wiki for more info).
Daniel, CloudCompare admin
Youngtimer
Posts: 17
Joined: Mon Jun 08, 2015 9:17 am
Location: Nuremberg, Germany

Re: Saving colors on mesh/polygons?

Post by Youngtimer »

Ok, that makes sense. So I guess I will better save it as .ply... I'll go on and test this.
P.S.: you should compute the 'density' (see the PoissonRecon plugin dialog) in order to remove the 'bubble' below the car (see the wiki for more info).
Oh, I thought that was a normal result :D I've looked at the wiki but I have to admit that I don't know what I should do :D
daniel
Site Admin
Posts: 7682
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Saving colors on mesh/polygons?

Post by daniel »

If you generate the mesh with 'density' information, you'll get a scalar field attached to the mesh with the 'density' of each vertex. The smaller this density, the less likely the vertex is to belong to the real mesh (i.e. because there were too few points - or even none - in the vicinity).

To get rid of those vertices:
- select the mesh and only the mesh
- look in the bottom part of its properties ('Scalar Field' section)
- make sure the 'Density' scalar field is active/visible
- you can play with the interactors over the histogram (the round one let you set the minimum and maximum displayed values). If you move the left-most one to the right, the vertices having a very low density should be hidden. This way you can interactively find the minimum density value that gives a good coverage for your mesh.
- eventually, once you have found the right value, use 'Edit > Scalar fields > Filter by value' to generate a good mesh with the vertices that have a big-enough density (the currently displayed values should be automatically used in this new dialog so that you only have to click on "ok").
Daniel, CloudCompare admin
Youngtimer
Posts: 17
Joined: Mon Jun 08, 2015 9:17 am
Location: Nuremberg, Germany

Re: Saving colors on mesh/polygons?

Post by Youngtimer »

Wow, thanks - that's a nice and useful feature!
Post Reply