The "Decimate To Quality" function is used to efficiently reduce a model's polycount, whilst preserving as much as possible its visual quality.

It works by smartly deleting vertices of the meshes (Vertex removal technique), using quality criteria to prevent smoothing artifacts and topological irregularities.


       


The function is available from the "Optimize Mesh" menu.

Parameters

The algorithm behind the "Decimate To Quality" function uses a combination of 4 main parameters, which are geometrical tolerances to obtain the lightest model possible (in terms of polycount), whilst keeping acceptable quality:


  • Surfacic tolerance: defines the maximum distance between vertices of the original model and resulting simplified surfaces.



  • Lineic tolerance: defines the maximum distance between lineic vertices of the original model and resulting simplified lines.

The "Lineic tolerance" is meant to preserve the boundaries of the original surface (where the edges are “sharp”, or "hard").




NOTE                Thanks to the Lineic control, the "Decimate To Quality" function is particularly adapted for CAD models, that generally contain a lot of hard edges!


  • Normal tolerance: defines the maximum angle existing between the original normals and those interpolated on the simplified surface.

The "Normal tolerance" setting preserves the quality of how the light reacts on a the surface of a mesh. Combined with the "Surfacic tolerance" setting, it will act as a quality controller, keeping polygons where the surface curvature is important and preserving the visual quality of the model.



  • Texture Coordinates tolerance: this setting is meant to preserve the UV (or Texture Coordinates) whilst decimating a mesh (0,01 is a good value). The higher the value is, the more aggressive the decimation is. Use -1 to bypass this tolerance.



NOTE                The Texture Coordinates tolerance is used to control UV distortion whilst decimating. But UV seams (like sharp edges) remain "significant" edges for the algorithm: they are affected by the Lineic tolerance, but decimation cannot ignore them. That can cause decimation effectiveness to be restrained. To allow the "Decimate To Quality" function to go further in term of polygon reduction, you should delete the UVs prior to decimating.


Presets

The function "Decimate To Quality" comes with 3 default presets, that define the value for each parameter:

  • Low: the meshes will not be much decimated. This preset is good when it comes to remove some useless polygons, left behind after a "Remove Holes" process for example
  • Medium: the meshes will be more decimated. Visible consequences might start showing but the result will be acceptable for meshes not visible from a reasonable distance
  • Strong: the meshes will be heavily decimated. They might start showing some artifacts on some places: it is good to use this preset for objects far from the camera


Example

Let's see a practical example with the Buggy model below (3DXML model, courtesy of Dassault Systèmes), to explain how each parameter controls the algorithm.


This model contains 140 846 triangles: let's use the "Decimate To Quality" function to reduce the polycount.



TIP                Prior to performing a decimation, its is best to repair the model first, in order to reconnect potential cracks or gaps existing in the original model and prevent the decimation to accentuate them. Set the parameter "Orient" to false if you are happy with the polygons faces orientation and do not want to damage them.


Surfacic Tolerance

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 polycount is reduced to 66 636 but the quality is quite good:



Decimation with surfacic tolerance = 1 mm : the polygon count is now reduced to 7 155 but the quality is poor, and causes a lot of lighting problems:



To obtain very low polycount without destroying visual quality of the model, the algorithm can control normal distortion during the decimation process.


Normal distortion tolerance

The normal distortion tolerance is the maximum angle between a normal at each vertex 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 polycount is reduced to 9 525 with an almost imperceptible quality loss:



Finally, the high surfacic tolerance (1mm) produces a significant aliasing visible on sharp edges:



Lineic tolerance

This tolerance is equivalent of the surfacic tolerance but it is applied only on sharp edges (or hard edges) or on lines of interest.


Decimation with surfacic tolerance = 1 mm, normal distortion tolerance = 5 degrees and lineic tolerance = 0.1mm : the polycount is reduced to 13 126 with an almost imperceptible quality loss, even on sharp edges. The quality is better than using only a surfacic tolerance of 0.1 mm with a triangle count widely inferior (13 126 against 66 636): 



Summary

The best way to decimate a model using the "Decimate To Quality" function, is to combine the 3 main parameters to obtain the lighter model while keeping an acceptable quality.


Parameters combination

Quality

Triangles

Reduction %

Surfacic 1mm

-

7 155

94

Surfacic 0.1mm

+

66 636

52

Surfacic 1mm + Normal 5°

++

9 525

93

Surfacic 1mm + Normal 5° + Lineic 0.1mm

+++

13 126

90

Original Mesh

++++

140 846

0


About the Textures coordinates tolerance

As explained above, this parameter prevents the UVs from being too distorted at decimation.


Decimation with texture coordinates tolerance = False (not used at decimation): the wooded textures moves because the underlying UVs get distorted:



Decimation with texture coordinates tolerance = 0.001 (very small UV displacement allowed): the wooded texture moves far less than above, because the underlying UVs gets preserved:



API function parameters

Check the API Reference page to learn how to use this function in Python code:


Related topics