Definition
Marching cubes turns a grid of values of an implicit function (SDF, occupancy, density) into a triangle mesh of the level set (or ).
Algorithm
- Build a cube from 4 neighbors on one slice and 4 on the next.
- Index = inside/outside pattern of the 8 corners ( cases).
- Look up the crossed edges in a precalculated table.
- Place vertices on the edges by linear interpolation of the values.
- Normals from central differences, interpolated to the triangle vertices.
- Output the triangles.
| Method | Idea | Weakness |
|---|---|---|
| Marching cubes (MC) | lookup table + linear interpolation | misses sharp features, cubic cost in resolution |
| Dual contouring (DC) | one vertex per cell minimizing with Hermite data, octree | can give non-manifold vertices, thin features |
| Dual marching cubes (DMC) | QEF with tangent planes of the field | crack-free, manifold, sharp features |
| FlexiCubes | extra parameters, differentiable | used to optimize meshes end-to-end |
Trap
Classical MC is not differentiable. FlexiCubes is the differentiable variant, not a faster one.
Appears in
- Lecture 5, Marching Cubes
- Lecture 5, Dual Contouring, Dual Marching Cubes, FlexiCubes
- Lecture 5, Point cloud → mesh: the exam pipeline
- Lecture 6.1, Exam task: mesh from a learned SDF
- Lecture 8, SuGaR: naive mesh extraction from 3DGS is noisy