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

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
| Parameter | Type | Default | Description |
|---|---|---|---|
| Offset Space | Dropdown | Normal | Normal (default) shifts the test position along the normal of the closest vertex. World shifts it by the World Offset values. |
| Surface Offset Distance | Float | 0 | Shift along the normal in Normal space. Slider -1 to 1, default 0. Hidden in World space. |
| Flip Normal | Float | 0 | Reverses the normal used for the shift. Default off. Hidden in World space. |
| World Offset X | Float | 0 | X shift of the test position in World space. Default 0. Hidden in Normal space. |
| World Offset Y | Float | 0 | Y shift of the test position in World space. Default 0. Hidden in Normal space. |
+7 more parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| World Offset Z | Float | 0 | Z shift of the test position in World space. Default 0. Hidden in Normal space. |
| Affect X | Float | 1 | The shift applies to X when checked (default). |
| Affect Y | Float | 1 | The shift applies to Y when checked (default). |
| Affect Z | Float | 1 | The shift applies to Z when checked (default). |
| Surface Band Thickness | Float | 0 | Points 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). |
| Points | DATATYPE | — | Point positions. |
| Mesh Points | DATATYPE | — | 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
- Draw only the points inside a mesh
- Use the outside points
vScriptValPointsOnGrid.Output -> vScriptValClassifyByMesh.ArrayPoints
vScriptValFromOBJ.Points -> vScriptValClassifyByMesh.MeshPoints
vScriptValClassifyByMesh.Inside -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input
vScriptValRandom.Output -> vScriptValClassifyByMesh.ArrayPoints
vScriptValFromOBJ.Points -> vScriptValClassifyByMesh.MeshPoints
vScriptValClassifyByMesh.Outside -> vScriptValTranslate.Input