Rendering Coloured PLY Point Cloud in Blender

add-ons

(Bryce Twyman) #1

I came across this video on Vimeo the other day: https://vimeo.com/290181848

I was intrigued as to how this was achieved, and in my impulsive search for answers I came across photogrammetry and the point cloud that is generated from the process. I’ve concluded that this is how it was done.

I’ve since managed to produce my own point cloud scene through photogrammetry, and have been using Meshlab to visualise it.

The problem here is that I’m having trouble importing a coloured point cloud into Blender that also renders.

Importing a point cloud to Blender ignores colour (it shows as black), and doesn’t show at all when rendering.

I’ve found an add-on that allows me to visualise a coloured point cloud (Point Cloud Visualiser), but it seems that I can only visualise the point cloud using this add-on. It doesn’t show in the render. This isn’t particularly helpful, as I can already do this using Meshlab.

I eventually found this blog post. It explains how to convert the PLY files to a modified PLY file that produces “splats” at each point.

Unfortunately, I’m not a programmer, nor do I have access to a windows computer in order the run the .exe file included in his Github repository.

At this point, it would appear that my only choice is to seek a windows-running PC to convert this file in order to achieve the desired effect.

A few questions:

  1. Do I appear to be on the right track?
  2. Do you feel that following the above linked blog post will work?
  3. To your knowledge, is there a Mac-only way to do this?
  4. Is the process outlined in the above linked blog post something that could be turned into a Blender add-on?
  5. Will there be a way to adjust the size of the points in the same way you can in Meshlab?

(lolwel21) #2

It looks like Blender imports the Point Cloud simply puts all the data as vertices in a mesh, and the color of each point is the Vertex Color of the point. Because of that, rendering directly from the point cloud is impossible.

I would use Dupliverts to get the ‘point cloud look.’ (probably a cube)
As a pointer, to get that cool variation in scale between the points, you’re going to want to convert your point-cloud to a mesh (before importing to Blender is easier).
Then you would use Dupli-Faces and turn Scale on. Larger faces will have larger cubes, and small faces will have small cubes.

Getting the color working is going to be a little trickier/memory-intensive.

For that, you have a couple methods that could work. You’ll have to do a little experimenting to figure out which one works best for you / doesn’t crash because it took too much memory.

Method 1: Point Density
In the material of the cube, put a Point Density texture using the vertices of the point cloud mesh in World space, with the Color property inheriting from Vertex Colors.
You’ll want to play around with the resolution and interpolation, and I would plug the Object Info->Position into the Vector input if you want the cubes to have a solid color.
Use that to drive your emission shader.

Method 2: Data Transfer Modifier
For this, you’ll need to Make Duplicates Real (you will not be able to take advantage of instancing).
Then, join all the instances for easier manipulation.
Use the Data Transfer Modifier to transfer the vertex color from the faces onto the cubes.
In the shader, use the vertex colors to drive an emission shader.