2
$\begingroup$

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&D floor tiles. The texture looks like this. Sample Cavern Floor Texture

This results in a nice model that looks like this. Cavern Tile Rendering

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.

First Attempt

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

$\endgroup$

2 Answers 2

3
$\begingroup$

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.

Voronoi texture for my displacement modifier

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.

Modifiers

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.)

Smooth Tiers

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.

$\endgroup$
1
$\begingroup$

You can use a vertex group proximity modifier to affect arrayed meshes in different ways depending on their position.

enter image description here

Here I've used a vertex group proximity modifier to edit a vertex group such that the following wave modifier affects only the second layer, not the first layer.

Blender has other random-ish textures besides the noise texture. The clouds texture is random (noisy) in nature, but deterministic-- it won't change from render to render. Here I'm using it with global coordinates, so that my object's position in world space acts as a random seed.

enter image description here

The displacement won't change so long as I keep my model in one spot, but if I duplicate it and move it off to the side, I'll have a new seed, different displacement.

By using a boolean on my tile, I can ensure its mesh doesn't leave certain bounds.

enter image description here

The tile-defining transparent cube prevents my arrayed mesh, displaced in Y by randomness, from leaving the bounds of the tile. The cube limiting the tile size itself could be edited or even randomized.

enter image description here

Here I'm using a vertex group limited simple deform on the boolean target, which affects where the tile gets cut. Using vertex groups can ensure the the deformation only applies above the floor.

I can project my planes onto the surface of another object to ensure flatness, using a shrinkwrap modifier.

enter image description here

Here, I've given my margin one vertex group, left one loop of edges ungrouped, and assigned my inside to a second vertex group. The modifiers project my margin downwards, my inside upwards, and leave the area between unaffected.

$\endgroup$
3
  • $\begingroup$ I haven't used the vertex group proximity modifier before. Are you saying it could be used to only displace the vertices that are on or near a plane? So I could use that after I have my duplicate/smaller copies? Very interesting. $\endgroup$
    – TheRooster
    Commented Jun 26, 2018 at 18:41
  • $\begingroup$ Yeah, you can use it for that. Here, I'm using it to modify the arrayed copy but not the original. It has quite a few options, and its worth reading about and playing with. $\endgroup$
    – Nathan
    Commented Jun 26, 2018 at 18:53
  • $\begingroup$ This was really helpful. I was able to get something similar working by using a simple deform and stretched by ~-2. The shrinkwrap would probably work better. However, the results weren't very pretty because the plane was subdivided into a high resolution grid, but the edges of each plateau ended up looking like pixels or voxels. I was able to smooth them out, but the processing power required to calculate each iteration was pretty big. I came up with another solution that actually works pretty well. It's not perfect, but it is acceptable. I'll explain it in another comment with pictures. $\endgroup$
    – TheRooster
    Commented Jun 27, 2018 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .