Rendering point cloud with color


(Juki) #1

I have tried to find a way to render a point cloud with color information preserved but the solution has eluded me so far.

The source data is a ply-file with vertex coordinates and their colors. There is no face data for that and I don’t want to generate such data either because I need to work with vertex data only. However, I would love to actually see the actual vertex colors so that I can more easily find the correct vertices in the Blender.

Blender doesn’t seem to want to render plain vertices for me so I have tried extruding the vertices and generating wire material for rendering purposes with vertex colors. However, everything seems to be completely black when rendering and colors are not shown anywhere else either. I think my color imports are correct as I have exported the model using Meshlab and it does show the correct vertex colors. And in my experience at least mesh data exported from Meshlab has correctly preserved vertex colors on Blender import.

I have also tried duplicating a base object using DupliVerts-functionality but I can’t seem to find a way to propagate original model’s vertex colors to the generated child objects in any way.

Is there a way to actually see vertex colors in Blender somehow if I have only a point cloud?


(Juki) #2

Hmm… it seems like I don’t have the vertex colors correctly imported after all. I managed to almost get what I wanted by extruding first in z-axis direction to create edges from vertices and then extruding the second time in x-axis direction to create faces of these edges. However, all the vertex colors seem to be white after this operation. Not even the first corner has the correct color. I don’t know how cloning a vertex by extruding handle vertex colors, I just hoped it would clone them.

Would it be possible that Blender .ply import script would only import colors of the faces and not at all for the vertices alone? Or am I assuming wrong things here.


(Juki) #3

After diving into Blender Python API documentation and reading the importer code, it seems to me that Blender only stores vertex color information per face, not per vertex itself. It does make sense as you can then have different vertex colors on neighbouring faces in the models. Could someone confirm if this really is the case?