1 of 8

MeshLib vs VTK

Mesh operations

2 of 8

Decimation quality: simple sphere example

Decimate sphere from 20K triangles in 10 times till 2K triangles:

VTK

MeshLib

Ideal mesh

Many near degenerate triangles

3 of 8

Decimation quality: complex example

Original mesh �with 1.1M triangles:

4 of 8

Decimation quality: complex example

Decimate in 100 times till 11K triangles:

VTK

MeshLib

Big holes

Uniform mesh

5 of 8

Mesh subdivision

VTK implementation is not reliable: it can work with minimal parameters and fail with higher level of subdivision, producing vague errors:

MeshLib can subdivide arbitrary meshes without limitations.

6 of 8

Decimation performance

Decimate 1.1M triangles in 100 times till 11K triangles:

  • VTK: 11 seconds
  • MeshLib sequential algorithm: 4 seconds
  • MeshLib parallel algorithm: 1 second

7 of 8

Boolean operations with meshes

  • VTK library contains an implementation that “relies on the inputs having no co-planar, overlapping cells”, which makes it not practical:�https://vtk.org/doc/nightly/html/classvtkBooleanOperationPolyDataFilter.html
  • There are third-parties to perform boolean operations in VTK-based software, which proves that VTK-own implementation is very weak:�https://github.com/zippy84/vtkbool
  • MeshLib on the other hand supports various degenerations in the input meshes, and can even produce a valid result if two meshes coincide in many or all triangles. Also MeshLib implementation can perform boolean operations for moderate-sized meshes in real-time, see MeshLib YouTube channel.

8 of 8

Opening of huge meshes from STL file

In this test we opened a binary STL file of 5Gb containing 105M triangles. Such huge meshes can appear in practice after conversion from volumetric data.

  • Opening in ParaView 5.10.1 (based on QT+VTK) this operation took at least 10 min (I left the computer after 10 min waiting and returned much later, so probably it took even more).
  • Opening in MeshInspector (based on MeshLib) this operation took 2 minutes (including rendering).