EFFECT

PolygonReduction

 

The Effect->PolygonReduction command in the Model module allows you to reduce the number of polygons in a model. It combines three effects into one dialogue box:

If you want to do some polygon reduction tutorials, see the Tutorial Examples section of the Modelling User's Guide.

 

Procedure

Applying the Polygon Reduction effect involves two procedures:

 

Applying the Effect the First Time

  1. Choose Effect->PolygonReduction.

    The Polygon Reduction dialogue box is displayed.

  1. Set the Processing Options. For more information, see Processing Options.
  2. Select one of the following options, then set the desired parameters for that option:
  1. Click Ok.
  2. Pick a polygon mesh model. The model is highlighted as the effect is applied. A cone icon appears and is automatically selected.
 

The cone icon is not included when you save your scene. You should make sure that you are satisfied with the effect before you save your scene and exit SOFTIMAGE 3D.

 

Modifying the Effect

  1. Select the cone icon representing the effect.
  2. Choose Effect->Edit Parameters. The effect's dialogue box is displayed.
  3. Set the Processing Options.
  4. Activate one of the following options, then set the desired parameters.
  1. Do one of the following:
  1. The resulting model may appear more faceted than the original. For a smoother-looking model, do the following:

 

Processing Options

 

The Processing Options control how the effect is applied. They are common to the Polygon Reduction, Rule Based Reduction, Optimization Based Reduction, and Filter dialogue boxes.

 

Tagged Only, UnTagged Only, and All

These options control which points are considered by the effect. You must tag points before displaying the effect's dialogue box. To tag or retag points while using an effect, you must close the dialogue box using Cancel or Ok, change the tagging on the model, then display the dialogue box again.

If you select Tagged Only, an edge is considered for reduction only if both vertices are tagged. Any new vertices created by the effect are automatically tagged. If you iterate the effect, these new points are included in the reduction.

If you select UnTagged Only, an edge is considered for reduction only if neither vertex is tagged. New vertices created by the effect are untagged. If you iterate the effect, these new points are included in the reduction.

If you select All, the entire model is reduced regardless of tagging.

Notes
There are a few options where tagging information is not applied as expected:

Follow Hierarchy

This option applies the reduction settings to the entire branch of the hierarchy below the selected model. If this option is not selected, only the root node of the selected branch is reduced.

For information about using this option with the Optimization Based effect, see Environment Variables.

Preserve Boundaries

This option preserves edges with only one adjoining face, as found in models with holes or on the edges of grids. If Preserve Boundaries is selected, boundary edges of the model are not processed during a reduction.

Notes
There are some dependencies which determine whether a boundary edge is considered for reduction and whether the Preserve Boundaries option has any effect.

Preserve Materials

This option preserves edges which are boundaries between different materials or textures. If Preserve Materials is selected, these edges are not processed.

Highlight

If this option is selected, any edges that would be modified by the current settings are highlighted in magenta when you click Apply. In general, the effect itself is not applied until you deselect Highlight and apply the effect again.

For this option to work, the effect's cone icon must be the parent of the model.

Note:
There are several settings that do not work with Highlight. In these cases, the Highlight option is ignored and the effect is applied immediately.

- For the Rule Based effect, Highlight works with all reduction criteria except None.

- For the Optimization effect, Highlight is ignored

- For the Filter effect, Highlight works only with:

Original, Undo Last, Reapply, and Standard

These options control the operation performed when you click Apply (or Ok if you are applying the effect for the first time):

Note:
If you change any of the other processing options (such as Tagged Only, Untagged Only, All or Follow Hierarchy), Reapply may not behave as expected. For this reason, it is recommended that you use Undo Last followed by Standard if you want to change the processing options.

Tip:
If you have difficulty applying an effect, or have unexpected results, it is often because you selected the wrong option from these four. Check that the correct option is selected before clicking Apply.

Apply, Cancel, and Ok

 

Rule Based

The Rule Based effect allows you to reduce the number of polygons in a model by eliminating edges according to various rules based on specific criteria, such as the length of edges and strict polygon counts. Rule-based reductions are faster than optimization-based ones and can allow you to reach specific polygon counts, but there is some cost to model fidelity.

The options for rule-based reductions include the following:

The criteria and targets are arranged in a grid. This lets you keep track of the different settings you have used. For example, you can specify separate Face Count targets for the Length and Height criteria.

