ProcGrotto
A toy procedural cave generator. Made for PROCJAM 2024 in just a few days.
Generates small, stylized caves.
Use arrow keys to look around, WASD to move, spacebar to ascend, and shift to descend.
Press N to generate a new cave.
This is very much a work in progress.
Note: There is a bug where sometimes you start off looking straight at the floor.
How it works:
- Generates a basic cave shape with a method similar to Perlin Worms
- Construct a signed distance function (SDF) from the basic cave shape. Combine multiple shapes using a smooth minimum function
- Warp the SDF using layers of Simplex and Worley noise
- Split the scene into chunks. Discard chunks if they are a sufficient distance away from the nearest terrain surface
- Sample the SDF in a grid for each chunk. If every sample is considered inside or outside the terrain, discard that chunk
- Construct the terrain mesh for each chunk using Marching Cubes
- Calculate vertex normals using the gradient of the SDF
- Render the terrain using triplanar mapping
Updated | 14 days ago |
Published | 16 days ago |
Status | Prototype |
Platforms | HTML5 |
Rating | Rated 5.0 out of 5 stars (2 total ratings) |
Author | Quintin |
Made with | Unity |
Tags | Experimental, Exploration, Generator, Procedural Generation, PROCJAM |
Comments
Log in with itch.io to leave a comment.
This is really impressive!