The Procedural Content Generation (PCG) Framework utilizes the Procedural Node Graph to generate procedural content both in the Editor and at Runtime. Using a format similar to the Material Editor, spatial data flows into the graph from a PCG Component in your Level and is used to generate points. The points are filtered and modified through a series of nodes, which are listed below:
Blueprint
| Node | Description |
|---|---|
| Execute Blueprint | Executes a specified custom Blueprint Class. |
Color
| Node | Description |
|---|---|
| Set Point Color | Sets a fixed color value to all points in a point cloud. This is a working example of the Execute Blueprint node. |
Control Flow
| Node | Description |
|---|---|
| Branch | Selects one of two outputs based on a Boolean attribute. |
| Select | Selects one of two inputs to be forwarded to a single output based on a Boolean attribute. |
Debug
| Node | Description |
|---|---|
| Debug | Debugs the previous node in the graph but is not transient. |
| Sanity Check Point Data | Validates that the input data point(s) have a value in the given range; outside of the range this node logs an error and cancels the generation. |
Density
| Node | Description |
|---|---|
| Curve Remap Density | Remaps the density of each point in the point data to another density value according to the provided curve. Final Density = Curve Remap(Input Density) |
| Density Remap | Applies a linear transform to the point densities. Optionally, this can be set to not affect values outside the input range. D' = (Out_Max - Out_Min) * (D - In_min) / (In_max - In_min) + Out_Min |
| Distance to Density | Sets the point density according to the distance of each point from a reference point. |
| Distance to Neighbors | Computes the distance between a point and the average of its neighbors in a given range. Can be used to derive relative position versus neighbors. |
Filter
| Node | Description |
|---|---|
| Density Filter | Filters points based on density and the provided filter ranges. |
| Discard Points on Irregular Surface | Tests multiple points around given source points to determine if they are on the same plane. This is an example of using a PCG Subgraph and is used in the Electric Dreams demo. |
| Filter - Any | Passes through only the input data that conforms to the specified target type. Generic filter node. |
| Filter By Tag | Keeps or removes elements from the data according to their Tags. You can specify a comma-separated list of Tags to filter by. |
| Intersect with Tagged Actor Geo | Uses Geometry Script functions to test if points are inside a tagged actors' static meshes. Requires the Procedural Generation Framework (PCG) Geometry Script Interop plugin. |
| Point Filter | Applies a per-point filter on the In point data. The filter can be either a constant, spatial data (on which you can filter as-if sampling the same point or from the ToPoint version), or an Attribute Set. |
| Point Filter Range | Applies a range-based filter on point data. |
| Self Pruning | Removes intersections between points in the same point data, prioritizing data based on the settings (Large to Small, etc.). Points with a similar radius can be randomly selected using randomized pruning to prevent patterns from emerging. |
Hierarchical Generation
| Node | Description |
|---|---|
| Grid Size | Specifies at which grid size to execute downstream nodes. Used with Hierarchical Generation. |
Input Output
| Node | Description |
|---|---|
| Load Data Table | Loads a UDataTable into PCG point data. |
| Load Alembic File | Loads an Alembic file into PCG point data. Requires the Procedural Content Generation (PCG) External Data Interop plugin. |
Metadata
| Node | Description |
|---|---|
| Add Attribute | Adds an attribute to point data or an attribute set. |
| Append Attribute Set | Merges multiple attribute sets in a single attribute set. |
| Attribute Noise | Computes new values for a target attribute for each point in a set of point data. The value will depend on the selected input attribute, Mode, Noise Min, and Noise Max. |
| Attribute Partition | Splits the input point data based on the value of a given attribute — all points of a given value will be output in the same point data and all these will be present in the output data collection. |
| Attribute Reduce | Computes the Average, Max, or Min of a given attribute. Note that the attribute must be numerical and continuous for the average. |
| Attribute Rename | Renames an existing attribute. |
| Attribute Select | Computes the Min, Max, or Median on a selected Axis. Note that this is analogous to computing a dot product with an axis. |
| Attribute String Op | Performs String-related attribute operations, such as appending strings. |
| Break Transform Attribute | Breaks down a Transform attribute into its components: Translation, Rotation, and Scale. |
| Break Vector Attribute | Breaks down a Vector attribute into its components: X, Y, Z, and W. |
| Copy Attribute | Copies an attribute either from the Attribute pin or from the input itself, to a new point data. |
| Create Attribute | Creates an Attribute Set with a single attribute. |
| Data Table Row to Attribute Set | Extracts a single row from a data table to an Attribute Set. |
| Filter Attribute | Filters (keep or remove) comma-separated attributes from an Attribute Set or Spatial Data. |
| Get Attribute from Point Index | Retrieves a single point from point data and its attributes in a separate Attribute Set. |
| Make Transform Attribute | Creates a Transform attribute from three provided attributes: Translation, Rotation, and Scale. |
| Make Vector Attribute | Creates a Vector attribute from two to four attributes based on Output Type. |
| Point Match and Set | Using the Match And Set Type option, finds a match for each point based on the selection criteria, then applies the value to an attribute. A common use case is to select meshes to be used downstream in a Static Mesh Spawner node with the By Attribute selector. |
| Transfer Attribute | Sets an attribute from an object of the same type (spatial to spatial or points to points) with the same data set size. |
Attribute Bitwise Op
| Node | Description |
|---|---|
| And | Computes the result of the bitwise AND between two attributes. |
| Not | Computes the result of the bitwise NOT between two attributes. |
| Or | Computes the result of the bitwise OR between two attributes. |
| Xor | Computes the result of the bitwise XOR (Exclusive OR) between two attributes. |
Attribute Boolean Op
| Node | Description |
|---|---|
| And | Computes the result of the boolean AND between two attributes. |
| Not | Computes the result of the boolean NOT between two attributes. |
| Or | Computes the result of the boolean OR between two attributes. |
| Xor | Computes the result of the boolean XOR (Exclusive OR) between two attributes. |
Attribute Compare Op
| Node | Description |
|---|---|
| Equal | Writes the comparison Equal To result between two attributes to a boolean attribute. |
| Greater | Writes the comparison Greater Than result between two attributes to a boolean attribute. |
| Greater or Equal | Writes the comparison Greater Than Or Equal To result between two attributes to a boolean attribute. |
| Less | Writes the comparison Less Than result between two attributes to a boolean attribute. |
| Less or Equal | Writes the comparison Less Than or Equal To result between two attributes to a boolean attribute. |
| Not Equal | Writes the comparison Not Equal result between two attributes to a boolean attribute. |
Attribute Maths Op
| Node | Description |
|---|---|
| Abs | Computes the value of the Absolute Value mathematical operation. Converts an input attribute value into a positive value and writes the result to an attribute. |
| Add | Computes the value of the Add mathematical operation. Takes two input values, adds them together, and writes the result to an attribute. |
| Ceil | Computes the value of the Ceiling mathematical operation. Takes an input value and rounds it up to the next integer. |
| Clamp | Computes the value of the Clamp mathematical operation. Takes in input values and constrains them to a specific range. |
| Clamp Max | Provides a maximum value for the Clamp mathematical operation. |
| Clamp Min | Provides a minimum value for the Clamp mathematical operation. |
| Divide | Computes the value of the Divide mathematical operation. Takes in two inputs, divides the first input by the second, and writes the result to an attribute. |
| Floor | Computes the value of the Floor mathematical operation. Takes in an input value, rounds it down to the nearest integer, and writes the result to an attribute. |
| Frac | Computes the value of the Frac mathematical operation. Takes in an input value and returns the fractional portion of that value. For example, for an input value X, the result is X minus the Floor of X. The output value ranges from zero to one, inclusive on the low end, exclusive on the high end. |
| Lerp | Computes the value of the Linear Interpolate mathematical operation. This expression draws a line between two points and uses a third Ratio value to determine the value of a point along that line. It then writes this value to an attribute. |
| Max | Computes the value of the Max mathematical operation on attribute(s) and writes the result to an attribute. This operation takes in two input values and outputs the higher of the two. |
| Min | Computes the value of the Min mathematical operation on attribute(s) and writes the result to an attribute. This operation takes in two input values and outputs the lower of the two. |
| Modulo | Computes the value of the Modulo mathematical operation. Takes in two input values and divides the first by the second. It then returns the remainder and writes that as an attribute. |
| Multiply | Computes the value of the Multiply mathematical operation. Takes in two input values, multiplies them, and writes the result to an attribute. |
| One Minus | Computes the value of the One Minus mathematical operation on an attribute and writes the result to an attribute. This expression takes in an input value X and outputs 1-X and writes the result as an attribute. |
| Pow | Computes the value of the Power mathematical operation. This expression takes in two values: a base and an exponent. It raises the base value to the exponent power and outputs the result as an attribute. |
| Round | Computes the value of the Round mathematical operation and writes the result to an attribute. This expression takes in an input value and rounds it to the nearest whole number. |
| Set | Sets the output attribute to the value of the provided attributes. |
| Sign | Computes the value of the Sign mathematical operation and writes the result to an attribute. Evaluates an input value and indicates whether it is positive, negative, or exactly zero.
|
| Sqrt | Computes the value of the Square Root mathematical operation on an input and writes the result to an attribute. |
| Subtract | Computes the value of the Subtract mathematical operation. This expression takes in two inputs and subtracts the second input from the first. |
| Truncate | Computes the value of the Truncate mathematical operation and writes the result to an attribute. This expression truncates a value by discarding the fractional part while leaving the whole number. For example, a value of 1.4 is truncated to 1. |
Attribute Rotator Op
| Node | Description |
|---|---|
| Combine | Combines two rotation values and writes the result as an attribute, combining first A, then B. |
| Inverse Transform Rotation | Transforms a Rotator by the inverse of the supplied transform. |
| Invert | Finds the inverse of a provided Rotator and writes the result as an attribute. |
| Lerp | Linearly interpolates between two Rotator inputs A and B based on the Ratio. This applies 100 percent of A when Ratio is 0 and 100 percent of B when Ratio is 1. |
| Normalize | Clamps an angle to a range of -180 to 180 and writes the result as an attribute. |
| Transform Rotation | Transforms a rotation by a given Transform. This node takes a rotation as input and applies the given transform. |
Attribute Transform Op
| Node | Description |
|---|---|
| Compose | Composes two Transforms in order: A B. Order is important when composing Transforms. A B yields a Transform that first applies A, then B to any subsequent transformation.The result is written to an attribute. |
| Invert | Inverts the input Transform and writes the new Transform as an attribute. |
| Lerp | Linearly interpolates between two Transform inputs A and B based on the Ratio. This applies 100 percent of A when Ratio is 0 and 100 percent of B when Ratio is 1. |
Attribute Trig Op
| Node | Description |
|---|---|
| Acos | Returns the inverse cosine (arccos) of an input and writes the result to an attribute. |
| Asin | Returns the inverse sine (arcsin) of an input and writes the result to an attribute. |
| Atan | Returns the inverse tangent (arctan) of an input and writes the result to an attribute. |
| Atan 2 | Returns the inverse tangent (arctan2) of 2 inputs (B/A) and writes the result to an attribute. |
| Cos | Returns the cosine (cos) of an input and writes the result to an attribute. |
| Deg to Rad | Returns a radians value based on the input in degrees and writes the result to an attribute. |
| Rad to Deg | Returns a degrees value based on the input in radians and writes the result to an attribute. |
| Sin | Returns the sine (sin) of an input and writes the result to an attribute. |
| Tan | Returns the tangent (tan) of an input and writes the result to an attribute. |
Attribute Vector Op
| Node | Description |
|---|---|
| Cross | Outputs the Cross Product of two input vectors. |
| Distance | Calculates the distance between two Vector inputs. |
| Dot | Returns the Dot Product of two input Vectors. |
| Inverse Transform Direction | Transforms a direction Vector by the inverse of the input Transform, but does not change its length. The result is written to an attribute. |
| Inverse Transform Location | Transforms a location by the inverse of the input Transform. The result is written to an attribute. |
| Length | Returns the length of a Vector stored in an input vector. |
| Normalize | Outputs a normalized copy of the Vector, ensuring it is safe to do so based on the length. Returns a zero vector if vector length is too small to safely normalize. |
| Rotate Around Axis | Calculates and returns the result of Vector A rotated by Angle (Deg) around Axis. |
| Transform Direction | Transforms an input direction Vector by the supplied transform. Does not change its length.The result is written to an attribute. |
| Transform Rotation | Transforms a rotator or quaternion by the input Transform. The result is written to an attribute. |
Attribute Rotator Op
| Node | Description |
|---|---|
| Make Rot from Angles | Returns a Rotator attribute created using inout Roll, Pitch, and Yaw values. |
| Make Rot from Axis | Returns a Rotator using a reference frame created from the Forward, Right, and Up axis. |
| Make Rot from X | Returns a Rotator attribute created using only an X axis. The Y and Z axis are unspecified but will be orthonormal. |
| Make Rot from XY | Returns a Rotator attribute created using X and Y axes. The X axis remains fixed and the Y axis may change minimally to enforce orthogonality. Also computes the Z value. |
| Make Rot from XZ | Returns a Rotator attribute created using X and Z axes. The X axis remains fixed and the Z axis may change minimally to enforce orthogonality. Also computes the Y value. |
| Make Rot from Y | Returns a Rotator attribute created using only an Y axis. The X and Z axis are unspecified but will be orthonormal. |
| Make Rot from YX | Returns a Rotator attribute created using Y and X axes. The Y axis remains fixed and the X axis may change minimally to enforce orthogonality. Also computes the Z value. |
| Make Rot from YZ | Returns a Rotator attribute created using Y and Z axes. The Y axis remains fixed and the Z axis may change minimally to enforce orthogonality. Also computes the X value. |
| Make Rot from Z | Returns a Rotator attribute created using only a Z axis. The X andY axis are unspecified but will be orthonormal. |
| Make Rot from ZX | Returns a Rotator attribute created using Z and X axes. The Z axis remains fixed and the X axis may change minimally to enforce orthogonality. Also computes the Y value. |
| Make Rot from ZY | Returns a Rotator attribute created using Z and Y axes. The Z axis remains fixed and the Y axis may change minimally to enforce orthogonality. Also computes the X value. |
Param
| Node | Description |
|---|---|
| Get Actor Property | Retrieves the contents of a property from the actor holding the PCG component (or higher in the object hierarchy). By default, it looks at actor-level properties (useful for Blueprint variables), but it can look at component properties as well using the Select Component option. |
| Data Count | Returns an Attribute Set containing the number of data passed to the input pin. Note that this does not ignore empty point data. |
Sampler
| Node | Description |
|---|---|
| Copy Points | Copies an instance of all points in the Source per point in the Target input. There are multiple options for inheriting spatial properties, but Attribute Inheritance has the most impact on the performance of this node. |
| Mesh Sampler | Samples points on a specified static mesh. Note that this operation is costly. Requires the PCG Geometry Script Interop plugin and the Geometry Script plugin. |
| Spline Sampler | Samples points using the spline as the source material. Sampling on the spline means directly on the spline curve, while the Horizontal, Vertical and Volume options sample on the spline volume (driven by the radius of the control points in the Y/Z axes). Sampling inside the spline requires the spline to be closed. |
| Surface Sampler | Samples points on a Surface data, in a regular grid pattern. This node contains the following options:
|
| Volume Sampler | Samples the provided spatial data on a regular 3D grid. This exhibits 'voxel-like' behavior and could potentially be costly for large data or high densities. |
Spatial
| Node | Description |
|---|---|
| Bounds Modifier | Modifies the bounds property on points in the provided point data. |
| Create Spline | Creates a Spline from the input point data. Contains options to create the following:
|
| Difference | Outputs the result of the difference of each source against the union of the differences. This node has the following options: Density Function: Controls which density function is used after the operation is complete. Contains the following options:
Mode: Controls behavior of difference in the presence of concrete spatial data vs continuous data (other types, more akin to distribution functions). Note that in some cases where we want to select a concrete element, this should be set to Discrete otherwise the resulting density function could not be flat. Contains the following options:
|
| Distance | For each point in the first input, calculates the distance to the nearest point in the second input and automatically ignores self when computing the distance from one point data set to the same point data set. Optionally, can output the distance vector as an attribute. |
| Extents Modifier | Modifies the extent of each point in the point data by manipulating the bounds. |
| Gather | Takes all inputs and generates a single collection holding all the input data. Used mainly for organization. Contains a Dependency Only pin to sequence execution in cases where it is important (such as World Ray Hit Query vs. content spawned in a given graph). Note that all data provided to this pin will not be passed to the output. |
| Get Actor Data | General version of the Get … Data nodes. Reads data from an Actor using the Actor Filter and the Mode. It contains the following options: Actor Filter: Determines which Actors to consider when fetching Actor data. Include Children: Determines whether to consider any child Actors of the input. Mode: Contains the following options:
|
| Get Landscape Data | Specialization of the Get Actor Data node that returns appropriately typed and constructed Landscape data. |
| Get Number of Points | Returns the number of points in a point data. |
| Get Primitive Data | Specialization of the Get Actor Data node that returns appropriately typed and filtered Primitive data. |
| Get Spline Data | Specialization of the Get Actor Data node that returns appropriately typed and filtered Spline data. |
| Get Texture Data | Loads a texture to a surface data. Note that this requires a GPU to execute for most compressed texture types. |
| Get Volume Data | Specialization of the Get Actor Data node that returns appropriately typed and filtered Volume data. |
| Inner Intersection | Computes the inner intersection between all data provided to the node, regardless of their pins. Example: Input contains [A, B, C] Result: A ∩ B ∩ C |
| Intersection | Computes an outer intersection for each data provided in the Primary Source pin, where the result is one intersection per data on the primary source pin against the union of data on each other Source pins. Example: Primary Source contains [A, B] Source 1 contains [C, D] Source 2 contains [E]. Result: A ∩ (C ∪ D) ∩ E, B ∩ (C ∪ D) ∩ E |
| Merge | Combines multiple input point data into a single point data. Attributes are merged and non-common attributes are defaulted as needed. |
| Normal To Density | Computes point data density based on the point normal and the provided settings (Normal, Offset, Strength, Density Mode) which is similar to a dot product, with additional flexibility. |
| Point From Mesh | Builds a point data containing one point with the bounds of the provided static mesh and a reference to that mesh. |
| Projection | Creates a projection data from a source data to project onto a target. Note that if there are no special projection representations for that source data to that target data, then it converts the data to points. |
| Spatial Noise | Constructs a spatially-consistent noise pattern (such as Perlin noise) and writes it to a specified attribute. |
| To Point | Casts the data to a point data if it is already one or discretizes the spatial data to point data. |
| Transform Points | Changes the points transforms (either in place or to an attribute with Apply to Attribute) using basic random rules. Each component of the transform (translation, rotation, scale) can be set to Absolute instead of relative to allow for more control. It contains the following options: Uniform Scale: Scales point data to the same X, Y, Z ratio. Recompute Seed: Forces the points seed to be updated according to their new world position. Example: use a Transform Points node with Absolute Rotation and rotation Z being 0 will make certain that the points are pointing in Z up.This makes sure the points are upwards after sampling from the landscape. |
| Union | Creates a logical union between data, from a distribution function perspective. Result depends on the density function option chosen. Density Function: Controls which density function is used after the operation is complete. Contains the following options:
|
| World Ray Hit Query | Creates a surface-like data that performs ray casts in the physics world. It can pass data to any node that expects a surface data. By default, the size and orientation of the rays is driven by the source component's actor properties (most likely a volume), but the ray properties can be overridden. It contains the following options: Apply Metadata From Landscape: Gets the landscape layer values if the raycast hits the landscape. Note that there is a small performance cost involved with this. Ignore PCG Hits: Ignores all PCG generated assets. Is useful when there is no ordering enforced vs other nodes creating data in the world (or other graphs). Optionally, can return the physical material and the actor hit. The Filtering elements are used for finer-grained control to ignore or keep only some of the hits. |
| World Volumetric Query | Creates a volume-like data that gathers points from the physics world. It can pass data to any node that expects a surface data. The Search for overlap check controls whether overlaps are returned as points or only queries overlapping nothing (subject to filtering) are returned. Can also optionally return the actor "found" in that volume. |
Spawner
| Node | Description |
|---|---|
| Create Points | Creates a point data containing points from a static description of points. |
| Create Points Grid | Creates a point data containing a simple grid of points defined by the settings. |
| Create Target Actor | Creates an empty actor from a template that can be used as a target for writing PCG artifacts to, such as the Static Mesh Spawner. |
| Mesh Sockets to Points | Creates points from Static Mesh Sockets defined in the Static Mesh Editor. Sockets can be filtered by tags. |
| Point from Player Pawn | Creates a point at the current player pawn location. Used during runtime generation. |
| Spawn Actor | Spawns either the contents of an actor or an actor per point in the provided input data. The actor is driven by the template actor class or the instanced templated actor or by attribute depending on the settings. It contains the following options: Template Actor Class: List of available Actors in your project. Option:
|
| Static Mesh Spawner | Spawn one static mesh per point in the provided point data. Static Mesh options are added to the Mesh Entries array and selected using each entry's Weight. This is done by taking the sum of all the weight values and converting them to a percentage for each entry. For example, if there are four entries in the array that each have a value of 1, the value of the sum is 4. Each entry's weight is then divided by the sum and converted to a percentage. This means each entry has a 25% chance of spawning. Selection of the static mesh is done using variations based on the selected Mesh Selector Type option. It contains the following options:
|
Subgraph
| Node | Description |
|---|---|
| Loop | Executes another graph as a subgraph, once per data in the loop pins. Non-loop pins are passed as-is. |
| Subgraph | Executes another graph as a subgraph. |
Transforms
| Node | Description |
|---|---|
| Apply Scale to Bounds | Multiplies the bounds by the scale and resets the scale to the unit vector for all points in the point data. |