Criteria

The criteria used to eliminate edges include Radius, Length, Area, Height, Angle, and None.

Radius

When the Radius criterion is selected, the reduction considers each edge in turn. In each adjoining face, it draws a circle. The length of the edge is multiplied by the smaller radius, and the resulting value determines the edge's position in the elimination queue. Edges are eliminated from the smallest value to the largest until the target is reached.

Length

When the Length criterion is selected, edges are eliminated based on their length, from shortest to longest until the target is reached.

Area

When the Area criterion is selected, the reduction considers each edge in turn and calculates the areas of the two adjoining faces. The smaller result determines the edge's position in the elimination queue. Edges are eliminated from the smallest value to the largest until the target is reached.

Height

Unlike other reduction criteria, Height eliminates vertices rather than edges, but the end result is the same - fewer polygons. To use this option, you must also select Remove.

When the Height criterion is selected, the reduction considers each vertex in turn and calculates the average plane of its neighbouring vertices (those vertices that are joined to it by an edge). The height of the vertex above the plane determines the edge's position in the elimination queue. Edges are eliminated from the smallest value to the largest until the target is reached.

Angle

When the Angle criterion is selected, the reduction considers each edge in turn and calculates its dihedral angle. The size of the dihedral angle determines the edge's position in the elimination queue. Edges are eliminated from the smallest value to the largest until the target is reached.

The dihedral angle of an edge is the angle between the normals of its adjacent faces. Edges on flatter areas of a model have small dihedral angles, while edges on angular areas have large dihedral angles.

None

The None criterion lets you eliminate edges directly:

You must tag points before displaying the dialogue box.

Targets

The target options provide different methods for specifying the amount of reduction. The options include Face Count, % Face Count, Value, and % Value.

Face Count

If the Face Count target is selected, the number of polygons in the model is reduced to the specified value. For example, if you enter 400 in the corresponding text box, the reduced model has 400 polygons.

% Face Count

If the % Face Count target is selected, the number of polygons in the model is reduced by the specified percentage. For example, if you enter 80 in the corresponding text box and there 1, 000 polygons in the model, the reduced model has 200 polygons.

Value

If the Value target is selected, the model is reduced by eliminating edges whose criterion is less than the specified value. For example, if you select the Angle criterion and enter 30 in the corresponding Value text box, edges with dihedral angles of less than 30 degrees are eliminated.

% Value

If the % Value target is selected, the effect calculates the range of values in the model for the selected criterion. Edges are eliminated, from smallest value to largest, until the specified percentage is reached in the range of values.

For example, suppose you select Angle and % Value, and enter 40 in the corresponding text box. If the range of dihedral angles in the model is from 10 degrees to 170 degrees, the effect calculates the 40% mark in the range as follows:


10 + 0.40 * (170 - 10) = 74

The effect would eliminate edges with dihedral angles less than 74 degrees.

Other Options

The other Rule Based options include Collapse, Remove, Keep Sharp Angles, Keep Big Areas, Orient, and Square. These options can be used to control how edges are eliminated, as well as to bias the reduction criteria.

Collapse and Remove

These options control what happens when an edge is eliminated:

If the Collapse option is selected, the two end points of the eliminated edge are merged into a single new vertex. This new vertex inherits the edge connections of the deleted end points.

  • In most cases, the new vertex is created at the midpoint of the eliminated edge.
  • If one of the two end points is on a boundary, the new vertex is created at that position.
  • If the edge is a boundary and the Preserve Boundaries processing option is not selected, the new vertex is created at the midpoint. If Preserve Boundaries is selected, the edge is not considered for elimination.
  • If the end points are tagged and the Tagged Only processing option is selected, the new vertex is also tagged.
  • If the Remove option is selected, edges are simply removed. Vertices are neither moved nor created.
    • If all edges referencing a given vertex are removed, then the vertex is also removed.
    • Boundary edges are never removed.

Keep Sharp Angles

Sharp edges often correspond to protruding features or high detail. The Keep Sharp Angles option biases the reduction in favour of keeping edges with sharp angles, regardless of the selected reduction criterion. If this option is selected, then edges with dihedral angles larger than the value specified in degrees are moved to the end of the elimination queue.

The dihedral angle of an edge is the angle between the normals of its adjacent faces. Edges on flatter areas of a model have small dihedral angles, while edges on angular areas have large dihedral angles.

