Marching Cubes Voxel Terrain with Tools

Hey, how are y’all? I’m here to share something that I did yesteday!
After seeing Imaginaerum’s post about Marching Cubes I wanted to do my own implementation for Marching Cubes that you can edit in real time!

Demo
There’s the place: https://www.roblox.com/games/5101622292/Terrain-Voxeles-MC

Left Click/Hold/Press: add terrain
Right Click/Hold/Press: remove terrain

Hope this helps a lot of devs!

Some details

  • Runs at 60 fps
  • It uses chunks
  • It updates neighboring chunks if they have the same vertex
  • Supports any interpolation between vertices

Learning resources
Paul Bourke

36 Likes

Wow it just like the game Astroneer!

5 Likes

I did a big improve in performance! Now it updates neighboring cubes and not the whole chunk!
https://www.roblox.com/games/5101622292/Terrain-Voxeles-MC

2 Likes

Is it alright if it’s translated into English for other developers (not that I don’t understand some Spanish, others may be not fluent at all in the language :slight_smile: )?

Other than that, it’s awesome but some of the code should be organised a bit more :slight_smile:

1 Like

Awesome code, I’ve been playing around with it for my own game Strad!

I’ll be leaving some credit for you, kudos to you friend.

2 Likes