Does VTK have an implementation of the SurfaceNets algorithm for a continuous scalar field?

I am looking for a fast and high-quality mesh extraction algorithm for isosurfaces. I came across this paper:
Improving Triangle Mesh Quality with SurfaceNets
I then discovered vtkSurfaceNets3D, but this class seems to only support non-continuous scalar fields, like labeled maps. Is there a way to use SurfaceNets for continuous scalar fields, similar to Flying Edges, but with better mesh quality?" Sorry, I’m an absolute beginner with VTK, so I asked a simple question about it.

Let me know if you need further adjustments!

There are a lot of layers to answer these questions.

SurfaceNets is a multipart algorithm. As originally described, it begins by extracting voxel faces shared by neighboring voxels in different labeled regions. Then, a smoothing algorithm is used to improve what is typically a very aliased surface. This smoothing is what takes an ugly mesh and makes it better.

In Flying Edges and their ilk, surfaces are simply extracted, possibly with vertex normals, so they can render quite well. However, there is often a mix of cells of various quality, including slivers etc. However, this can be improved by using follow-on filters such as vtkWindowedSincPolyDataFilter, or vtkConstrainedSmoothingFilter. (There may be other filters to improve mesh quality, maybe the community can weigh in on this).

If you want to use vtkSurfaceNets3D, you can always write some simple code to take the continuous input scalar field and segment (label) it. Basically a lookup table from scalar value to id.

See this reference for vtkSurfaceNets3D. If you use it, I recommend that you make sure you build with SMP enabled, using the stdthread or TBB backend.

1 Like

I tried setting the data greater than zero in my scalar field to 1 and the data less than zero to 0, and then used vtkSurfaceNets3D. However, the result was not as smooth as Flying Edges (in terms of surface smoothness). So, I believe vtkSurfaceNets3D works better for non-continuous scalar fields. For my continuous scalar field (which is a discretized volume substituted into a surface equation), I think Flying Edges gives better results, even though the mesh quality is not as good as with vtkSurfaceNets3D.

Anyway, thank you for your response!