Marching cubes in Blitz3D

Community Forums/Showcase/Marching cubes in Blitz3D

Flanker(Posted 2016) [#1]
Something i've been playing with, marching cubes using Blitz3D : http://www.youtube.com/watch?v=CBhV1dE4WzI

This is based on Paul Bourke's work ( http://paulbourke.net/geometry/polygonise/ ). In the video, the grid is 64x64x64 and approximately 130.000 triangles. The grid is divided in small chunks to be able to update it in realtime. Each triangle is independant to be texturable. I also made a version with welded triangles wich is a little faster to compute, but it can't be textured properly using UVs. In Hardwired/Hybrid with DX11 by Ploppy, it works like a charm with a triplanar shader :)

The starting shape is generated with 3D simplex noise. I have to admit, I didn't understand anything about it, so the code for the noise is just a dirty hack from a java or python code, I don't remember.

I still have problems with vertex normals, to weld chunks properly without taking too much CPU time. Here is an .exe if anyone wants to test it : http://www.mediafire.com/download/6hb49wbmm9p0kje/Marching_cubes.zip


RemiD(Posted 2016) [#2]
This is cool, you could make nice underground caves with this...


Flanker(Posted 2016) [#3]
Maybe I'll use that to create a Worms 3D-like game, with destructible terrain :)


Rick Nasher(Posted 2016) [#4]
Great effects. I've actually used destructible terrain in a game I'm developing(for the last 10 years or so). :-) But it's great fun and I'm surprised is not used more often.


Blitzplotter(Posted 2016) [#5]
This is really impressive work - just when I'm getting delved into some Monkey code along comes this demo which has me hankering for doing some more in Blitz 3D. Just not enough time in the day.....