Polyreduce SOP

From TouchDesigner 088 Wiki

Summary

The Polyreduce SOP reduces a high detail polygonal model into one consisting of fewer polygons. The second input's polygons represent feature edges. They are matched to the input mesh by point numbers.

The methods to reduce polygonal models are:

  • A percentage of their former size
  • A specfic number of polys (within a few)
  • According to distance from a camera

Note that as it requires (and outputs) a triangular mesh, the polygon count may increase as a result of this operation.

A second input for feature edges is provided.

PythonIcon.png polyreduceSOP_Class

Parameters

Polygons /reduce - The polygons which will be candidates for simplification. Other polygons which share points with these might also be affected.

Features /creases - Which polygons are feature edges.

Percentage Tab - Choose reduction level with a percentage.

Keep % /percentage

Number of Polygons Tab - Specify a desired number of polygons.

Keep # /numpolys

Distance Tab - Reduce polygons based on distance to an object.

  • Object /obj - The object to use as a reference.
  • Dist. Threshold /distance - The world distance at which the polygons should be left at full detail.
  • Minimum % /minpercent - A lower bound to the level of reduction.

Stiffen Border /borderweight - Without any constraints, the edges of planar surfaces can erode. This controls a bias which penalizes such erosion.

Stiffen Features /creaseweight - The amount of penalty to add to the feature edges being eroded.

Equalize Edges /lengthweight - This bias penalizes the removal of long edges. It tends to reduce high aspect ratio triangles at the expense of more uniform reduction.

Prevent Mesh Inversion /meshinvert - When enabled, each reduction is tested to see if it would flip a triangle normal. While encurring a slight cost, the results are almost always worth it.

Pre-Triangulate /triangulate - As only triangular polygons will be reduced, this option will automatically triangulate the input polygons.

Prevent Cracking /keepedges - This prohibits the removal of any edge that occurs at the boundary of the polygons. This ensures no cracks develop with unreduced areas.

Use Original Points /originalpoints - When it collapses edges, it will use one of the two original points instead of finding the optimal interior point.