Scripting of Voxel data volume render

I need some help with a data visualization project. I’m new to Blender and am awed by the sophistication and quality possible with it. What I’d like to do is use Blender in my data viz project, so that it takes three data sets as point clouds, creates volumes for each, and renders them as three successively larger volumes with a transparent voxel data render, much like I’ve seen here:

I tried hacking through it myself using some good forum posts here as a guide. It seems doable, and fairly straightforward but I’m afraid i won’t have time to learn it. I’m looking for someone to take on the scripting portion, preferably Python, so that I can automate the import of the point data set, generate the Blender model, and export it as .obj

I’ll do the numbers to generate the point cloud, you do the scripting to automate it on a headless Linux server. I’m open to suggestions on the approach, this is just what I’ve come up with so far.

PM me if you’re interested. This is a paid job, and I’ll need to see your portfolio, and get an estimate from you on pricing and time to do this.


Well, I didn’t get much of a response. Maybe this isn’t the right forum. It looks like the best Blender forum out there. I’ll give it some more time to see if there’s interest. In the meantime, if you think this type of job should be on another forum, that feedback would be appreciated too.


People might be confused about what you want. Is the job to take a point cloud from an existing file, generate a mesh representation, and then export this out to OBJ format?

Do I get it right, you need to make a solid mesh out of point cloud data.
Voxel -> Polygon?

Cube marching algorithm is your friend. Easy as pie. The density values of the 3d density function is replaced with predefined polygonal shapes, based on the current and adjacent density values.
If the underlaying voxel data isn’t changed for realtime display, the datastructure doesn’t have to be too sophisticated either.

Parse it, get the density values for the cubes, stitch the mesh.

Thanks everyone. I didn’t describe it well. Yes, @arexma, I have a process already that will generate a 3D point cloud of several enclosed shapes. I need to take those, generate meshes from them, apply textures and color parameters, and export it all as a .obj. I’ll check out cube marching. Thanks! If this explanation makes it easier for anyone to earn some cash helping me through this, I’m still game.

The maching cube algorithm is quite easy, but hard to grasp, and badly documented.
Basically it’s the extraction of isosurfaces from a three dimensional scalar field using it’s density.

You have a 3d grid representing the density as voxels. You parse this grid with a vertex grid, and depending on how many vertices of those parsing/marching cubes are inside the isosurface, you get a matching part of the polygon surface.

As with 8 corners of a cube you can have 2^8 cases, resulting in 256 cases matching the “lit” vertices.
This is handy for several reasons, you can use bitarrays for the voxeldata, and bitarrays for the cube cases, which immensly speeds up the process.

Out of this 256 cases, there are originally 15 matching cases of polygons to fill the cube. Those 15 cases can be inverted and mirrored along their axis to produce those 256 matches.
One problem in the original implementation from 1987(!) creates ambiguous cases, possibly producing holes. There are several dissertations out there, enhancing the original implementation to prevent that. You might want to google for transvoxel implementations, or a combined marching cubes-marching tetrahedon implementation, where the corners of the cubes are parsed with tetrahedons.

A lot of possibilities, and with todays memory bandwith and cpu speeds there are lot’s of possibilities, not to mention you can do a lot on the GPU.

But it’s not an easy task nonetheless. I am currently attempting to write an infinite transvoxel landscape engine with adaptive LOD and it’s going along slooooow.

But, for your case there’s very easy C++ source available, public domain, ready to use. You just need to enhance the code to feed it your pointcloud data:
(only needs glut/freeglut)
If you want I can provide a compiled .exe

Here’s information on the original implementation:

You could also consider to simply use a 3rd party tools like Meshlab (which is FOSS):

One problem is the correct implementation of marching cubes for real pointclouds. It works really great for real voxels occupying the grid densly. I guess for pointclouds you’d have to create a 3d grid of dense voxels, and give them a density value based on the amount of points inside the cube, and then use a linear interpolation to match the triangles along the edges of the marching cubes, intersecting the “iso surface”, which is a non trivial matter and could be used to write a dissertation :smiley:

Awesome info @arexma. Thanks! I’m checking out MeshLab now, and it looks like it might do the trick.