Creation of Colored Isosurfaces Using Marching Cubes Algorithm
Bryan Harbich
CMPS161 Winter 2012




This program takes data in the form of 3d scalar fields, and creates an isosurface based on the specified critical value. By using the marching cubes algorithm, we can create very high-detail meshes to visualize the data. The surface is also coloured using a different scalar field. AS of now, the program is using a range of data from the hurricane Isabel data set.

The marching cubes algorithm can produce high-detail surfaces. With the help of vertex position and color interpolation, we can create fairly smooth objects with a relatively low polygon count. Because the dataset used is very large, it is unreasonable to sample at every point. By sampling at every 3-4 points, we can create a good looking surface while maintaining a reasonable computation time.

Voxel data is stored within thr program as a 3D array of float values. Upon running the marching cubes algorithm, polygons are dumped to a polygon array to be iterated through later to create display lists. To calculate vertex normals, we make use of the map object, processing each polygon and incrementing each vertex key by that polygons face normal. At the end, we divide the vertex key values by the number of times it has been incremented. This gives us the average of the normals of all polygons that contain the specified datavertex, ie. a vertex normal.

Download the executable!
Download the source here!
Download the data here!
Technical Document
Video Demo!

Usage: Voxels.exe [valueField] [colorField]

Application Controls:
W/A/S/D: move camera
Mouse: rotate camera
R: toggle mouse
E: toggle wireframe
U: toggle fullscreen
UP/DOWN: change isovalue (large)
LEFT/RIGHT: change isovalue (small)




Related work:
GPU Gems- GPU Accelerated Procedural Voxel Terrain
Comparison of Dual Contouring and Marching Cubes
Marching Cubes on Binary Fields and Vertex Interpolation Methods
Lookup Tables for MC Cases