# Quad reduction
Similar to its sister feature ReductionProcessor, the QuadReductionProcessor takes an input scene and reduces the number of triangles and vertices in the scene. However, it operates on quadrilateral meshes where polygons have four corners instead of three as in traditional triangular meshes.
A quadrilateral mesh typically exhibits more structure than a triangular counterpart and the QuadReductionProcessor can retain that structure through the reduction process.
This means using the QuadReductionProcessor is ideal when the input is a structured quad asset and this structure needs to be preserved and in an editable state after processing.
If retaining quads and mesh structure is not a priority, the standard triangle ReductionProcessor will often have more freedom to reach low triangle counts at lower geometric errors.
# Feature importance
When reducing a geometry, there are plenty of different data that needs to be taken into consideration. The most obvious one being purely geometrical features of the mesh, but things like UV coordinates, tangents, normals, vertex colors, and skinning are also important to preserve. The QuadReductionProcessor automatically takes into account following supported features of the mesh:
- Geometrical features
- Open edges
- UV coordinates
# Targets and stop conditions
The reduction runs until one or multiple criteria have been met. The target can be a specific triangle count or ratio. But it can also be be set to a maximum deviation threshold or set to be optimized for a specific on screen size - meaning the remaining triangle count won't be known prior to reduction, but the quality will.
The PolygonCount and PolygonRatio targets should be considered the max polygon counts of the output mesh, meaning the mesh will often be reduced further if more collapses can be performed without degrading the quality of the mesh further. This is done to ensure consistent detail level over the entire surface, and to ensure symmetric features get reduced equivalently where possible.
# Working with mixed assets and triangles
Quad meshes generally contain a fair amount of regular triangles. Since Simplygon 10.1, depending on the reduction targets being used, the quad reduction processor will, when possible, also attempt to reduce continuous surfaces made up of triangles using traditional triangle reduction, rather than leaving these untouched through the processor (as was the case in 10.0). These areas will however not retain the authored structure of the mesh in the same way that they would if they were made up of quads.
Because of a current algorithm limitation, reduction of triangle surfaces will only be attempted if the QuadReductionProcessor is using deviation-based reduction targets. This means:
Triangle reduction compatible target criteria:
- Max deviation
- On-screen size
Triangle reduction incompatible target criteria:
- Polygon ratio
- Polygon count
In the image below, the flat left section of the mesh remains unreduced because it is composed of triangles, and the target criteria being used is incompatible with the quad processor triangle reduction. The right section is heavily reduced even at a 75% target ratio since the reduction is concentrated over this area.
This behavior is important to bear in mind when working with quad assets, especially if there a high amount of triangles mixed in.
To yield consistent reduction over a mixed asset with a high proportion of triangles, it is recommended to run the QuadReductionProcessor with an on-screen size or maximum deviation target, as that will allow the triangle sections to reduce properly.
# Supported components
The Quad reduction processor works with
- Quad data
Format specification for quadrilateral data.