I am coming to the end of my voxel generation application written in c++ using exprtk and Qt, and have found what I have created may not be suitable to port to blender as an addon as intended. However I am thinking that the voxel data that is generated may be able to imported into Blender as a surface via creating a bridging addon and have a surface generated from voxel data using a marching cubes algorithm present within blender.
Some of Blenders functionality look very voxel like and converting voxel data to surface data like in the sculpting module.
Last year when I looked at the Blender 2.80 beta source code I could not find any marching cubes implementation present.
Does Blender have a marching cubes implementation present that can be accessed and used ?
I believe the remesh modifier has one.
Blender does, it’s used for meta-balls, see:
However you’re probably best of looking into OpenVDB, which Blender now uses for some remeshing methods.
Thanks for the information.
I had a suspicion metaballs used voxels in some form to create meshes.
I have looked at OpenVDB some months and may do so again. At the time I think it did not fit in with what I was doing. I did create a marching cubes procedure that worked when I was doing some testing in Unreal Engine, but it was slow. I installed Cuda a couple of weeks ago, and it has a parrallised marching cubes demo that I will also look more closely at.
Thanks for the help.
I’ve found a python implementation of the marching cube algorithm in Sverchok’s github repo (https://github.com/nortikin/sverchok/issues/1549).