To optimize a tessellated model, Pixyz Decimation algorithm is used to reduce the mesh polygon density by smartly deleting vertices. It allows precise control, preventing smoothing artifacts and topological irregularities.
The algorithm uses a combination of the 3 following parameters to obtain the lightest model (in terms of polygon count) possible whilst keeping acceptable quality:
- Surfacic tolerance: The maximum distance between vertices of the original model and resulting simplified surfaces.
- Lineic tolerance: 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”).
- Normal tolerance: The maximum angle between original normals and those interpolated on the simplified surface.
The "Normal tolerance" setting preserves the quality of how the light reacts on a surface/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.
Other parameter possible:
- Texture Coordinates tolerance: This setting is meant to preserve the UV (or Texture Coordinates) whilst decimating a mesh (0,01 is a good value).
NOTE The "Texture coordinates tolerance" parameter for the tessellation algorithm is not used/available in all Pixyz solutions (for example inPixyz Plugin for Unity).
In the example below, the polygon count 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.1mm with a triangle count widely inferior (13 126 against 66 636):