Skip to main content

vJSONScaleFromMesh

Scales the vector from the closest mesh vertex to each point by a multiplier.

IntermediateMograph / JSONJSONArrayScriptVal
vJSONScaleFromMesh node

vJSONScaleFromMesh takes an array of XYZ points and a mesh. For each point it finds the closest Mesh Points vertex and multiplies the distance to it by Distance Multiplier.

Parameters​

ParameterTypeDefaultDescription
Distance MultiplierFloat1Multiplier for the distance to the closest vertex. Slider 0 to 2, default 1.
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.
+1 more parameters
ParameterTypeDefaultDescription
Mesh PointsDATATYPE—Points of the mesh that the input is compared with.
Read the full description

Each point P becomes R + (P - R) * Distance Multiplier, where R is the closest Mesh Points vertex. A multiplier of 1 (the default) leaves the points where they are, 0 puts every point on its vertex, and a value above 1 pushes the points away from the vertex along the same line. A negative value would put the point on the opposite side.

Affect X, Y and Z are checked by default, and an unchecked axis keeps its input value. The slider runs from 0 to 2. Only the vertex list of the mesh is used. If the points or the mesh are empty, the output is empty.

Example Connections​

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