# PCG Process Random Assemblies

***

Instead of using the BP Random Assembly actor, you can use a PCG subgraph loop node "Process Random Assemblies" to apply assemblies on custom points, such as points sampled out of a landscape, a grid, or any other rules.

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FekQ6mo6pxQAnH7jo7D9X%2FPCGAssemblyThumbnail2.gif?alt=media&#x26;token=41455198-d260-441b-bea7-f6eb005ed741" alt=""><figcaption><p>Example of two Random Assembly Definition applied on points generated from a grid.</p></figcaption></figure>

{% hint style="info" %}
A PCG template graph is available: TPL\_ProcessRandomAssemblies to help you setup your custom graph.
{% endhint %}

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FbQk9aIjUiXs5ZA1uivmn%2Fimage.png?alt=media&#x26;token=ad104207-2ec1-4e42-92d1-0f8421ea575e" alt=""><figcaption><p>TPL_ProcessRandomAssemblies template graph.</p></figcaption></figure>

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2Fr0ui2UoJT9x8UJ4EjlgQ%2Fimage.png?alt=media&#x26;token=484c376f-f2d3-4400-b402-cbc80988b063" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FUQe9pcsMuFqpvvC0YY1z%2Fimage.png?alt=media&#x26;token=8e58e812-c5a2-4937-85f3-03c2dd61cc9d" alt=""><figcaption></figcaption></figure>

***

The PCG node has few parameters, very similar to the ones found on the [BP random assembly actor](https://cgtoolbox.gitbook.io/cgtoolbox-docs/pcg-random-assemblies/bp-random-assembly):

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FyNtnF3Fp708UzxUigEiV%2Fimage.png?alt=media&#x26;token=bd2d1032-8688-47d1-9cde-a2c1436b8de3" alt=""><figcaption></figcaption></figure>

**Show Tag:** Same as the show tags of the Random Assembly Utility Widget

**Output Instances:** If True, output the instances (spawn static mesh) inside this node directly, otherwise, it output only points with a "StaticMesh" attribute. Then the user can decide to spawn them in a custom way.

**Debug infos:** Will print out some info (tag being processed etc.) in the output log.

**Seed:** The main random seed used by the graph, each variant will have it's own seed as well.

**Self pruning factor:** If any variant as its self pruning option to True, this value will be used by the Self Pruning node as "Radius Similarity Factor".

**Seed from position:** Each point will have a different seed, generated from its position.

**Direct spawn invalid variants:** If True, all the actors from the PCG data which don't match with any variant tags, will be spawned directly, before the variants evaluation. Meaning they will be available as collision data for all variants. If False, they will be spawned on the same time, after all variant evaluations.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgtoolbox.gitbook.io/cgtoolbox-docs/pcg-random-assemblies/pcg-process-random-assemblies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
