From the GSOC ideas page. I never thought about doing such an optimization, and I was so impressed with the idea that I had an urge to do it :)
This implements a basic marching cubes algorithm to generate a mesh around a volume given an isovalue.
There are two parameters to the algorithm that are yet to be exposed to the UI : isovalue and cube size. There are no general values, so it is best to let the user plug whatever values are best fit for their volumes, as it is possible to have small gaps/holes in the generated mesh. Also the number of triangles generated is proportional to the resolution of the volume and the cube size.
For now boundaries are not handled, which means that if the volume touches a side of its domain, then there will be a huge hole in the mesh.
(The generated mesh can of course be rendered by using a diffuse shader on the domain.)
























