Skip to main content

vScriptValBooleanMaskOps

Combines two masks per index with a boolean operation and outputs a mask or points.

AdvancedMograph / ScriptValScriptValArrayJSON
vScriptValBooleanMaskOps node

vScriptValBooleanMaskOps takes Mask A and Mask B and applies a boolean operation to each index. A value counts as true when it is above Threshold, and Output Mode chooses the form of the result.

Parameters​

ParameterTypeDefaultDescription
OperationDropdownANDAND (default), OR, XOR, A AND NOT B, NOT A or NOT B.
Output ModeDropdownMask Scalars (0/1, any axis true)Mask Scalars (0/1, any axis true) is the default. Per-Axis XYZ Mask gives one 0 or 1 per axis. The three point modes write the A point, the B point or their average when the result is true, and leave the element out when it is false.
ThresholdFloat0Values above it count as true. Slider -1 to 1, default 0.
Output AmountFloat1Multiplies the result. Minimum 0, default 1. In the point modes 0 scales the points to 0, 0, 0.
X AmountFloat1Multiplies the X result in the per-axis and point modes. Default 1.
+5 more parameters
ParameterTypeDefaultDescription
Y AmountFloat1Multiplies the Y result in the per-axis and point modes. Default 1.
Z AmountFloat1Multiplies the Z result in the per-axis and point modes. Default 1.
Trim ZerosInteger0Removes output elements that are zero on all axes. Default off.
Mask ADATATYPE—First mask, one 0 or 1 value per element.
Mask BDATATYPE—Second mask, one 0 or 1 value per element.
Read the full description

Each element is read as X, Y and Z (a single number is used for all three). A value is true when it is above Threshold. Operation (AND, OR, XOR, A AND NOT B, NOT A or NOT B) is applied to each axis and to the whole point, which is true when any axis is true. Missing elements count as 0.

Mask Scalars writes 1 or 0 times Output Amount for the whole point. Per-Axis XYZ Mask writes one 1 or 0 per axis, times Output Amount and X, Y or Z Amount. The three point modes write the A point, the B point or the average of both, scaled by the amounts, when the result is true. When it is false the element is left out, so the output gets shorter.

Trim Zeros removes every output element that is zero on all axes.

Example Connections​

vScriptValWeightMap.Output -> vScriptValLogicThreshold.Input
vScriptValLogicThreshold.Output -> vScriptValBooleanMaskOps.MaskA
vScriptValPerlin3Noise.Output -> vScriptValBooleanMaskOps.MaskB
vScriptValBooleanMaskOps.Output -> vScriptValApplyMask.Mask