> For the complete documentation index, see [llms.txt](https://cgtoolbox.gitbook.io/cgtoolbox-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cgtoolbox.gitbook.io/cgtoolbox-docs/pcg-random-assemblies/data-structure.md).

# Data structure

The tool need multiple data / actors to function:

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FOW4KRqJrJTAsUY5yHULh%2Fimage.png?alt=media&amp;token=69a5a8e7-45a6-48b4-a46a-c2175be6c437" alt=""><figcaption><p>Diagram of the data needed to produce random assemblies.</p></figcaption></figure>

***

The starting point of the tool is a [Level instance](https://dev.epicgames.com/documentation/en-us/unreal-engine/level-instancing-in-unreal-engine), all other data can be created with an Asset Action helper, with a right click on the Level instance asset:

{% hint style="danger" %}

### **It only works with level instances made exclusively with static mesh actors.**

{% endhint %}

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FeFCxnofSks75R1jq2Ijh%2Fimage.png?alt=media&amp;token=7f2fa314-634f-4684-8a8f-adedba0879ed" alt=""><figcaption></figcaption></figure>

This will ask you if you want to create the random definition and spawn the actor in the current level:

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FPIjkd6T3FM2MOjXLRyqg%2Fimage.png?alt=media&amp;token=83aac36c-e8df-4e48-bb46-ca01679bcf54" alt=""><figcaption></figcaption></figure>

***

<p align="center"><mark style="color:$success;"><strong>Bellow, see the details on what are the assets needed:</strong></mark></p>

### PCG Data asset

A [PCG data asset](/cgtoolbox-docs/pcg-random-assemblies/pcg-data-asset.md) is a representation of a [Level instance](https://dev.epicgames.com/documentation/en-us/unreal-engine/level-instancing-in-unreal-engine) content into a PCG point cloud data, where each actor position is stored, its staticmesh, as well as their actor tags as attribute.&#x20;

### BP\_RandomAssembly

An Blueprint Actor which can read a [Random Assembly Definition](/cgtoolbox-docs/pcg-random-assemblies/random-assembly-definition.md) and output mesh instancers using PCG.

The meshes are generated from the PCG Data Asset point cloud data + all [variant definitions](/cgtoolbox-docs/pcg-random-assemblies/variant-definition.md) evaluation.

This is also where you can find some debug information with the [Random Assembly Widget](/cgtoolbox-docs/pcg-random-assemblies/random-assembly-widget.md).

### Random Assembly Definition

A simple data asset which contains a reference to a PCG Data asset, a list of variants and a static mesh spawner PCG settings node.

Blueprint type: [BPDA\_RandomAssemblyDefinition](/cgtoolbox-docs/pcg-random-assemblies/random-assembly-definition.md)

### Random Variant Definition

A data asset where you set the randomization settings such as Xform, Removale probability, static mesh variations, projection (landscape, world static), etc.

This is also where the tag(s) needed to identify on which actor(s) the variant(s) will be applied is stored.

Blueprint type: [BPDA\_VariantDefinition](/cgtoolbox-docs/pcg-random-assemblies/variant-definition.md)

***

### Process Random Assemblies

[PCG graph subgraph loop](/cgtoolbox-docs/pcg-random-assemblies/pcg-process-random-assemblies.md) node to be able to apply variants on custom PCG graph points, from landscape sampling, grid, etc...

***
