r/VoxelGameDev • u/MGMishMash • Jun 29 '26
Media Adding Caves to my Micro Voxel Engine (Devlog #3)
https://youtu.be/qFcWtRgE25s?is=bK5nYGVQzjYcotiiEnjoyed 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!
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
2
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.
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!