Path Spline Mesh
Create SplineMesh components from paths
The Path Spline Mesh node generates spline meshes along a path with detailed per-segment settings, allowing for mesh and data distribution from asset collections or attribute sets, and includes advanced options for tangents, scaling, justification, and distribution to control mesh behavior and appearance.
Table of content
The Path Spline Mesh node creates a spline mesh from an existing path, with extensive per-segment settings. It works very similarily to the Asset Staging node and uses the same set of options.
Properties
Property | Description |
---|---|
Closed loop | |
Scope | The scope/selection of input data that are to be processed as closed paths or not. - All processes all input as selected below.- All but tagged inverts the scope based on tags.Default is, all paths are considered open, unless they are tagged with ClosedLoop .
|
Closed Loop | Whether to consider input data that are part of the scope as closed loop or not. |
Comma Separated Tags | Tags to check for. Any match uses the inverse of the above value. |
Asset Collection
Controls the collection of meshes & data that will be distributed to the path on its individual segments.
Property | Description |
---|---|
Source | Which type of source to use for the asset collection. Can be either Asset for an Asset Collection picker, or Attribute Set , which will reveal a new input pin that accepts an attribute set. |
Asset Collection | If Asset is selected as a source, this is the Asset Collection that will be used for staging points.See Available Asset Collections. |
When using the Attribute Set
source, the node will create a temp, internal Asset Collection from the source attribute set.
Attribute Set Details | |
Asset Path Source Attribute | The name of the attribute within the Attribute Set that contains the entry’ Asset Path.FSoftObjectPath is preferred, but FString and FName are supported.
|
Weight Source Attribute | The name of the attribute within the Attribute Set that contains the entry’ Weight.int32 is preferred, but float , double and int64 are supported.
|
Category Source Attribute | The name of the attribute within the Attribute Set that contains the entry’ Category.FName is preferred, but FString is supported.
|
While it’s a needed option, keep in mind that using an attribute set prevents access to any asset cached data. As such, all assets from the Attribute Set will be first loaded (asynchronously) in memory in order to compute their bounds; before the node execution can properly start.
Tangents
While disabled by default, Tangents play a crucial role in giving the spline mesh a correct deformation. It’s generally preferable to compute some using Write Tangents beforehand.
Property | Description |
---|---|
Apply Custom Tangents | When enabled, applies FVector tangents attributes to path segments. |
Arrive Tangent Attribute | Per-point attribute to read the arrive tangent from. |
Leave Tangent Attribute | Per-point attribute to read the leave tangent from. |
Spline Mesh Axis | Chooses which mesh local axis will be aligned along the spline mesh’ segment. |
Note that the way arrive/leave tangent works is that each spline mesh segment uses the current point’
leave
value, and the next pointarrive
value.
The axis picked for
Spline Mesh Axis
will be ignored for Scale to Fit & Justification.
Scale to Fit
Scale the spawned asset bounds in order to fit within the host point’ bounds.
Note that the maths are computed against the point’ bounds, not the segment AABB.
Scale to Fit Mode | Which type of scale-to-fit mode is to be applied. None disables this section, Uniform applies the same rule to each individual component, while Individual lets you pick per-component rules. |
Scale to Fit (value) | If Asset is selected as a source, this is the Asset Collection that will be used for staging points. |
You can use the following rules:
Scale to Fit | |
---|---|
None Disable the scaling rule. | |
Fill Scale the asset so it fills the point’ bounds. | |
Min Scale the asset so it fits snuggly within the minimum point’ bounds. | |
Max Scale the asset so it fits snuggly within the maximum point’ bounds. | |
Average Scale the asset so it fits the average of the point’ bounds. |
Justification
Offset the spawned asset bounds relative to the host point’ bounds.
Justification is done & tweaked per-component.
Note that the maths are computed against the point’ bounds, not the segment AABB.
Per component | |
From | The location within the Asset bounds that will be justified To the point’ bounds. i.e, from which location in the asset do i start moving. |
To | The location withn the Point bounds to which the Asset bounds will be justified. i.e, to which location in the point do i want to go. |
Consolidated custom inputs | |
Custom from Vector Attribute | An FVector whose individual component will be used to drive From properties set to Custom .Prefer this consolidated approach if you’re using custom values on more than one component. |
Custom to Vector Attribute | An FVector whose individual component will be used to drive To properties set to Custom . Prefer this consolidated approach if you’re using custom values on more than one component.
|
Justify to One | If enabled, justification ignore the original path’ point bounds, and uses 1,1,1 bounds instead. |
From
You can use the following rules for From
:
Justify From | |
---|---|
Center Uses the asset bounds’ local center as reference point. | |
Min Uses the asset bounds’ min as reference point. | |
Max Uses the asset bounds’ max as reference point. | |
Pivot Uses the asset pivot as reference point, ignoring bounds. | |
Custom Uses a lerped reference point between the asset bounds’ min & max. Value is expected to be in the range 0-1 but isn’t clamped. |
To
You can use the following rules for To
:
Justify To | |
---|---|
Same Auto-selects the same justification as From , but computed against the point’ bounds. | |
Center Uses the point bounds’ local center as reference point. | |
Min Uses the point bounds’ min as reference point. | |
Max Uses the point bounds’ max as reference point. | |
Pivot Uses the point bounds’ pivot, ignoring bounds. | |
Custom Uses a lerped reference point between the asset bounds’ min & max. Value is expected to be in the range 0-1 but isn’t clamped. |
Distribution Settings
Distribution drives how assets are selected within the collection & assigned to points.
Seed components | Seed components lets you choose which seed source you want to combined to drive randomness. |
None | Will only use the point’ seed. |
Local | The local user-set seed see property below |
Settings | This node’ Settings seed. |
Component | The parent PCG component’ seed. |
Distribution
Distribution | |
Index | Index-based selection within the collection. Enable a lot of additional options. |
Random | Plain old random selection. |
Weighted Random | Weighted random selection, using entries’ Weight property. |
Index Settings
Index settings offer granular controls over what the Index
actually is, and how it is used.
Index Setting | Description |
---|---|
Pick Mode | Choose in which ordered context the input index should be used. |
Index Safety | Defines how the index value should be sanitized/post-processed. |
Index Source | The source of the index value. |
Remap Index to Collection Size | If enabled, the input index is first remapped to the size of the collection. This enable the use of basically any input value and distribute the entierety of the collection over its range. Note that this can have a noticeable performance impact since all input indices must be loaded in memory first to find the min/max range. |
Truncate Remap | Lets you choose how the remapped value (floating point) should be truncated to an integer. |
Index Safety
The index safety property controls how invalid/out of bounds input values are handled.
Safety method | |
Ignore | Invalid indices will be ignored and won’t be processed further. |
Tile | Index is tiled (wrapped around) the context’ valid min/max range. |
Clamp | Index is clamped between the context’ valid min/max range. |
Yoyo | Index bounces back and forth between the context’ valid min/max range. |
Target Actor
Lets you pick which actor to attach the spline components to.
Uses the PCG Component’ owner if the provided value is invalid.
Additional Outputs
Lets you output the Weight of the selection to each node, using different post-processing methods.
This can be very handy to identify “rare” spawns and preserve them during self-pruning operations.
Tagging Components
Lets you pick which tags to add/forward to the output spline mesh components.
Property | Description |
---|---|
Grab Tags | Pick which tags from the asset collection should be grabbed and added to the component. See Entries & Collections Tags. |
Forward Input Data Tags | If enabled, tags associated with the currently processed dataset will be forwarded to the components. |
More TBD |