WEMReducePolygons

MLModule
genre WEMProcessing
status stable
author Bart De Dobbelaer
package MeVisLab/Standard
dll MLWEMModules
definition MLWEMModules.def
see also WEMSubdivide
keywords WEM, collapse, reduce, reduction, simplification, quadric, error, metric

Purpose

The module WEMReducePolygons reduces the number of primitives of the input WEM by collapsing edges using a quadric error metric to decide which edges to collapse first.

Details

The edge collapse method collapses an edge so that its former head and tail nodes fall together (and only one of them remains in the mesh). When collapsing an edge, its two adjacent faces are also removed from the mesh.

Each collapse operation introduces an error in the resulting mesh. It is feasible to first collapse those edges that introduce as little error as possible in the resulting mesh. To describe the error introduced, the Quadric Error Metric is used. More information on the topic can be found here.

Tips

For a WEMIsoSurface generated mesh, the reduction percentage can easily be set to 70% without losing geometrical information.

Windows

Default Panel

../../../Modules/ML/MLWEMModules/mhelp/Images/Screenshots/WEMReducePolygons._default.png

Input Fields

inWEM

name: inWEM, type: MLBase

The input WEM that needs a reduction in the number of polygons.

Output Fields

outWEM

name: outWEM, type: MLBase

The WEM with the reduced number of polygons.

Parameter Fields

Visible Fields

Auto Apply

name: autoApply, type: Bool, default: TRUE

If checked, the module will reduce the polygons of the input WEM on any change of a parameter.

Auto Update

name: autoUpdate, type: Bool, default: TRUE

If checked, the module will reduce the polygons of the input WEM if it changes.

Apply

name: apply, type: Trigger

If pressed, the module reduces the number of polygons of the input WEM.

Label

name: label, type: String

Sets a label string stored in the output WEM if Modify Attributes is checked.

Description

name: description, type: String

Sets a description string stored in the output WEM if Modify Attributes is checked.

Modify Attributes

name: modifyAttributes, type: Bool, default: FALSE

If checked, the content of the Description and the Label is stored in the output WEM.

Reduction Percentage

name: targetReduction, type: Integer, default: 70, minimum: 0, maximum: 100

Sets the amount of reduction that is required. The parameter ranges from 0 to 100 percent, although very small and very large reduction rates are not useful.

Smooth

name: smooth, type: Bool, default: TRUE

If checked, the generated mesh will be smoothed.

The resulting error will be a little larger - removing more features - but the quality of the mesh will improve.

Use Expert Mode

name: useExpertMode, type: Bool, default: FALSE

If checked, advanced options are available.

The smooth option corresponds to a middle vertex placement while using the weight factors. Not smoothing corresponds to an optimal vertex placement while not using the weight factors. When the expert mode is used, options can be combined to get a better result.

Vertex Placement

name: vertexPlacementMode, type: Enum, default: Middle

Defines the vertex placement mode.

Although the resulting Quadric Error is clearly larger in the case of Middle placement, the resulting mesh tends to be smoother.

Values:

Title Name Description
Optimal Optimal New node will be inserted in such a way that the resulting Quadric Error is as small as possible.
Middle Middle New nodes are just inserted in the middle between the former head and tail node.

Use face area weights

name: areaWeightedQuadrics, type: Bool, default: TRUE

If checked, edges between triangles with a small area are collapsed first. Uniform face areas are encouraged this way.

Use node valence weights

name: valenceWeightedQuadrics, type: Bool, default: TRUE

If checked, edges with head and tail nodes that have a low valence are collapsed first.

The resulting valence for the new node is valencehead + valencetail - 2. Overall uniform triangles are encouraged this way.

Use edge length weights

name: edgeWeightedQuadrics, type: Bool, default: TRUE

If checked, edges with a short length are collapsed first. Uniform face areas are encouraged this way.

Hidden Fields

isProcessing

name: isProcessing, type: Bool, default: FALSE

elapsedTime

name: elapsedTime, type: Float, default: 0

id

name: id, type: Integer, default: 0

autoClear

name: autoClear, type: Bool, default: FALSE

removePreviousWEMs

name: removePreviousWEMs, type: Bool, default: TRUE

show

name: show, type: Bool, default: TRUE

editable

name: editable, type: Bool, default: TRUE

useFaceDiffuseColor

name: useFaceDiffuseColor, type: Bool, default: TRUE

usePolygonOffset

name: usePolygonOffset, type: Bool, default: FALSE

listenToFinishNotifications

name: listenToFinishNotifications, type: Bool, default: TRUE

forwardRepaintNotifications

name: forwardRepaintNotifications, type: Bool, default: TRUE

forwardSelectionNotifications

name: forwardSelectionNotifications, type: Bool, default: TRUE

progress

name: progress, type: Float, persistent: no

useInputWEMToCreateOutputWEM

name: useInputWEMToCreateOutputWEM, type: Bool, persistent: no

triangulationMode

name: triangulationMode, type: Enum, default: Strip

Values:

Title Name
Center node Center node
Fan Fan
Strip Strip

numEdgeCollapses

name: numEdgeCollapses, type: Integer, default: 0

reduction

name: reduction, type: Integer, default: 0