vArrayWeightByMeshProx
Outputs a 0 to 1 weight per point from its distance to the closest mesh vertex.

vArrayWeightByMeshProx takes an array of XYZ points and a mesh, and outputs one weight per point on the Output socket. A second output, Points, holds the points projected toward the mesh.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Max Distance | Float | 0.5 | Distance at which the weight reaches 1. Minimum 0.0001, slider 0.0001 to 10, default 0.5. |
| Falloff | Dropdown | Linear | Linear (default), Squared or Root. The shape of the weight. |
| Invert Weight | Integer | 0 | Uses 1 minus the weight when on. Default off. |
| Project Amount | Float | 1 | How far the Points output moves toward the closest vertex. Range 0 to 1, default 1. |
| Points | DATATYPE | — | Points to weigh. |
+1 more parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Mesh Points | DATATYPE | — | Mesh vertices that distances are measured to. |
Read the full description
For each point the node finds the closest Mesh Points vertex and takes the distance d. The raw weight is min(1, d / Max Distance), which is 0 at the mesh and 1 at Max Distance or farther. Falloff shapes it: Linear uses it as it is, Squared squares it, Root takes the square root. Invert Weight turns the weight into 1 minus it. Max Distance defaults to 0.5 and has a minimum of 0.0001.
The Points output holds each point moved toward its closest vertex by Project Amount (0 to 1, default 1), so by default it holds the vertices. Both outputs have the array and size wrapper. With an empty mesh both outputs are empty.
Example Connections
- Use weights as a mask
- Color points by distance to the mesh
vArrayPointsOnGrid.Output -> vArrayWeightByMeshProx.ArrayPoints
vArrayFromOBJ.Points -> vArrayWeightByMeshProx.MeshPoints
vArrayWeightByMeshProx.Output -> vArrayApplyMask.Mask
vArrayPointsOnGrid.Output -> vArrayWeightByMeshProx.ArrayPoints
vArrayFromOBJ.Points -> vArrayWeightByMeshProx.MeshPoints
vArrayWeightByMeshProx.Output -> vArrayRampMap.Scalars