Jump to content
Vexosaur

Procedural Caves WIP

Recommended Posts

Working on a procedural cave generator using input curves for the base shape and cellular automata. The goal is for them to be game engine ready with textures, what do you think? 

 

 

 

 

gif_01.gif

test_01.jpeg

test_02.jpeg

Edited by Aragatory
  • Like 8

Share this post


Link to post
Share on other sites

Cool stuff!

The biggest challenge are fail cases. Extrude spikes, bad booleans and other degenerate outputs which will break the generator or yield dangerous results that will break the game. It may be hard to create robust generator.

I also found that generator complexity may increase exponentially from adding new features to it.

Edited by f1480187

Share this post


Link to post
Share on other sites
18 hours ago, f1480187 said:

Cool stuff!

The biggest challenge are fail cases. Extrude spikes, bad booleans and other degenerate outputs which will break the generator or yield dangerous results that will break the game. It may be hard to create robust generator.

I also found that generator complexity may increase exponentially from adding new features to it.

Thanks!

I've tried to stay away from methods with relatively high failure rates, so no booleans and only one extrude for the wall mesh. The stalagmites/stalactites are all instanced, so little chance of them breaking (aside from awkward placement). But yeah added complexity might change all this.

Edited by Aragatory

Share this post


Link to post
Share on other sites

very nice :) always good to see more game oriented stuff!

makes me considering revisiting some of my old projects ^^

 

  • Like 1

Share this post


Link to post
Share on other sites

I put together an attempt at emulating this technique. But I am not sure how to implement the stalagtite/mite.

Also probably need a way to detect points with no neighbors and just throw them away.

Untitled-1.jpg

ap_python_cellular_automata_060518.hiplc

Edited by Atom
  • Like 1

Share this post


Link to post
Share on other sites

Nice! I need to start working on mine again, it's been sitting in hiatus for ages. The new poly reduce will be really helpful too.

Share this post


Link to post
Share on other sites

This is a fun one to play around with.

I am definitely getting some UV stretching where the floor meets the walls. That would be right at player eye level too.

Untitled-1.thumb.jpg.d4655a0649360b2a69c931cd51a49269.jpg

I am not a big fan of polyreduce, it seems to mess things up more than fix them. But maybe polyreduce then run it through InstantMeshes to restore the quad topology might be worth trying out.

 

Edited by Atom

Share this post


Link to post
Share on other sites

Yeah, will need to play around. Mainly thinking for it's ability to preserve UVs.

Share this post


Link to post
Share on other sites

Start working on this again. Added some width variation to the input curve, vertical shafts and broken it into segments.

1.PNG

2.PNG

3.PNG

4.PNG

  • Like 1

Share this post


Link to post
Share on other sites

This is really cool stuff. I was wondering if you could elaborate on how you went about creating UVs for this cave system? I'm doing something similar, basically carving out "tunnels" with 3d noise in a fog vdb and then converting to polygons. How the heck would one generate nice UVs for this? Is it even really possible without extensive manual work? I remember reading a paper/article by Ari Danesh a while ago about a procedurally generated landscape with overhangs and tunnels used for a game in Unreal engine that apparently used a procedural UV system. Can't find it any more but I seem to remember he glossed over the procedural UV part anyway...

UVing a procedurally generated complex 3d "swiss cheese" mesh can't be a trivial problem to solve so I'm being realistic in my expectations. But your results look pretty good! Any info or tips gratefully received!

Share this post


Link to post
Share on other sites
On 13/07/2019 at 8:21 AM, vr_voxel said:

This is really cool stuff. I was wondering if you could elaborate on how you went about creating UVs for this cave system? I'm doing something similar, basically carving out "tunnels" with 3d noise in a fog vdb and then converting to polygons. How the heck would one generate nice UVs for this? Is it even really possible without extensive manual work? I remember reading a paper/article by Ari Danesh a while ago about a procedurally generated landscape with overhangs and tunnels used for a game in Unreal engine that apparently used a procedural UV system. Can't find it any more but I seem to remember he glossed over the procedural UV part anyway...

UVing a procedurally generated complex 3d "swiss cheese" mesh can't be a trivial problem to solve so I'm being realistic in my expectations. But your results look pretty good! Any info or tips gratefully received!

Thanks.  I was able to make nice clean UVs for this because the mesh is actually very uniform.  The ground/ceiling is just mapped to a grid based on its position, and the wall the all the strips of mesh that have the same amount of polys vertically.  

For your problem, the best solution I can think of off the top of my head would be group polys based on facing angle/curvature and then breaking those up into more uniform pieces maybe.  You might need to look into generating procedural textures to help with seams since you are probably never going to get really clean UVs. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×