Decimate
Reduce the number of triangles
Parameters
Parameter | Type | Description |
---|---|---|
criterion | DecimationCriterion | Quality: reduce the number of triangles on the meshes driven by quality. Target: reduce the number of triangles on the meshes, up to a given triangle count ratio. |
paramsQuality (Mesh quality preset) | DecimationQuality | Presets recommended by Asset Transformer. |
advancedParametersQuality (Advanced) | AdvancedParametersQuality | |
surfacicTolerance | Double | Defines the maximum distance between vertices of the initial model and those of the decimated surfaces. The unit is the unit of length of the meshes to process. |
lineicTolerance | Double | Defines the maximum distance between lineic vertices of the initial model and the decimated lines. This tolerance is equivalent to the surface tolerance, but applied only to sharp edges, hard edges, and lines of interest. Use the line tolerance to preserve the boundaries of the initial surface, where edges are sharp or hard. The unit is the unit of length of the meshes to process. |
normalTolerance | Double | Defines the maximum angle between the normal of each vertex and the interpolated normal of the decimated surface. Use this parameter to preserve the quality of the reaction of light on mesh surfaces. Use this parameter in combination with the surface tolerance to maintain polygons where the surface curvature is important and to preserve visual quality. |
uvTolerance (UV tolerance) | Double | Maximum distance (in UV space) between original textcoords and those interpolated on the simplified surface. |
decimationToTargetStrategy (Strategy) | DecimationToTargetStrategy | Triangle count: driven by a specific targeted number of triangles. Ratio: driven by percentage of mesh total number of triangles. |
polycount (Triangle count) | Int32 | Targeted number of triangles. |
targetRatio (Ratio) | Range | Approximate output ratio triangle count. Choose 0% to 100%. |
preservePaintedAreas | Boolean | If true, the function uses colored vertices to preserve quality on colored areas. Only vertices painted with a Red color (1, 0, 0) are considered. |
advancedParametersTarget (Advanced) | AdvancedParametersTarget | |
uvImportance (UV Importance) | UVImportance | Select an option based on the importance of UVs. By default, the feature preserves seams and reduces deformation. For faster and less memory-intensive decimation, choose to ignore this parameter. |
protectTopology | Boolean | If you don't select this option, the mesh topology may change and some edges may become non-manifold. If you select this option, decimation may take longer or may not reach the expected target. |
Additional Information
Because this feature modifies data at the mesh level, modifications on meshes are visible for any GameObject that uses this mesh, regardless of the input.
Criterion: Quality
This standard decimation process is appropriate in most cases. Adapted for hard edges coming from CAD data. You can leverage our presets or custom the decimation by collapsing the advanced parameters. The higher the tolerance values, the lower the polygon count but the lower the visual quality. To bypass a tolerance, set the parameter to –1.
Criterion: Target
Use this feature to reach the target polygon count that is optimal for your target device.
In 3D data preparation, it's often important to be able to control the polygon count of models, because the performance of the target device that that displays the model. For example, at most 100,000 triangles is optimal for the HoloLens headset.
Selection
Although this algorithm operates at the mesh level, it's based on the whole set of meshes to assess the ratio or the triangle count. If you use this feature once on a selection of 10 meshes, the result is different than if you use this feature 10 times on a single mesh. In the first case, the target is reached for the whole set of meshes, while it's reached for each mesh individually in the second case.
Tip
For architecture, engineering, and construction (AEC), we recommend that you use this feature once on all the meshes. This way, meshes that comprise very few triangles, such as walls, are kept intact while decimation focuses on denser meshes. Otherwise, you can use the Rule Engine to apply decimation on each GameObject at once.
Strategy
You can specify a triangle count or a ratio. The ratio is a percentage of the total number of triangles of your selection.
Preserve painted areas
To use colored vertices to preserve painted areas, select this option. Only vertices that are painted in red (1, 0, 0) are taken into account.
This example shows the result of a decimation with and without preservation of painted areas:
- Model on the left: before decimation, the user paints vertices with Polybrush.
- Model at the center: without preservation of painted areas, the painted area is decimated.
- Model on the right: with preservation of painted areas, the painted area is preserved from decimation.
Learn to paint vertices in this tutorial.
Warning
Some shaders paint vertices in white (1, 1, 1) by default. In reality, this feature takes the difference between R and B as a vertex weight.