Appearance
Spline Nodes
Spline nodes receive Unity SplineContainer data through a dedicated Spline input port and produce Point data that downstream attribute or instancer nodes can consume. All nodes in this category use the purple node color (#B34DB3).
Spline Sampler
Category: Spline
Description: Samples points along or inside splines and outputs Point data with spline-derived attributes.
The node can operate in two dimensions:
- OnSpline — samples positions along the spline curve itself.
- OnInterior — fills the enclosed area of a closed spline with a regular grid of points (XZ-plane projected).
Ports
| Direction | Name | Type |
|---|---|---|
| Input | Spline | Spline |
| Output | Out | Point |
Settings
Dimension
| Field | Type | Default | Description |
|---|---|---|---|
dimension | SplineSamplerDimension | OnSpline | Whether to place points along the spline curve or fill the closed interior. |
SplineSamplerDimension enum
| Value | Description |
|---|---|
OnSpline | Samples positions directly on the spline curve at regular count or distance intervals. |
OnInterior | Grid-scans the XZ bounding box of a closed spline and keeps only points inside the polygon. Requires a closed spline. |
On Spline
| Field | Type | Default | Description |
|---|---|---|---|
mode | SampleMode | ByCount | How sample positions are determined. See SampleMode enum below. |
sampleCount | int | 20 | Number of evenly-spaced samples. Used when mode = ByCount. Minimum is 2. |
sampleDistance | float | 1.0 | World-space distance between samples. Used when mode = ByDistance. Minimum is 0.001. |
includeEndPoints | bool | true | When mode = ByDistance, guarantees the spline end point (t = 1) is always included. |
SampleMode enum
| Value | Description |
|---|---|
ByCount | Divides the normalised spline parameter [0, 1] into sampleCount - 1 equal steps. |
ByDistance | Steps along the spline in world-space increments of sampleDistance. |
On Interior
| Field | Type | Default | Description |
|---|---|---|---|
interiorSpacing | float | 1.0 | XZ grid cell spacing in world units. Smaller values create denser point clouds. Minimum is 0.01. |
densityFalloff | bool | false | When enabled, reduces point density near the spline boundary using a linear falloff. |
falloffDistance | float | 2.0 | World-space distance from the boundary over which density falls to zero. Only effective when densityFalloff is enabled. |
Spline Filtering
| Field | Type | Default | Description |
|---|---|---|---|
useAllSplines | bool | true | Process all splines in the input SplineContainer. Disable to filter by index. |
splineMask | int | ~0 | Bitmask controlling which spline indices are processed when useAllSplines is false. Each bit corresponds to one spline index (bit 0 = spline 0, etc.). Hidden in the inspector. |
Attributes
| Field | Type | Default | Description |
|---|---|---|---|
outputCurvature | bool | true | Compute and store spline curvature at each sample point as the SplineCurvature attribute. |
Provided Attributes
The following metadata attributes are always written to every output point:
| Attribute Name | Type | Description |
|---|---|---|
SplineAlpha | float | Normalised spline parameter t in the range [0, 1]. 0 = spline start, 1 = spline end. |
SplineDistance | float | World-space arc-length distance from the spline start, in units. Computed as t × splineLength. |
SplineCurvature | float | Curvature magnitude at the sample point. Only written when outputCurvature is enabled. |
SplineBorderDistance | float | Minimum world-space distance from the point to the spline boundary polygon. OnInterior only. |
All four are declared through IPPGAttributeProvider.
Point Transform
Every sampled point receives:
- Position: The spline position converted from world space into the
PPGComponent's local space. - Rotation: A look-rotation built from the spline tangent and up vectors at the sample position. Interior points use the tangent/up of the nearest spline boundary point.
- Scale:
(1, 1, 1)(unit scale). - Density:
1.0for OnSpline points. For OnInterior points,1.0unlessdensityFalloffis enabled, in which case the value linearly decays to0withinfalloffDistanceof the boundary.
Tips
- The interior polygon is approximated with 64 line segments; highly irregular splines may produce minor sampling artefacts near concave regions.
- Curvature is computed using finite differences (
h = 0.001) on the spline parameter. Very short splines or near-zero tangents may produce0. - Each spline in the input container produces a separate
PPGPointDataoutput batch. Downstream filter nodes see each batch independently. - OnInterior requires a closed spline. If the spline is open, a warning is logged and the spline is skipped.
- To sample only specific splines from a multi-spline
SplineContainer, disableuseAllSplinesand set thesplineMaskbitmask via script or a custom editor.