3D Membrane System

I wanted to make this thread for an issue I have decided to personally tackle and that is the generation of a 3D Membrane. So far I have come up with these solutions:

First solution involves using an Edge Detection Function (which i’ll likely have to write) to generate vertices (dots which connect to form triangles) that form half the outline of your cell’s membrane. Then those vertices would be duplicated several times and rotated around the thinnest axis of the shape and connected in such a way to form triangles. I will demonstrate this method manually later today.

  • Biggest issue I forsee is that this will result in perfect symmetry every single time and tendrils/protrusions will have to be marked and handled seperate somehow or else they will just form cones and protruding rings on the cell. However this method I feel will result in things which can be UV unwrapped and auto textured very well. I’ll have to try and find out.

The other solutions is to use spheres which automatically fuse/meld together and form smooth shapes like Z-Spheres from Z-Sculpt. Meshes made this way usually have to be remade in other programs for games so i am unsure if that’s the right way to go but, it’s worth looking into as well.

The biggest reason I wish to do this is so that shaders may be applied to the cells, which will make the game look much nicer. Also animating 3D shapes is easier in my opinion than 2D.

Please give me any opinions or ideas.


As this is about programming (the membrane mesh generation), I changed the category there.

I think this recent idea for how to do it seemed very nice to me:

and also the reply in that thread.

How does your idea differ from that, what are the pros and cons with your system? I got the picture that the convolution surfaces idea would fulfill all of the things the players seem to want the membrane to do.

My first method is completely different and generates a usable mesh straight away from the outline of all the hexagons using vertices.

My second method is the convolution ball method essentially. Meshes made that way are usually very poorly optimized models and must have their detail baked to a lower polygon mesh.

Pros of my first method:
*Should generate an optimized model
*uses the hexagon system already in place
*Proper texture files can be generated easier

*perfect symmetry
*tendrils and protrusions made from hexagons not along the long axis will have to be handled seperate

So to show my method I went into my 3D program and took pictures of the various steps my function will have to go through in order to create 3D shapes from hexagons like the following:

Currently, such a configuration of hexagons produces this:

Obviously not even close to the shape we wanted. So what we will do to remedy this is we will trace the outline of the hexagons and identify the outer most vertices just like this:

This will give us a loop of vertices shaped like this:

Not terribly impressive but with just a bit of subdivision and math:

Not bad. Not bad at all. But it’s not 3D. This is where things get a bit tricky. Currently, the one solution I have found is to simply chop the loop in half, and place a duplicate of that half every 45 degrees around the long axis of the shape giving us:

and if we connect the vertices to form faces along with some subdivision:

We have achieved 3D. The primary advantage of this method is geometry. The geometry of this mesh is essentially perfect for manipulating/deforming which makes things like UV Unwrapping for textures (or even adding animation) very easy:

However this method is not perfect. The cons include not really being able to do asymmetry and things like tendrils or bumps become shapes like this concave section at the rear:

Overall however it’s a workable solution that I think can be improved, and if nothing else the Edge Detection may come in handy.

1 Like

So I wasn’t going to say anything until I was actually done but, I figured this is important to mention and things are moving along where I feel confident sharing this.

I have more or less decided on a new method and it (so far) seems to be the way to go. The method essentially involves generating 3D shapes according to patterns in the hex grid and then uses the Marching Cubes Algorithm to create a single mesh from those shapes. I am currently developing a Prototype in Godot for it and will release it and explain it deeply at a later date when I feel comfortable.

Once the Prototype is complete, I will go about putting it in the main game, and we should have 3D cells with little change to the mechanics of the current editor.