2
$\begingroup$

So people have had similar problems showing colors on .ply files here and here but I don't think this is the same case. I've exported a .ply file from a program called paraview with color info on it. I've uploaded the file here and as you can see, the color info came with it.

But for whatever reason when I import it into blender and go look for the per-vertex color info where I would expect to find it, its empty: enter image description here

Am I doing something wrong? It seems like there had been a problem with importing .ply color for a bit in 2.80, but this is 2.81. I would assume it was fixed?

$\endgroup$
2
  • $\begingroup$ Downloading requires an account, therefore I haven't tested it yet, but by the looks of it it's only vertices and no faces correct? $\endgroup$
    – Robert Gützkow
    Nov 14, 2019 at 18:55
  • $\begingroup$ I believe so, think its no faces $\endgroup$ Nov 14, 2019 at 19:02

2 Answers 2

3
$\begingroup$

Blender's ply importer only adds vertex colors when they are part of a face or triangle strip. You can see this in the source code of import_ply.py.

mesh_colors is the list that collects the vertex colors. The assignment of values to mesh_colors and the indices to mesh_faces happens in the add_face() function. This function is only called when a b'face' or b'tristrips' is encountered in the ply object. Only when mesh_faces is not empty and the required color channels are present the new set of vertex colors is created through mesh.vertex_colors.new(). Therefore vertex colors are only imported if the colored vertices were part of a face.

$\endgroup$
2
  • $\begingroup$ Is there a way to get the colors for just points? Or am I out of luck? $\endgroup$ Nov 14, 2019 at 19:46
  • 2
    $\begingroup$ You could try add-ons. I haven't tested it, but this one is supposed to work with .ply point clouds: github.com/uhlik/bpy $\endgroup$
    – Robert Gützkow
    Nov 14, 2019 at 19:50
1
$\begingroup$

You can set the material to use vertex color in the Node Editor or by selecting it from Surface > Base Color.

Make sure your view is in Material Preview or Render mode (Z for shortcut) to see the changes.

Set Vertex Color

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .