Marching Cubes is an algorithm that converts a volumetric representation to a dense mesh.
Let’s walk through these steps in more detail.
The first step is to divide the 3D space into a grid of voxels. The size of each voxel will determine the resolution of the mesh.
For each voxel, the algorithm samples the density at the eight vertices. Depending on the density, each vertex is classified as either inside
or outside
the surface.
Each voxel’s eight vertices can be in two possible states, resulting in $2^8 = 256$ possible configurations. Each configuration corresponds to a specific triangulation pattern.
To generate the final mesh, the algorithm “marches” through each voxel and applies the corresponding triangle configuration, hence the name “Marching Cubes”.
This process produces a dense, rough mesh that approximates the surface of the volume.
While useful for visualization, Marching Cubes meshes are mostly unsuitable for productions like games due to several limiting factors:
Techniques like FlexiCubes address some limitations by allowing the mesh vertices to move, creating smoother surfaces. This approach is used by InstantMesh, the current leading open-source 3D pipeline. However, the resulting meshes remain overly dense and impractical for production.
Cleaning up the topology of Marching Cubes output often requires more time and effort than creating a mesh from scratch. This creates a major bottleneck for ML for 3D applications. Gaussian Splatting, as discussed earlier, offers a potential solution to this bottleneck.
However, recent work has emerged that directly addresses this bottleneck, using differentiable techniques to produce low-poly meshes with higher-quality topology. This will be covered in the next section.
< > Update on GitHub