Updating this because, I just kinda forgot about this thread lol:
So as many of you know I changed up the algorithm quite a bit. First big difference is instead of using simple Primitives, I will be using Signed Distance Functions, essentially simple equations that define the points of space that are below or above a certain surface. You can find a more detailed article here:http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/
Next big difference is I decided to use Convolution Surfaces after all. Initially, I was very against using them for a very simple reason; they are usually very slow. This is because you have to do so many calculations, you have to do equations like the SDFs mentioned before, then you have to do a sort of smoothing equation/algorithm, then on top of all of this you have to use a very heavy/slow algorithm to actually generate your data like Marching Cubes or Dual Contouring. Originally, I tried optimizing everything to where almost all of the work load would be on the Marching Cubes step of generating the mesh (hence using premade primitives with a simple smoothing algorithm of some sort, and making the 3D grid for Marching Cubes low enough resolution to do some smoothing of it’s own) however, my findings were basically that despite working ok, most of the speed loss was coming from the Marching Cubes algorithm to the point where the SDFs or smoothing honestly wouldn’t slow things down at all in comparison if you do it right. Marching Cubes, although very simple to implement and decently effective has many inherent inefficiencies and the meshes made by it are from far ideal in geometry. This lead me to scour the internet and Computer Science articles looking for a solution I may not have seen before. That’s how I found Del-Iso.
Del-Iso is a very sophisticated isosurface meshing algorithm which descends from Delaunay Refinement. It builds from a process that has actually existed for a while and is pretty well known and that is the combination of 3D Voronoi Cells and Delaunay Triangulation to generate surfaces. However those algorithms are notoriously slow and are bottle-necked by the data generation portion of the algorithm (this is basically why before Del-Iso, even the worst Marching Cubes style algorithm was faster) Del-Iso solves this by optimizing the data generation portion in a fairly clever way that is best explained in the original article:
So, I know what you’re thinking “Ok, but how much faster can this really be? Wouldn’t the SDFs still slow things down?” . Del-Iso is 3 - 4 x faster than the prior algorithms, at worst it’s 1.5 x faster. This is blisteringly fast and is the difference between seconds and milliseconds in some cases. What’s more is, there are many obscure improved models of this algorithm if you look hard enough or simply write the code better and make good use of modern hardware (Del-Iso is over a decade old) you can get even more speed. In essence, the SDFs wouldn’t add much time in comparison to other algorithms simply because this one is so much faster.
Below I have basically the main comments I wrote down in my current code to help guide my development and I think it sums up the algorithm for the entire script well enough (though I’m sure there’s stuff missing or vague since I wrote these before starting to code):
//find center mass hex, this is (0,0)
//create SDF (Signed Distance Function) at (0,0), radius initialized at 1
//sort the list for organelle positions so they can be checked
//loop checks if the SDF radius can be increased, preventing the need for many to form mesh
//check outside the SDF for extra organelles
//create SDFs at groups of extra organelles
//use SDF qualities to make bones for animation
//run SCALIS algorithm on SDFs to make the isoSurface
//create points along isoSurface for use in Del-Iso
//run Del-Iso algorithm
If you have any questions please ask