Procedural generation of cavern floor for 3D printing I have started out creating a texture that I'm using to displace a mesh to create a cavern floor texture for 3D printing D&amp;D floor tiles. The texture looks like this.


This results in a nice model that looks like this.


I've started using displace and boolean modifiers to chop up this 4x4 grid to make somewhat random passageways, but I'm now realizing that these same shapes are going to be in every tile and am wondering if there is a way to procedurally generate shapes like these.

I've started by creating an 8-sided plane on the surface. Then I've added two displace modifiers. One X axis and the other Y axis. I use the built in noise texture to displace each vertex in the n-gon. I then use the subdivide modifier to smooth out the n-gon and make it look more like an amoeba like in my original texture. I then use the solidify modifier on the n-gon to give it thickness. Finally I use an array modifier to make stacked copies using an object offset scaled at 90% and vertically offset in order to get the shrinking layer affect.



As you can see, the problem is, each layer is an exact copy of the layer below, just a bit smaller. I'd love to get some variation in the shape and maybe even number of "blobs" on each layer. Just as long as an upper blob doesn't overhang a lower blob.

Can any of you clever Blender users think up a way to procedurally generate something like this so that I can generate new shapes by quickly modifying something? With the noise generator it randomly changes things each refresh. With other generated textures I had to move a reference object. Either way works for me because it is so much easier than hand-drawing new textures.

The shape layers should ideally be on a multiple of 0.2mm because that is the layer height I'm using to 3d print these models. Each shape layer can be a 1 or more print layers thick. Also, I'd like each square to have shapes that terminate at mostly the same height so that minis can easily rest on top. I want each shape to fit within each square in the grid and I don't want shapes to be cut off by the grid because that looks ugly and inorganic.

Maybe make a random hill shape and then somehow slice it into layers?

Is this something that is too difficult for the modifiers and should be done with a python script?

All the best,
Brian
I found a way that works for me. I'm sure it could be made better with a few tweaks but I'll describe what I did. Essentially I want to generate topographical elevation lines on an arbitrary surface and then thicken the planes defined by those topo lines. Here's what I did.
I used a Voronoi texture, using distance squared and modified the ramp properties to invert the image and set the color stops to .35 and .5. I used an empty object scaled at 40x to map it to a displacement modifier. I could add a noise displacement modifier to this empty object to get the pattern to vary randomly if I wanted to.

Before applying the displacement modifier, I weighed the vertices based on their proximity to the edges of the tile. This kept from having ugly abrupt edges. I applied this displacement to all of the non-edge vertices in my surface plane. I then added a Laplacean Smooth to the same inner vertices. I hit it pretty hard with a Lambda Factor of 5 and Repeat 10.

Once I got the undulating surface looking good, I hit it with a Boolean Intersect with an object consisting of planes at every height that matched where I wanted a topo line. Finally I took this and solidified it up to the next topo surface. (You could also solidify it down if you wanted to.)

I then add the simple square base underneath and I'm set. This seems to be relatively simple computationally and gives great results. There are just two problems. Or maybe just one. Since the set of topo surfaces are all one object, the distance between them has to be the same so that when I solidify, the new surface can be coincident with the adjacent topo surface. So I grow each surface until it exactly reaches the next topo surface. This results in coincident surfaces though, which isn't really a clean model. Most slicers seem to do okay with it, but it nags me a little.
Likewise, if I wanted to vary the distance between topo surfaces, I could solidify down beyond the adjacent topo surface. But then I would have self-intersecting solids, and I know slicers don't usually like that.
Is there an easy way to somehow combine these individual, possibly intersecting tiers into one non-self-intersecting object using modifiers?
Honestly the coincident surfaces and even spacing of the topo lines aren't deal-breakers for me so really I'm okay. It's just a nagging little thing.