Skip to main content

vArrayRelaxOnMesh

Moves each point toward the average of its 6 nearest points, then snaps it to the closest mesh vertex.

AdvancedMograph / ArrayArrayScriptValJSON
vArrayRelaxOnMesh node

vArrayRelaxOnMesh takes an array of XYZ points and a mesh, and repeats a smoothing pass Relax Iterations times. Relax Strength sets how far each point moves in a pass.

Parameters​

ParameterTypeDefaultDescription
Surface OffsetFloat0Distance from the vertex along its estimated normal. Slider -1 to 1, default 0.
Relax IterationsInteger10Number of passes. Minimum 1, slider 1 to 100, default 10.
Relax StrengthFloat0.5How far a point moves toward the average of its neighbors in a pass. Range 0 to 1, default 0.5.
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.
+3 more parameters
ParameterTypeDefaultDescription
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

In each pass every point finds its 6 nearest other points and moves toward their average by Relax Strength (0 to 1, default 0.5). The moved point is then replaced by the closest Mesh Points vertex, plus Surface Offset along the normal estimated there. Relax Iterations (default 10) is the number of passes.

This pulls points toward their neighbors and does not push them apart. After the last pass the points lie on mesh vertices, so points can share a vertex. Affect X, Y and Z keep unchecked axes at the input value. Only the vertex list of the mesh is used. If Points or Mesh Points is empty, the output is empty.

Example Connections​

vArrayRandom.Output -> vArrayRelaxOnMesh.ArrayPoints
vArrayFromOBJ.Points -> vArrayRelaxOnMesh.MeshPoints
vArrayRelaxOnMesh.Output -> vArrayCameraProjection.ArrayA
vArrayCameraProjection.Output -> vArrayShapeRender.ArrayPoint
Background.Output -> vArrayShapeRender.Input