Syntax
- reduceGeometry(tolerance)
Parameters
- tolerance—float Controls the number of vertices which are going to be removed from the geometry. Valid values are in the range [0,1]. For instance, a value of 0.2 will reduce the vertex count of the geometry by 20%.
Description
The reduceGeometry operation simplifies the geometry by applying a series of edge collapses. The algorithm tries to reduce the complexity of the mesh by introducing the least possible delta to the appearance of the existing model.
Related
Examples
Reducing a terrain
The picture below shows a shaded terrain mesh. Left: the original (16384 vertices, 16129 faces). Right: after reduceGeometry(0.8) (3276 vertices, 5066 faces).
![Terrain mesh before reduceGeometry Terrain mesh before reduceGeometry](GUID-7F8130AA-B7BF-4465-AF9D-02070D912F39-web.png)
![Terrain mesh after reduceGeometry Terrain mesh after reduceGeometry](GUID-DDEB66AE-CCDA-4871-A68A-7ACFB39C181D-web.png)
Terrain meshes
Closeup of the terrain meshes from the previous picture. Left original, right reduced.
![Original geometry close up Original geometry close up](GUID-A67BB2C9-115D-42CF-9433-80C533ACD404-web.png)
![Reduced geometry close up Reduced geometry close up](GUID-4854B1E8-ECCE-44F8-A32B-3794F510788B-web.png)