"Dynamic" cave creation?

I’m starting to learn slowly UE4, having worked with other engines before i see alot of promise in this, but i wanted to do something i’ve never done before so i started out creating an outdoor scene, just doing some REALLY basic stuff to get my feet wet, i began making this cave


As of now i have finished the cave, added a few other things, but the way i’m doing it, is using a single rock model, and rotating/positioning it in different ways to add some sort of variation. So my question to the community is, what is your…more optimized way of doing something like this? because with the small cave i’m sitting at more than 100 models alone just for the walls, there has to be a cleaner way at creating something like this while still remaining dynamic, i didn’t really want to create an entire cave in max and import because then i only have that one cave and cannot create others different from it…idk, just wanted to hear everyone’s thoughts on this

Well, you could always do what they did for Oblivion and create separate wall pieces for the insides of the caves for variation, then you could build a cave in the editor using the pieces, and add bigger rocks for variation. I think a lot of Unity dungeon builder packs did the same thing, just make some modular pieces you can snap together in the editor.

Using cave pieces like puzzle is a good, but old approach, i think its better to blockout the whole cave in dcc or using brushes and then work on the insides with ue.
Thats how i would to that probably.

UE4 does it the same way in their effects demo, just lots of large cave pieces stuck together to form environments, but with a stable/semi-flat floor. It’s actually more efficient than you might think, if you make them well, you can recycle them for use elsewhere in your projects. Be amazed what some slightly different textures and materials can achieve. Obviously this saves you memory and hard-drive space.

However, if you’re looking to optimize towards the end of a project, you could always export the meshes you’ve placed to 3DS and erase all the occluded faces and verts, and export it as one mesh to replace all the ones you placed. So long as you don’t alter your UV-mapping you could then import the cave in fewer pieces, but you’ll loose that recycling ability. It might make your level run slightly quicker, but static meshes don’t have much overhead, so all you’ll save is some memory for the meshes really.

Yeah all of these are good options, i wanted to possible use a landscape, and just form it the way i wanted but this doesn’t seem viable trying to meet all the corners and make sure nothing is open might be more of a hassle but would give me more control…i’m not sure yet

I didn’t do any caves since early UDK, but i got quite well optimized pipeline.

First you make blocky shape of your cave out of CSG brushes (build boxes).
Then you export that to max or maya (not sure if exporting like this works for ue4)
Basic idea for first step is to get shape of cave you want with fitting scale.
When you got your boxy cave, you slice is into cubes. Make something like minecraft world.
Or you could just make your boxy cave in minecraft.

With EVENLY sliced cave shape, you load it into ZBrush, subdivide and smooth/ sculpt.

Then you split your cave system along some of those lines that are left from previous step.
If you did even and boxy slicing subdividing should not destroy flow of mesh.

And last: create uvs and its done. Try to make seams only on floor then vertex paint floors and use world coordinate UV material.
This method makes no texture seams for even complicated caves

You may need to go back to ZBrush when you have UVS and add detail to render normal and displacment maps.

Your method using modular cave chunks should actually work well. As long as you use the same static mesh for each piece then the entire cave can be rendered in a single draw call (just as if it was a single mesh) with a significant saving on vertex data that needs to be stored in memory.

I used this tutorial: Hourences.com – Tutorials – Cave Modeling

It was for a school project a few years ago. It was trial and error the first time through but I found it to be extremely fast and effective. Then all you have to do is be creative in how you place props. Use rock meshes to break up the geometry a bit. Good textures and lighting can do a lot to a simple scene.

I don’t have a lot of internal shots because they weren’t needed for the project I did but there are some available here: http://www.mike-z.net/the-lost-cave.html

In any case pros: Fast, simple, can be done with student or trial versions of 3DS max and most other free 3D applications.

Cons: Can result in large pieces of geometry that are difficult to modify at a later time.