Skip to main content

vJSONSlideOnMesh

Moves each point in a direction, then snaps it to the closest mesh vertex.

AdvancedMograph / JSONJSONArrayScriptVal
vJSONSlideOnMesh node

vJSONSlideOnMesh takes an array of XYZ points and a mesh. Each point is moved by Slide Distance along Direction X, Y and Z, and the result is replaced by the closest mesh vertex.

Parameters​

ParameterTypeDefaultDescription
Direction XFloat0X of the slide direction. Default 0.
Direction YFloat0Y of the slide direction. Default 0.
Direction ZFloat0Z of the slide direction. Default 0. A direction of 0, 0, 0 is treated as 0, 0, 1.
Slide DistanceFloat0.1Distance of the move along the direction. Slider -10 to 10, default 0.1.
Surface OffsetFloat0Distance from the vertex along its estimated normal. Slider -1 to 1, default 0.
+5 more parameters
ParameterTypeDefaultDescription
Affect XFloat1X comes from the result when checked (default), otherwise it keeps the input value.
Affect YFloat1Y comes from the result when checked (default), otherwise it keeps the input value.
Affect ZFloat1Z comes from the result when checked (default), otherwise it keeps the input value.
PointsDATATYPE—Point positions.
Mesh PointsDATATYPE—Points of the mesh that the input is compared with.
Read the full description

The direction is made unit length. A direction of 0, 0, 0, the default, becomes 0, 0, 1. Each point is moved by Slide Distance (default 0.1, slider -10 to 10) along it, and the node then finds the closest Mesh Points vertex to the moved position. The output is that vertex plus Surface Offset along the normal estimated there.

The output points are therefore always mesh vertices. Affect X, Y and Z keep unchecked axes at the input value. If the mesh or the points are empty, the points are output unchanged.

Example Connections​

vJSONPointsOnGrid.Output -> vJSONSlideOnMesh.ArrayPoints
vJSONFromOBJ.Points -> vJSONSlideOnMesh.MeshPoints
vJSONSlideOnMesh.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input