Related
Table of content
The Asset Staging exists for many reasons, but primarily to “pre-spawn” assets from an Asset Collection, and modify points according to various rules, in relation to their associated asset.
This is especially useful if you want to have pruning control on overlaps, or require very tight placement rules no matter how the assets have been authored (pivot point location etc)
Properties
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.
Scale to Fit
Scale the spawned asset bounds in order to fit within the host point’ bounds.
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.
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.
|
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. |
Variations
When to apply the asset’ variations, if any, as defined in the Source.
At the time of writing, this is not supported for
Attribute Set
source.
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. |
Output
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.
Modules
Available Asset Collections modules
🝱 Mesh Collection
Mesh Collection DataAsset
The Mesh Collection DataAsset is a list of Meshes with ISM/HISM Descriptors, that comes with all the Asset Collection goodies.
🝱 Actor Collection
Actor Collection DataAsset
The Actor Collection DataAsset is a list of Actors, that comes with all the Asset Collection goodies.