Seamless Cave Tiles

1. Start with a square. Add several horizontal splits (choose the left and right edges and Subdivide Multi. Here I did "7" to make eight quads.)

2. Unwap now! This is the main trick: unwrapping while it's a simple geometry. In Blender: UV Unwrap -> Project From View (Bounds). Because our unwrapping is square and to the bounds, any seamless texture will work!

3. Switch to Side view. Move each segment to form the basic profile outline of the cave.

4. Make two duplicates of this wall. Split them vertically. We're going to make the basic corners with these.

5. Switch to Top view. Rotate one edge 90 degrees and the center split 45 degrees to form the convex and concave corners. Take care to make sure the outer edges will line up with other wall pieces.

6. Try several arrangements to make sure everything is lining up properly. If everything looks good, save these pieces -- they will be the bases to make new wall variations.

7. Now the magic. Take a copy of the straight wall. Select the horizontal edges only....

8. Use the Mesh tool "Fractal". Here I did a Fractal of 25.

Note: Sometimes Fractal will use the same random seed; if you repeat the exact same steps you might end up with identical walls. Without knowing a better way, I would sometimes Fractal, Undo, Fractal, Undo, etc. several times to make sure I was not repeating previous walls.

9. Once again, select every edge that is not on the right or left slices.

10. Fractal (25) again. Repeat 9-10 as necessary. Experiment with various Fractal options to get smoother or rougher walls.

11. If we look back to UV view, we see the left/right slices are perfectly in place and the middle is all messy. Tweak if you want, but the left/right edges are the important, seamless ones.

12. Now, I "Set Smooth" the mesh and Add Modifier -> Edge Split. Experiment with a Split Angle that works for the rough/smooth levels you want.

13. Add a seamless texture and try a line of walls. If you don't like what you see, go back to step 7. Keep trying until you get a combination of fractal settings you like.

And that's basically it. The corners work the same way -- leave the outer edges untouched so they line up with other tiles, and use Fractal to add noise to the middle of the mesh walls. Note that because the corners start off with that middle vertical slice, you may have to Smooth that vertical line a couple times during your Fractals.

Go to OpenGameArt.org to see a full set of these cave tiles..


Written by Clint Bellanger. Released under CC-BY-SA and the GFDL.