Contouring the Isosurface

Finally, the time has come to create triangles and finish the Dual Marching Cubes implementation. This is actually the easiest part, compared to the Octree generation and deriving the Dualgrid.

It’s just an iteration over all Dualcells. As each of them is topological cube, Marching Cubes can directly be applied to them, even if there are a lot of edges of different lengths.

Here is the result:

1: Terrain rendered with Dual Marching Cubes

1: Terrain rendered with Dual Marching Cubes

As you can see, the flat areas got far less triangles. Here is again the triangulation of the same view with Marching Cubes, to show the drastic differences.

mcTerrain

2: Terrain rendered with Marching Cubes

And with the accepted geometric error as parameter in the Octree generation, the amount of triangles is controlled.


If you like this work and want to support it, feel free to donate something or click on any Flattr button!