Sample Nearest Spline
Sample informations from the nearest spline
The Sample Nearest Spline node retrieves and blends spatial data from the target splines within a defined range, enabling fine-tuned sampling methods and weighting for tasks such as spline-based proximity analysis, spatial alignment, and extracting relational data.
Table of content
The Sample Nearest Splines finds nearest(s) target splines and extract relational spatial data from them.
Sampling
Property | Description |
---|---|
Settings | |
Sample Inputs | Choose which input splines are to be sampled based on whether they’re closed loop or not. |
Sample Method | Selects the sampling method. See Sampling Methods. |
Range Min | Minimum sampling range. |
Range Max | Maximum sampling range. Use 0 to sample all targets.
|
Local Range Min | If enabled, uses a per-point double attribute value as minimum sampling range. |
Local Range Max | If enabled, uses a per-point double attribute value as maximum sampling range. |
Distance Settings | TBD |
Splines that are not within range are ignored. If no spline is found within the specified range, the sampling for that point will be marked as Usuccessful.
Weighting | |
Weight Method | Selects the method used to compute the weight of each target. See Weighting. |
Weight Over Distance | Curve used to sample the final weight of each target. |
Sampling Methods
Method | Description |
---|---|
All (Within Range) | Samples all splines within the specified range. |
Closest Target | Sample the single closest target spline within the specified range. |
Farthest Target | Sample the single farthest target spline within the specified range. |
Weighting
There is two weighting method available. Full Range
and Effective Range
. Each method outputs a [0..1]
value that will be used to sample the Weight Over Distance
curve.
However, there is a critical nuance between the two:
-
Full Range
is a simple normalization, each target distance is divided by the longest one. As such, it’s very unlikely the curve will get sampled close tox=0
. -
Effective Range
remaps each target distance using the shortest & longest distance as min/max. As such, the shortest sampled distance will sample the curve atx=0
, and the longest atx=1
.
Note that the
Effective Range
method tends to spread/scale the input set of values – but allows one to leverage the full range of the curve no matter the min/max input values.
Hence, usingFull Range
with only high (or low) input value will only sample a very narrow portion of the curve.
Important note: when using the
Within range
sample method, some outputs will use the final weighted position/transforms for their calculations; although mathematically correct, this may yield unusuable/innacurate results.
Outputs
Outputs are values extracted from the neighbor(s), and written to attributes on the output points.
Output | Description |
---|---|
Generic | |
Successbool
| TBD |
Spatial Data | |
TransformFTransform
| TBD |
Look AtFVector
| TBD |
└─ Align | TBD |
└─ Use Up from… | TBD |
└─ Up Vector | TBD |
Distancedouble
| TBD |
Signed Distancedouble
| TBD |
└─ Axis | TBD |
└─ Only if Closed | TBD |
Angledouble
| TBD |
└─ Axis | TBD |
└─ Range | TBD |
Timedouble
| TBD |
Num Insideint32
| TBD |
└─ Only if Closed | TBD |
Num Samplesint32
| TBD |
Closed Loopbool
| TBD |
Based on the selected
Sample method
, the output values are a weighted average of all the sampled targets. See Weighting.
Tagging
Some high level tags may be applied to the data based on overal sampling.
Tag | Description |
---|---|
Has Successes Tag | If enabled, add the specified tag to the output data if at least a single spline has been sampled. |
Has No Successes Tag | If enabled, add the specified tag to the output data if no spline was found within range. |
Note that fail/success tagging will be affected by points filter as well; since filtered out points are considered fails.
Advanced
Property | Description |
---|---|
Process Filtered Out As Fails | If enabled, mark filtered out points as “failed”. Otherwise, just skip the processing altogether. Only uncheck this if you want to ensure existing attribute values are preserved. Default is set to true, as it should be on a first-pass sampling. |