Separate

Filter collection rows by mask or attribute comparison.

What it does

Separate splits a collection of shapes, points, or any table of rows into a Pass group and a Reject group. In Mask mode an external mask input decides row by row: a number array is compared against Threshold, an integer array passes on non-zero, a single number broadcasts to every row, and with nothing wired every row passes. In Attribute mode one attribute column is compared against another attribute or a plain number, using an operator (>, <, >=, <=, ==, !=). Both modes give two outputs to route downstream, plus a count of how many rows landed in each. Invert swaps them.

When to use it

ParameterTypeDefault
inputOneOf([Collection])
modeString"Mask"
maskOneOf([NumberArray, IntArray, Number])
thresholdNumber0.500
attributeString"age"
operatorString">="
compare_toString"life"
invertBooleanfalse
bake_targetString""
strengthNumber1

Gotchas

Mode changes which inputs matter. Mask mode reads the Mask input and Threshold; Attribute mode reads Attribute, Operator, and Compare To. The other group's parameters are hidden but still present, so switching modes back and forth does not lose settings.

In Attribute mode, Compare To is checked as a number first. If it parses as one (100), it is used as a literal; otherwise it is read as another attribute name. An attribute named to look like a number is treated as the literal, not the column.

With nothing wired into Mask, every row passes and Reject is empty. If a cull is expected and nothing changes, check that the mask is connected.

Bake Target lets an out-of-band Recorder capture the Pass collection on every frame Separate filters, without wiring Pass back into the Recorder and creating a cycle in the graph.

Worked example

  1. Add a Separate node and wire your collection (points, shapes, or a table) into Input.

  2. Leave Mode on Mask, wire a number array or bool array into Mask, and raise or lower Threshold until the split looks right.

  3. Wire Pass into whatever should keep those rows, and Reject into a separate branch, or a Delete/discard path, for the rest.

  4. To split on an attribute instead, set Mode to Attribute, choose the Attribute column, an Operator, and a Compare To value or column.

  5. Toggle Invert if Pass and Reject were wired backwards, rather than rewiring the graph.

See also

Sort · Partition · Mutate · Attributes