Voxel Terrain Generation + Procedural Cave Generation

I’ve been experimenting with perlin noise recently and have created some cool landscapes. They are randomly generated with lots of vegetation such as grass and trees to add some effect and detail to the map.

I have also implemented a digging system that allows you to dig down infinitely.

Another thing is that I added is cave generation. Using math.noise to generate caves randomly as you go down. This gives the underground a more realistic feel as you can sometimes end up in naturally generated cave systems.

Screen Shot 2021-04-14 at 10.36.28 AM

I’m going to be adding a few more features to this generation system, after which I will be open sourcing it so that anyone will be able to use this for their own projects, or just learn from it. If you guys have any ideas on what features I should add, please let me know!

This is the game if you want to play it and see the system in action.


Amazing work, One issue I found is when breaking the grass it also breaks the dirt under it, enable streaming service and maybe add a fog to limit lag if you plan on having a larger game just so it doesnt cause too much lag, its amazing and I love the style, keep up the great work


Nice, I love to see these kind of combinations with math (noise and stuff) and programming. Perhaps this kind of terrain generation can be optimized with skinned meshes (I already made some performant water with them).


Thanks for the feedback. I forgot everything about streaming enabled and will definitely add it. I’ve also made cave generation a bit less frequent as it was the main culprit of unnecessary lag.


Thank you! I really hope roblox adds something which will allow me to combine all of the blocks into a singular mesh. (Pretty sure thats what minecraft does) That will help performance a lot. Until then, i’ll just have to wait. Unfortunately, I don’t think the terrain can be optimised with skin meshes, however I will definitely look into it.


I think it will only work for simple 3D diamond square terrain generation, where all you have to do is calculate the Y coordinate. Cause in that case, you do not have caves and voxels. Also, textures and colors might be an issue.


yoo this is sick. how did you make the terrain look sooo cool. also i love the breaking effect and the sound of the game.

1 Like

I just stumbled upon this post. This was made a long time ago, but I’m wondering; how did you find the positions for the grass?