Keep Big Areas

The Keep Big Areas option biases the reduction in favour of keeping edges on polygons with large areas. If this option is selected, you can use the slider to control the percentage weight or influence of the bias on the reduction.

For example, this option is useful in cases where long edges are adjacent to faces with relatively small areas. A reduction by Length might not eliminate these edges because of their relative length. However, if you select Keep Big Areas, the system considers the area of the faces adjoining an edge before it considers just its length.

Orient

The Orient option biases the reduction in favour of eliminating those faces that are not oriented directly on the x, y, or z-axes. The resulting polygon mesh has more edges oriented in the direction of the three major axes. This option is applicable only with the Angle reduction criterion.

Square

The Square option biases the reduction in favour of eliminating faces that are not square. This option is applicable only with the Angle reduction criterion.

 

Optimization Based

The Optimization Based effect allows you to reduce the number of polygons in a model while preserving fidelity to the model.

This effect is a two-step process. The first step generates an invisible point cloud corresponding to the geometry of the model. The second step uses this point cloud to gradually reduce the polygon count until it achieves the best compromise between fidelity to the model and the specified reduction target.

You can perform these steps together or separately. For example, you can create a point cloud, then reduce the polygon mesh using the Rule Based effect, and finally perform an optimization-based reduction using the original point cloud and the reduced polygon mesh. This approach is recommended because it reduces the time required for the reduction while maintaining optimal fidelity.

Because it balances fidelity and reduction, optimization-based reductions use the reduction target as a rough guideline only. For example, you could specify a polygon count of 300, but the resulting model may have more or less polygons.

Note:
The reduction step of the Optimization Based effect can take a very long time. This is because of the amount of computation involved in comparing the starting polygon mesh and point cloud.

In addition, the Highlight and Preserve Boundaries processing options are not applicable for optimizations.

 

Start, Stop, and Query

These options determine what happens when you select the Reapply or Standard processing options and click Apply (or Ok if you are using the effect for the first time).

Note:
Once the reduction step of the optimization is started, you can let it run its course until it finishes. You can also query its progress or stop the process at any point.

When the optimization finishes normally, there is no visual cue. You must tell the effect to display the reduced polygon mesh using Query.

Note:
If a reduction has not terminated on its own, you must stop it before you can undo, return to the original model, or apply a different reduction.

Note:
Optimization does not necessarily follow a uniform pace. If you use the Query option to monitor the optimization, changes may be more apparent at the beginning, then there may be little apparent change in the model until the optimization finishes.

Reduce

The Reduce option is the second step of an optimization-based reduction. It gradually reduces the polygon count until it achieves the best balance between fidelity to the model and the specified reduction target. It is not applicable unless you have either previously generated a point cloud, or selected the Set Point Cloud option in addition to Reduce.

% Face Count and Face Count

These options specify the reduction target. Unlike rule-based reductions, the target is only a rough guideline. This is because the Optimization Based effect tries to achieve a balance between reduction and fidelity to the model.

  • If the Face Count option is selected, the effect tries to reduce the number of polygons in the model to the specified value.
  • If the % Face Count option is selected, the effect tries to reduce the number of polygons in the model by the specified percentage. Note that the percentage refers to the number of polygons when you created the point cloud, not the (possibly reduced) model.

Uniform

If the Uniform option is selected, the vertices in the reduced polygon mesh are distributed evenly across the surface of the model. However, processing takes about 10% longer.

If this option is not selected, the vertices are concentrated in areas of highest curvature. This is useful for models with large stretches of flat or semi-flat areas interspersed with areas of high detail.

Iterations

The Iterations option controls the number of times an optimization pass is made through the model. The default is 1. Higher values cause significantly slower reduction speeds.

Set Point Cloud

The Set Point Cloud option is the first step of an optimization-based reduction. It generates an invisible point cloud based on the current model. This could be the original model, or one that has already been reduced.

The point cloud consists of the vertices of the model, in addition to a certain number of extra points determined by the values of the options described in the following sections. Large point clouds may result in greater fidelity, but they also increase the processing time. If the vertices of the model supply enough information, leave these options at their default values.

Face Sampling

The Face Sampling option specifies the number of points that are randomly added to the point cloud across the model's surface. For performance reasons, this value should be no more than 2000.

Sharp Edge Sampling

