Aller au contenu

Custom Poly Modifier

By Kriss Norde

The Custom Poly modifier is added to Polygon masks or paths and recalculates their points with mathematical expressions.

Overview

Similar to the Custom and pCustom tools, the Custom Poly lets you reposition the existing points of a polyline, or replace them completely with a new set of points. The expressions are evaluated for each point of the output polygon.

Where to find this node

Right-click the "Right-click here for shape animation" text at the bottom of the Polygon controls, then choose Insert > Custom Poly. The controls appear in the Modifiers tab of the Polygon's Inspector.

Controls tab

A single point input and number variables to use when animating the expressions. The default is one point and four numbers, expandable to a maximum of nine. Additional points and numbers are added from the Config tab.

Polyline tab

Connect Source Polyline here
connects other polylines to the modifier.
Show View Controls
a checkbox that toggles the visibility of the polyline controls in the viewer.
Number of Points
the number of output points, which controls how much the polyline is subdivided. 0 = the number of original source points.
Poly Expression X/Y
fields for the mathematical expressions, for example px*(1-n1)+n1*get2x(disp) and py*(1-n1)+n1*get2y(disp).

The modifier uses most of the same variables as the Expression modifier (n1..n9, p1x..p9x, p1y..p9y, math functions...) and adds:

  • px, py: the current point on the source polygon.
  • disp: the point's displacement along the polyline (0.0 is the start, 1.0 is the end).
  • index: the current point's index (zero-based).
  • num: the number of output points.
  • getx(disp), gety(disp): values taken from anywhere on the polyline.
  • getx_at(disp, time), gety_at(disp, time): values taken from polylines at other times.
  • get2x/y(), get3x/y(), get2x/y_at(), get3x/y_at(): the same for the second and third source polygons.

Config tab

Selects how many Points and Numbers are shown in the modifier (nine at most) and gives them custom names for easier organization.