VTK Alternative for
Mesh Simplification
Continuing our series on mesh simplification, this piece focuses on a comparison between MeshLib and VTK. As a widely-used tool in the field, VTK often comes up when exploring mesh simplification solutions. To simplify your decision-making, our team has compiled insights from our latest research into various alternatives. In this chapter, we’ll evaluate MeshLib alongside VTK, outlining the strengths and limitations of each to help you navigate the intricacies of 3D data processing with confidence.
Initial Research Framework for MeshLib and VTK
Our mesh simplification investigation begins with a Nefertiti mesh—a highly intricate structure. It would suffice to say it is comprised of 2+ million triangles. Such complexity turns this mesh into a perfect-fit for a testing round.
To address this complex challenge, our testing team explored two different directions:
- On the one hand, Heavy Mesh Simplification. This idea supposes diminish the sheer mesh size by 1000 times (in this particular case, we are to reduce 2 million triangles to as few as 2000). One could opt for this format whenever where speed and economical resource usage are your priorities, and some loss of detail is tolerable.
- On the other hand, Moderate Mesh Simplification. This manipulation narrows the mesh size by 10 times (we mean, our task is to obtain 200,000). As such, it strikes a middle ground, preserving more geometric accuracy while remaining more or less economical in terms of resources and overall performance.
VTK is contrasted with a couple of MeshLib’s modes:
- First, MeshLib ST (Single-Threaded Simplification). This choice processes the mesh using a single CPU thread;
- Second, MeshLib MT (Multi-Threaded Simplification). This pick relies on multiple threads simultaneously. We decide to use 16, as this amount equaled our available cores. In case it is your intention to get the mesh simplification things done via MeshLib MT, ensure that the number of threads adequately corresponds to your system’s core count.
Input Nefertiti Mesh 2+
million triangles

- FYI: a brief explainer, specifying what exactly our comparison criteria mean:
- Time — represents the real-world duration spent on completing the task, measured in seconds.
- Degeneracies — indicate the count of triangles with extreme aspect ratios, specifically those exceeding 1:100.
- Self-Intersections — denote the total count of overlapping or intersecting geometries.
- Small Components — refer to the number of isolated or disconnected mesh elements.
- Holes — represent the quantity of missing or absent geometries in the mesh.
- Hausdorff Distance (mm) — is the maximum deviation between the original and simplified meshes.
- Average Absolute Distance (mm) — describes the average difference, providing a comprehensive measure of geometric accuracy.
Heavy Mesh Simplification Scenario
To support any subsequent claims, our team showcases the outcomes of our work in advance:
MeshLib, Single-Threaded

MeshLib. Multi-Threaded

VTK

Obviously, VTK fails to rise to the occasion. To make this conclusion even more self-evident, we will cite some revealed figures.
Intricacies of Our Heavy Mesh Simplification Round
Benchmark | ST | MT | VTK |
---|---|---|---|
Task Time(s) | 3.9 | 0.9 | 11 |
Degeneracies | 0 | 0 | 22 |
Self-Intersections | 0 | 0 | 200 |
Small Components | 0 | 0 | 110 |
Holes | 0 | 0 | 180 |
Hausdorff Distance (mm) | 3.45 | 3.286 | 10.761 |
Average absolute distance (mm) | 0.287 | 0.284 | 0.912 |
Heavy Mesh Simplification through MeshLib and VTK Wrapped Up
The results of our heavy mesh simplification undertaking highlight significant differences in performance and output quality between MeshLib, be it ST or MT, and VTK:
- MT emerged as the most time-effective (well, that is the main advantage of multi-threaded efforts);
- Both ST and MT maintained perfect geometry integrity. VTK introduced numerous issues;
- Regarding accuracy-related facets, MT demonstrated the best balance of precision and efficiency, achieving the lowest Hausdorff Distance and Average Absolute Distance. ST followed closely. In contrast, VTK lagged behind.
These facts showcase MeshLib in general and MT in particular. As for VTK, if we were you, we would attempt to find something else for this mission.
Moderate Mesh Simplification Scenario
As in the previous section, we begin by presenting a visual showcase.
MeshLib, Single-Threaded

MeshLib. Multi-Threaded

VTK

To varying degrees, each of the ‘contestants’ did the job. Yet, it is self-evident, the first couple did outperform the third one. Let’s look closer at the details.
Intricacies of Our Moderate Mesh Simplification Round
Benchmark | ST | MT | VTK |
---|---|---|---|
Task Time(s) | 3.8 | 0.9 | 11 |
Degeneracies | 0 | 0 | 4000 |
Self-Intersections | 3 | 0 | 0 |
Small Components | 0 | 0 | 0 |
Holes | 0 | 0 | 0 |
Hausdorff Distance (mm) | 0.143 | 0.143 | 4.011 |
Average absolute distance (mm) | 0.018 | 0.018 | 0.096 |
Moderate Mesh Simplification through MeshLib and VTK Wrapped Up
The benchmark results highlight key performance and quality differences:
- MT leads the race as the most speedy path;
- Both ST and MT demonstrated exceptional accuracy. Even against this backdrop, MT exhibited superior geometry handling;
- In contrast, VTK (it, broadly speaking, did hit the goal), still showed weighty shortcomings.
Summary
- MeshLib ST or MT: When one prioritizes high precision, robust geometry preservation, and flexibility. For maximum speed and efficiency, MT is the ideal way, if you have a lot of cores. As for ST, opt for it when your computational resources are limited;
- VTK: You can pickup VTK when you have plenty of time, do not prioritize geometric accuracy, and deal with moderate simplification tasks. However, exploring other alternatives would be a productive measure.