Skip to main content

vScriptValMaskByMesh

Keeps only the points whose distance to the closest mesh vertex lies between Min and Max Distance.

AdvancedMograph / ScriptValScriptValArrayJSON
vScriptValMaskByMesh node

vScriptValMaskByMesh takes an array of XYZ points and a mesh, and outputs the points whose distance to the closest mesh vertex is inside a band. Invert Mask keeps the other points instead.

Parameters​

ParameterTypeDefaultDescription
Max DistanceFloat0.1Largest distance to the mesh that is kept. Minimum 0, slider 0 to 10, default 0.1.
Min DistanceFloat0.0Points closer than this are removed. Minimum 0, slider 0 to 10, default 0. Limited to Max Distance.
Invert MaskInteger0Keeps the points that fail the distance test instead. Default off.
Mask ModeDropdownHardHard (default) or Soft Falloff. Soft Falloff fades the weight only when the hidden Falloff Distance is above 0.
Falloff DistanceFloat0.0Hidden control. In Soft Falloff, the distance over which the weight drops from 1 to 0 outside the band. Default 0.
+8 more parameters
ParameterTypeDefaultDescription
Weight PowerFloat1.0Hidden control. Exponent applied to the weight. Range from 0.01, default 1.
Min Output WeightFloat0.01Hidden control. Points with a weight at or below this value are removed. Range 0 to 1, default 0.01.
Append Weight As 4th ValueInteger0Hidden control. Adds the weight as a fourth value in Soft Falloff when on. Default off.
Keep Input If Mesh MissingInteger1Passes the input through when there is no mesh data, if on (default). When off, the output is empty.
Output PositionDropdownOriginalOriginal (default) keeps the position. Closest On Surface moves the point to the closest mesh vertex.
Surface OffsetFloat0.0Hidden control. Offset along the estimated normal of the vertex for Closest On Surface. Slider -1 to 1, default 0.
PointsDATATYPE—Point positions.
Mesh PointsDATATYPE—Points of the mesh that the input is compared with.
Read the full description

For each point the node finds the closest Mesh Points vertex and its distance. In Hard mode the point is kept when the distance is from Min Distance (default 0) up to Max Distance (default 0.1). Min Distance is limited to Max Distance. Invert Mask keeps the points that fail the test instead.

Output Position keeps the original position (default) or moves the point to the closest vertex. Five hidden controls are also read: Falloff Distance, Weight Power, Min Output Weight, Append Weight As 4th Value and Surface Offset. Soft Falloff fades the weight outside the band over the hidden Falloff Distance, which is 0 by default.

If there is no mesh, Keep Input If Mesh Missing (on by default) passes the points through, otherwise the output is empty.

Example Connections​

vScriptValPointsOnGrid.Output -> vScriptValMaskByMesh.ArrayPoints
vScriptValFromOBJ.Points -> vScriptValMaskByMesh.MeshPoints
vScriptValMaskByMesh.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input