Back to Browse

Surface reconstruction with GPU Marching Cubes

1.3K views
Jan 2, 2021
10:39

The purpose of a surface reconstruction algorithm is to reconstruct a mesh from a point cloud (the normal vectors are also known). This data can be obtained by scanning a statue with a laser for instance. In this video, I show an implementation of a surface reconstruction algorithm which uses compactly-supported radial basis functions. The idea is to generate a signed distance function everywhere by approximating the data of the point cloud. The zero level set of the signed distance function defines the goal surface. The surface can be recovered by any isosurface extraction algorithm. In this case, I opted for the well-known Marching Cubes algorithm because of its simplicity. The algorithm is fully parallelized on the gpu using compute shaders and can generate meshes having hundreds of thousands of vertices in a matter of seconds. The parallel implementation of marching cubes is based on this paper: https://developer.nvidia.com/gpugems/gpugems3/part-i-geometry/chapter-1-generating-complex-procedural-terrains-using-gpu but I adapted it in order to use compute shaders instead of transform feedback. While computing the signed distance function, I also compute the mean curvature and the gaussian curvature which give the nice colored visualizations. The reconstructed surface does not have to be the zero level set of the signed distance function. By adding a small offset, we can obtain fat and slim versions of a mesh as shown at the end of the video. The algorithm works best with smooth point clouds since it cannot recreate sharp edges. Another downside is that is has a tendency to exaggerate the bumps and the creases of the point cloud which may be unwanted if a high accuracy is needed. Also, it does not handle noise well and the final mesh is not necessarily water-tight if the point cloud density is very uneven. The algorithm could also be used to clean the geometry of an existing mesh since the output has a very regular structure. A decimation pass should be applied at the end to remove all the small edges created by Marching Cubes though.

Download

0 formats

No download links available.

Surface reconstruction with GPU Marching Cubes | NatokHD