Skip to main content

vScriptValClassifyByMesh

Splits points into inside, outside and on-surface-band outputs relative to a mesh.

AdvancedMograph / ScriptValScriptValArrayJSON
vScriptValClassifyByMesh node

vScriptValClassifyByMesh takes an array of XYZ points and a mesh, and writes each point to one of three outputs. The inside test checks which side of the plane at the nearest mesh point the point is on.

Parameters​

ParameterTypeDefaultDescription
Offset SpaceDropdownNormalNormal (default) shifts the test position along the normal of the closest vertex. World shifts it by the World Offset values.
Surface Offset DistanceFloat0Shift along the normal in Normal space. Slider -1 to 1, default 0. Hidden in World space.
Flip NormalFloat0Reverses the normal used for the shift. Default off. Hidden in World space.
World Offset XFloat0X shift of the test position in World space. Default 0. Hidden in Normal space.
World Offset YFloat0Y shift of the test position in World space. Default 0. Hidden in Normal space.
+7 more parameters
ParameterTypeDefaultDescription
World Offset ZFloat0Z shift of the test position in World space. Default 0. Hidden in Normal space.
Affect XFloat1The shift applies to X when checked (default).
Affect YFloat1The shift applies to Y when checked (default).
Affect ZFloat1The shift applies to Z when checked (default).
Surface Band ThicknessFloat0Points whose test position is within this distance of the closest mesh vertex go to the On Surface Band output. Minimum 0, slider 0 to 1, default 0 (no band).
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 patch point (the average of a vertex and its 7 nearest neighbors) and the normal estimated there, which points away from the center of the mesh. Points behind that normal go to Inside, others to Outside. With no mesh, every point goes to Outside. The output points are the input points, with their first three values only.

The test position can be shifted first. Normal offset space moves it along the normal of the closest vertex by Surface Offset Distance, reversed by Flip Normal. World space adds World Offset X, Y and Z. Affect X, Y and Z limit the shift to the checked axes.

Surface Band Thickness (default 0) sends points whose test position is within that distance of the closest mesh vertex to On Surface Band instead of Inside or Outside.

Example Connections​

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