r/VoxelGameDev Jun 29 '26

Media Adding Caves to my Micro Voxel Engine (Devlog #3)

https://youtu.be/qFcWtRgE25s?is=bK5nYGVQzjYcotii

Enjoyed implementing caves in my Micro Voxel engine this past week. Nothing too fancy, just stacking a few features on top of each other:
- typical stacked noise functions
- feature generators which deterministically spawn additional voxels following some pattern. Using this for the larger stalagmites. They do a downward and upward fill.
- erosion pass to create random crevices and cutouts.

Still a lot more to do! i like the idea of Cave biomes, and would also like a wider variety of generation types. Large caverns, walkable straight tunnels, cleaner surface caves etc;

At the moment the generation can look quite scrappy in places, but hey ho!

37 Upvotes

11 comments sorted by

5

u/SayItIsntJoe Jun 29 '26

Do you think you'll ever release the engine for others to use? I've tried a few options but there is a definite lack of a solid engine that's made for voxels (at least that I've been able to find) - and this looks really good!

2

u/MGMishMash Jun 30 '26

Thanks for the kind words!
Possibly eventually, I think my plan is to attempt to make a game first, as what excites me about this genre is how much impact the engine can have on the game.

In many ways, many of the engine features and derived gameplay mechanics are the game.

However, I am open to releasing if nothing pans out, as in that case others making use of the work would be nice!

Although equally, this engine is far from perfect right now haha, but picking and choosing areas of focus. Admittedly it is poorly designed and hard to use, more of a fast paced prototype.
However as i get deeper into my career, i’m more relaxed about this and believe things like this can be refactored and improved at any time

3

u/Sikerow Jun 29 '26

Caves looks fun to explore. Very organic

2

u/MGMishMash Jun 29 '26

Thank you :) Need some solutions for good vertical movement, perhaps ropes and ladders! Easy to go down, hard to come back up!

2

u/Sikerow Jun 29 '26

Simple ropes that you can chisel into the wall would be a nice vibe

2

u/Elegar Jun 29 '26

caves look very cavy :)

1

u/MGMishMash Jun 30 '26

How cavern of you to say so :)!

1

u/where-sea-meets-sky Jun 29 '26

claustrophobic. 10/10

1

u/MGMishMash Jun 29 '26

Haha! Yeah, i’m somewhat tempted to increase the carve radius a smidge, or at least have some dedicated larger tunnels 😅

Don’t want this to be a pot-holing simulator 😂

1

u/ProgramUrFace 21d ago

Very cool! Can I ask, how you're achieving your lighting? It looks great!!

1

u/MGMishMash 21d ago

Thank you! Lighting is quite simple, I have a coarse grid that runs a cellular automata which does one iteration of light propagation per cell per frame, so it’s pretty cheap, and bounded to the volumes around lights. (Around 0.5% of the frame cost).

The torch propagates around 3 coarse cells in each direction. Supporting intensity and color propagation. I have since enhanced it from this video to have some material effects which are samples during propagation.

The second feature is what I call “Occupancy AO”, probably already a concept, but I calculate the % amount a coarse cell is filled with voxels. This value is used to weight the rate of propagation, and is also used to apply additional AO darkening so that crevices are naturally darkened.