Spatial
"Spatial Layers" are a special datastructure that allow chosen particles to store data, and other particles to query that data efficiently.
This allows inter-particle communication and interactions.
This concept might be complex for beginners, we provided effects that are showing basic usage of "Spatial Layers" in our Tutorials Pack (Effects 140, 141 & 145), available on the PopcornFX Marketplace.
SpatialInsert
This node inserts the input payload into the input spatial layer, at the input location.
Spatial layers will be later extended to allow inserting and querying with "keys" which do not have to be a float3, and can be a simple integer, a float2 (if you want to lookup using an UV coordinate), or any other of the native types.
Input pins |
||
|
|
Spatial Layer object that will receive data |
|
|
Spatial Payload that will send data into the Spatial Layer |
|
|
Location where the spatial payload will be inserted. |
+ all common properties |
||
SpatialLayer
This node declares a spatial layer object.
Like attributes, spatial layer objects are shared between the different layers of the effect.
If another particle layer declares a spatial layer with the same SelfName and CellSize property, both particle layers will access the same spatial layer, allowing them to share data and communicate.
NOTE: In the current build, and unlike v1, there is no way to see the different spatial layers used by the effect. This will come in a later build.
Property |
Type |
Description |
|
|
Name of the Layer |
|
|
Is the Spatial Layer global? |
|
|
Each cell will have its own data and communication radius. |
|
|
|
Output pins |
||
|
|
Input Value |
+ all common properties except |
||
SpatialPayloadAppend
Much like event payloads, there are spatial payloads. But unlike events, a spatial payload doesn’t need a spatial layer link to append data.
We use spatial payload append nodes to construct the payload we want to insert.
Property |
Type |
Description |
|
|
Name of your payload |
|
|
Type of values you will insert |
|
|
|
|
|
|
Input pins |
||
|
|
(If there’s a previous payload to send) |
|
|
Input Value |
Output pins |
||
|
|
Payload to insert in the Spatial Layer |
+ all common properties |
||
SpatialQuery
Spatial queries are special spatial operations that gives you different results depending on the operation you will make.
It needs a spatial layer, and it will only read data from it.
Property |
Type |
Description |
|
|
Spatial Operation to make.
|
Input pins |
||
|
|
Spatial Layer to read data from |
|
|
Location in the Spatial Layer where it will read data |
|
|
(Only for some Query Types) Query Inner Radius |
|
|
Query Radius |
|
|
(Only for some Query Types) |
|
|
|
Output pins |
||
|
|
Creates a new payload by default |
|
|
Output Value |
|
|
Debug Value if Spatial Query receive data |
+ all common properties |
||