This example is a 3DXML model given by Dassault Systèmes, it contains 140 846 triangles. The decimate function can reduce the polygon count.
The surfacic tolerance is the maximum distance between the original model and the simplified one.
Bigger the tolerance is, worse the quality is but better is the polygon reduction.
Decimation with surfacic tolerance = 0.1 mm : the polygon count is reduced to 66636 but the quality is quite good.
Decimation with surfacic tolerance = 1 mm : the polygon count is now reduced to 7155 but the quality is poor due to a lot of lighting problems.
To obtain very low polygon count without destroying visual quality of the model, PiXYZ can control normal distortion during the decimation process.
The normal distortion tolerance is the maximum angle between a normal at each point of the original model and its corresponding normal on the simplified one.
Decimation with surfacic tolerance = 1 mm and normal distortion tolerance = 5 degrees : the polygon count is reduced to 9525 with an almost imperceptible quality loss.
Finally, the high surfacic tolerance (1mm) produce a significant aliasing visible on sharp edges.
This tolerance is equivalent of the surfacic tolerance but it is applied only on sharp edges or on lines of interest.
Decimation with surfacic tolerance = 1 mm, normal distortion tolerance = 5 degrees and lineic tolerance = 0.1mm : the polygon count is reduced to 13126 with an almost imperceptible quality loss even on sharp edges. The quality is better than using only a surfacic tolerance of 0.1mm with a triangle count widely inferior (13126 against 66636)
The best way to decimate a model is to combine the 3 parameters to obtain the lighter model while keeping an acceptable quality.