Ideas on making caves

Anybody have any experience/ideas on making caves for your favorite 3D software using WM?

I’m going to try making some caves for Unreal 4 by creating a terrain mesh and flipping it back onto the terrain to act as a ceiling.

I’ll post whatever ideas I come up with and if anyone else has some experience with caves, please do share :slight_smile:

I don’t think WM is the right tool for a cave, it generates a heightmap, so it can’t handle these things. You could generate some rough rounded terrain but then you would need a 3d tool to excavate it and create a ceiling.

Indeed, sir, WM is not a 3D modeling program, but it can produce meshes and heightmaps that together, in your favorite 3D modeling program, will produce terrains and ceilings that combine into a cave.

I’ve never attempted this, but I think I’d start with a layout generator to define the “plan view” of the caves. Without some way to force both the floor and roof to meet consistently, you’d have an awful patch job to do. So given a definite outline, you’d want both floor/roof to blend to a fixed height at the outline. Further from the outline, more of the “raw” floor/roof graphs gets used. I’d probably start with a blend to 100% roof at whatever WM scale corresponds to 10 real-work (or game-world) feet, then add a bit of noise to that scale distance.

For the floor and roof, besides general rockiness, you can obviously toss in stalactite/stalagmite spikes. If you want a Hollywood cave, keep the floor and ceiling amplitudes fairly small (so things are flattish). For more realism, I’d add in some substantial amplitude low-frequency noise, so the top and bottom (can) come close enough together to force a crawl or at least a crouch in places.

Getting back to the fixed height. You may get a more realistic look by letting that “fixed” height be some low-frequency noise with amplitude a healthy fraction of the cave interior height. That way the floor/roof seam isn’t so obviously horizontal.

I realize now I’m looking more for a tunnel system, because I’m making maps for Ark Survival Evolved. Also, the tunnels don’t need to look picturesque, but instead need to function as an interesting paths for players to explore when they enter a mountain.

What I have made so far is a system that can generate 1km boxes filled with pathways and rooms. No layouts are used so I can generate a whole new tunnel system with the ‘random’ button.

Not shown is the mesh ceiling output, complete with stalactites, it matches the shape of the underlying floor contours. When placed over the box, the environment is completely enclosed. The peg sticking up in the corner of the box wall matches a similar peg in the mesh ceiling and is used to align them.

The entire box terrain would be placed inside of a mountain in the main terrain. Etrances/exits are created in the Unreal Engine itself, by painting holes in the terrain box walls, and inserting a short mesh tunnel to the outside terrain.

Here’s some ‘hero’ caves I custom made. The caves get covered in a mesh that’s an upside-down version of the caves.

You’ve got me thinking… I’m going to try this in Terragen. I’ll create a simple terrain file. Save it, I’ll press combine in the Terrain box, then hit copy. Invert one layer, then click combine. Have you googled that question? If my idea fall flat on it’s face, I’m sure someone will know somewhere. I remember years ago, mid 2000’s, I created a cave, but that was by rendering two landscaped and flipping one over the other as someone mentioned.