Principles of the System #
PCG works by creating points on a landscape and spawning actors or meshes on those points. When the points are created we put a box around tree etc based on their size. After that we’re excluding all points in water and exclusion box. At last we’re spawning all the static meshes in the world.
PCG_SubGraph_DensityPropegation #
This subgraph can be used to filter points across 3 density ranges. The ranges can be set in the parameter overrides of the subgraph.
PCG_SubGraph_Exclude #
This subgraph excludes water bodies (Water Body Ocean by default) and any area that has the PCG_Exlude Tag this can be colliders but also meshes.
Categories #
Instead of using tags which gets merged in the Merge node we use custom attributes to determine which point belongs to which type. For example PCG_SubGraph_Trees generates points with categories Tree_Large Tree_Medium and Tree_Small. After we merge and self-prune with all the other points we can use a point filter to filter out all the separate trees and spawn the correct mesh.
Spawning actors / static meshes #
When all the points are generated we want to spawn the required actors or static meshes on those points. We’re doing that by using a density propagation subgraph. This has several densities this way you can change the separation between each spawned actor.