Modifiable voxel


there are many voxel/marching cubes tutorials out there
but does anyone know any resource teaching voxel based terrain digging/sculpting/realtime modification ?

cant find anything similar on google


It really depends of what type of voxel algorithm you are using. One of which is dual contouring, and uses CSG (Constructive Solid Geometry) to the modifications, JME source code can be found for a project someone did a couple months ago:

There is also a way to do it for marching cubes as well (again, a smooth terrain approach)

ok thanks, I’ll have a look

  • thewiselion: the video looks promissing, but the code is completely bugged, so I dont know if it has been modified but it is now broken, not mentioning missing textures while the file is like 300mb
  • I’ll check the other one

edit : BasicGSOC works like a charm :smile:

So the Dual contouring one, you will need to create another project and import or copy/paste the source and assets into the new project. That’s how I got it to work.

exactly what I’ve done, but all it does when I click is add some random crap geometry on the ground instead of sculpting it
also it is missing a couple of textures(even when I added test data assets library froom jme)