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
|