Smooth Voxel Engine (Surface-Net)

Project Description

I've been always a fan of procedural generated content and specially voxels. I grew up playing games like Minecraft or Trove. I wanted to give a go at it mostly for fun and learning purposes.

The following is and implementation of a Voxel engine + procedural generation + Naive Surface-Net smoothing algorithm.

[CHECK THE CODE ON GITHUB]

Inspiration

Initially, I wanted to do a blocky art style (the one you find in Minecraft) but that gets boring quickly unless you tweak it very well and add a lot of detail. Instead I researched about voxel and procedural generation techniques and I found the fascinating world of "Smoothing Algorithms". There is a community crazily dedicated to this kind of game development.

(Thanks to the people on r/VoxelGameDev for making this possible!)

I gathered quite a few references from well known games that implement these methods as well as posts from the community. I want to mention this one (https://thatfrenchgamedev.com/games/nil-order-voxel-smoothing-engine/) as my main inspiration for this project.

Procedural Generation and Optimizations

This was probably the easiest part, and it's also very well documented online. For the procedural generation I used some simple Perlin Noise techniques.

For the optimization I implemented a Chunking system that divides the entire world into smaller groups of voxels. Also, the inner faces of the voxels are never rendered, since the player will never get to see that geometry. If I have some time, I would like to go a step beyond and implement LOD, but it's a very complex problem if you also have chunks + smoothing.

Smoothing Algorithm (Surface-Net)

The next two weeks after starting the project, I went down a rabbit hole of voxel smoothing techniques. There are lots of them, but these are the most popular among game developers:

  • Marching Cubes

  • Dual Contouring

  • Surface Nets

While Marching Cubes is the most popular and documented method, I went for Surface Nets since the final look was smoother and more life-like. I'm aware that you can achieve similar results with marching cubes, but that would require some tweaking.

Now, inside of Surface Nets there's even more techniques! I won't go into deep and just say that I went for Naive Surface Nets, which essentially work by averaging every vertex position with the ones that surround them. Sounds simple, but it's hard to get it right at first. It's also not very well documented, so I had to make my own implementation from scratch based on blogs and papers I found online.


Smooth Voxel Engine (Surface-Net)

Project Description

I've been always a fan of procedural generated content and specially voxels. I grew up playing games like Minecraft or Trove. I wanted to give a go at it mostly for fun and learning purposes.

The following is and implementation of a Voxel engine + procedural generation + Naive Surface-Net smoothing algorithm.

[CHECK THE CODE ON GITHUB]

Inspiration

Initially, I wanted to do a blocky art style (the one you find in Minecraft) but that gets boring quickly unless you tweak it very well and add a lot of detail. Instead I researched about voxel and procedural generation techniques and I found the fascinating world of "Smoothing Algorithms". There is a community crazily dedicated to this kind of game development.

(Thanks to the people on r/VoxelGameDev for making this possible!)

I gathered quite a few references from well known games that implement these methods as well as posts from the community. I want to mention this one (https://thatfrenchgamedev.com/games/nil-order-voxel-smoothing-engine/) as my main inspiration for this project.

Procedural Generation and Optimizations

This was probably the easiest part, and it's also very well documented online. For the procedural generation I used some simple Perlin Noise techniques.

For the optimization I implemented a Chunking system that divides the entire world into smaller groups of voxels. Also, the inner faces of the voxels are never rendered, since the player will never get to see that geometry. If I have some time, I would like to go a step beyond and implement LOD, but it's a very complex problem if you also have chunks + smoothing.

Smoothing Algorithm (Surface-Net)

The next two weeks after starting the project, I went down a rabbit hole of voxel smoothing techniques. There are lots of them, but these are the most popular among game developers:

  • Marching Cubes

  • Dual Contouring

  • Surface Nets

While Marching Cubes is the most popular and documented method, I went for Surface Nets since the final look was smoother and more life-like. I'm aware that you can achieve similar results with marching cubes, but that would require some tweaking.

Now, inside of Surface Nets there's even more techniques! I won't go into deep and just say that I went for Naive Surface Nets, which essentially work by averaging every vertex position with the ones that surround them. Sounds simple, but it's hard to get it right at first. It's also not very well documented, so I had to make my own implementation from scratch based on blogs and papers I found online.


Smooth Voxel Engine (Surface-Net)

Project Description

I've been always a fan of procedural generated content and specially voxels. I grew up playing games like Minecraft or Trove. I wanted to give a go at it mostly for fun and learning purposes.

The following is and implementation of a Voxel engine + procedural generation + Naive Surface-Net smoothing algorithm.

[CHECK THE CODE ON GITHUB]

Inspiration

Initially, I wanted to do a blocky art style (the one you find in Minecraft) but that gets boring quickly unless you tweak it very well and add a lot of detail. Instead I researched about voxel and procedural generation techniques and I found the fascinating world of "Smoothing Algorithms". There is a community crazily dedicated to this kind of game development.

(Thanks to the people on r/VoxelGameDev for making this possible!)

I gathered quite a few references from well known games that implement these methods as well as posts from the community. I want to mention this one (https://thatfrenchgamedev.com/games/nil-order-voxel-smoothing-engine/) as my main inspiration for this project.

Procedural Generation and Optimizations

This was probably the easiest part, and it's also very well documented online. For the procedural generation I used some simple Perlin Noise techniques.

For the optimization I implemented a Chunking system that divides the entire world into smaller groups of voxels. Also, the inner faces of the voxels are never rendered, since the player will never get to see that geometry. If I have some time, I would like to go a step beyond and implement LOD, but it's a very complex problem if you also have chunks + smoothing.

Smoothing Algorithm (Surface-Net)

The next two weeks after starting the project, I went down a rabbit hole of voxel smoothing techniques. There are lots of them, but these are the most popular among game developers:

  • Marching Cubes

  • Dual Contouring

  • Surface Nets

While Marching Cubes is the most popular and documented method, I went for Surface Nets since the final look was smoother and more life-like. I'm aware that you can achieve similar results with marching cubes, but that would require some tweaking.

Now, inside of Surface Nets there's even more techniques! I won't go into deep and just say that I went for Naive Surface Nets, which essentially work by averaging every vertex position with the ones that surround them. Sounds simple, but it's hard to get it right at first. It's also not very well documented, so I had to make my own implementation from scratch based on blogs and papers I found online.


Álvaro Ramírez, 2024