simple marching cubes example (3d noise blobs)


following a discussion on this thread , i started reading about marching cubes.

for those who dont know its a way of creating 3d volumetric shapes. you can read more about it here:

the whole code is based on the explanations and source found here:…-olygonise/

the source is here:

in this example, each vertice gets its value from a perlin noise function according to their position in space. then mouseY controls the perlin noise field complexity, and mouseX controls the threshold value.

it was created in OF0.05, using the VectorMath addon, and the 3dUtils addon for the lights (its included n the source).

you can find some pictures of it here:

1 Like

Cool! This is really interesting. I’ve been meaning to look into voxel rendering as I’ve been pretty interested in using them.

hey man, thats awesome! glad you got it working so quickly!

this looks great !! nice…

I love paul bourke’s site - it’s always great to see his explanations put to use. he’s saved my life on multiple occasions.


  • z

wow, thanks for sharing I will definately make some experiments with this in the near future!

Sweet! I was just thinking about making a voxel renderer myself when I found this! I think I’ll still make my own one though, as I’d like to have the learning experience. I can see a lot of uses for it in the future though

sweet :slight_smile:

Haha, realised that I had already posted in this topic before :stuck_out_tongue:

Anyway, I’ve been thinking of looking into octrees, as this seems like an efficient way of storing the data. I’ve been thinking about the possibility of particle attraction within an octree as well, but I think that the idea that I have in mind would likely take a *lot* of rendering time.

I think that I’ll probably write both a marching cubes renderer as well as a raytracer. I’ll keep you posted :slight_smile: