Skip to main content

vJSONMirrorThruMesh

Reflects each point through the closest mesh vertex, by a Blend amount.

AdvancedMograph / JSONJSONArrayScriptVal
vJSONMirrorThruMesh node

vJSONMirrorThruMesh takes an array of XYZ points and a mesh, finds the reference point on the mesh for each point, and puts the point on the opposite side of it. Blend sets how far the point moves toward the reflected position.

Parameters​

ParameterTypeDefaultDescription
Mirror ThroughDropdownSurfaceSurface (default), Vertex or Face Centroid. Surface and Vertex use the closest Mesh Points vertex. Face Centroid uses the closest average of a vertex and its 7 nearest neighbors.
BlendFloat1Mix between the original (0) and the reflected position (1). Range 0 to 1, default 1.
Affect XFloat1X is reflected when checked (default), otherwise it keeps the input value.
Affect YFloat1Y is reflected when checked (default), otherwise it keeps the input value.
Affect ZFloat1Z is reflected when checked (default), otherwise it keeps the input value.
+2 more parameters
ParameterTypeDefaultDescription
PointsDATATYPE—Point positions.
Mesh PointsDATATYPE—Points of the mesh that the input is compared with.
Read the full description

For each input point the node finds a reference point R: the closest Mesh Points vertex (Surface and Vertex give the same result) or the closest patch point (Face Centroid), the average of a vertex and its 7 nearest neighbors. The reflected position is 2 * R - P, and the output is P plus the difference to that position times Blend.

Blend runs from 0 to 1 and defaults to 1, which gives the full reflection. Affect X, Y and Z are checked by default, and an unchecked axis keeps the input value.

With no mesh vertices, no points are written and the output is empty.

Example Connections​

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