The Sharp Edge Sampling option specifies the number of points that are randomly added to sharp edges. For performance reasons, this value should be no more than 3. The next option, Edges Sharper Than, controls which edges are considered sharp.

Edges Sharper Than

The Edges Sharper Than option specifies the dihedral angle above which an edge is considered sharp. The dihedral angle of an edge is the angle between the normals of its adjacent faces. Edges in flat areas have small dihedral angles, and edges in sharp areas have large dihedral angles.

 

Filter

 

The Filter effect cleans up models. This is particularly useful before or after polygon reduction. A variety of options let you control the form of the output and the filtering method used. The Filter effect does not apply any reduction algorithms, but some of the options may result in a reduced model.

 

Output

The Output options determine the format of the final model.

T-mesh

The T-mesh option turns general polygon meshes into optimized triangulated polygon meshes. This is useful if you are developing models for graphics hardware that requires T-meshes.

Quads and Angle

The Quads option turns triangulated polygon meshes into polygon meshes with quadrilateral faces (quads). This is useful if you are developing models for graphics hardware that requires such polygons.

The Angle option lets you fine-tune this process by specifying a dihedral angle above which the Filter effect does not combine triangles to form a quad. The dihedral angle of an edge is the angle between the normals of its adjacent faces. Edges in flat areas have small dihedral angles, and edges in sharp areas have large dihedral angles.

If the Filter effect cannot create a quad (for example, the angle is too sharp or there is an odd number of triangles), it draws an edge between a vertex and itself, then sets the drawing order so that the model is not corrupted. The result is a quad that looks like a triangle; such a quad is said to be degenerate.

Merge Tagged Vertices

The Merged Tagged Vertices option merges all tagged vertices into one vertex.

Note:
Similar results can be achieved with a rule-based reduction by tagging a set of points and using the None criterion, with Tagged Only and Collapse selected. The difference is that Rule Based effect collapses edges, whereas Merge collapses vertices.

Fill Holes

The Fill Holes option lets you fill holes in the model's surface.

Check Input Model

The Check Input Model option preprocesses the model and tries to correct flaws that cannot be handled by the reduction algorithms.

Remove Collinear Edges

The Filter effect considers edges to be "collinear" if they share a vertex that has no other adjoining edges. Such a situation occurs when two faces share multiple edges. The Remove Collinear Edges option lets you eliminate these edges by removing the shared vertex. The options let you restrict the type of collinear edges that are merged.

By Angle

If the difference in angles of a pair of collinear edges is less than the value specified by the By Angle option, the pair of edges is considered a candidate for merging. For example, if you entered a value of 10, pairs of edges that differ in angle by less than 10 degrees are joined.

By Length

If the lengths of a pair of edges are less than the percentage specified by the By Length option, relative to the lengths of all edges in the model, the pair of edges is considered a candidate for merging. If this value is zero, the relative lengths of edges are ignored.

Restrict Count

The Restrict Count option specifies the maximum length of chains of collinear edges that are considered for merging. For example, if this option is set to 2, then only pairs of edges are considered. If this option is set to zero, chains of unlimited length are considered.

 

Environment Variables

This section describes the environment variables used by the polygon reduction effects. For more information about environment variables in general, refer to the SOFTIMAGE 3D Installation Guide.

 

SI_CUSTOM_REFINE_MAX_OPT

In optimization-based reductions, a separate process is started for each node of the model hierarchy. A large hierarchy could result in so many simultaneous reduction processes that it could bring the machine to a halt. Consequently, there is a maximum number of reduction processes that can run simultaneously, as set by the environment variable SI_CUSTOM_REFINE_MAX_OPT. The default value for this variable is 5.

For example, if this variable is left at 5, and the model hierarchy has 10 parts, the effect passes a maximum of five items (including the root) to the reduction effect for processing at one time. Having finished the first five, it then processes the next five, and so on.

If the model is made up of many parts, the reduction may not process all parts in the hierarchy at the same time. At first, it may appear that some items are not being handled by the reduction. However, the entire hierarchy is eventually processed.

SI_CUSTOM_REFINE_TEMP_PATH

The SI_CUSTOM_REFINE_TEMP_PATH environment variable specifies the directory used to store temporary files needed by the polygon reduction effects. If this variable is not set, /usr/tmp is used.

 


Last updated 02-apr-1998