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?

  • $\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 '19 at 18:55
  • $\begingroup$ I believe so, think its no faces $\endgroup$ – Joe Crozier Nov 14 '19 at 19:02

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.

| improve this answer | |
  • $\begingroup$ Is there a way to get the colors for just points? Or am I out of luck? $\endgroup$ – Joe Crozier Nov 14 '19 at 19:46
  • 1
    $\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 '19 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.