# Scattering

### Opening the editor

Once the plugins are all installed, you can open the Scriptable Tools in the top left of your screen

<figure><img src="https://1183020519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPG4VCwrauYbUVuYUTKpq%2Fuploads%2FVo9wszisdA4H2YED3m29%2Fimage.png?alt=media&#x26;token=7bd90281-2566-4d59-99eb-405da61b5876" alt=""><figcaption></figcaption></figure>

In this mode, you will see to your left multiple tools you can use to scatter in your environment.

<div data-full-width="true"><figure><img src="https://1183020519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPG4VCwrauYbUVuYUTKpq%2Fuploads%2FTaR9D9vmF45QUvcMwKTL%2Fimage.png?alt=media&#x26;token=39d4f9db-1d4f-4e4c-a074-bbed3560b554" alt=""><figcaption></figcaption></figure></div>

For a quick test, feel free to click on "Radius" and move your mouse around the world. You will see a preview of your possible result already displayed.

At any time, you can hold "ALT" to stop the spawning tool from following the mouse.

On left click, you can activate the spawning to make it permanent in the world.

{% embed url="<https://drive.google.com/file/d/1mGi-IWM4GCOF16N-b5odrUOhLrlWWWDN/view?usp=sharing>" fullWidth="true" %}

### Spawning on the GPU

It is possible that you don't see anything spawned on the GPU, this is normal. By default, the GPU content is spawned only at runtime (in play mode), so you don't see it in the editor mode. That said, you can enable it in the editor this way.

Click on PCGWorldActor -> Set "Treat Editor Viewport as Generation Source" to true.

<div data-full-width="true"><figure><img src="https://1183020519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPG4VCwrauYbUVuYUTKpq%2Fuploads%2FSATCXiHhVtWFodh9bf5j%2Fimage.png?alt=media&#x26;token=bd46ce13-3b57-49bd-8cbe-7dbbbb4a9818" alt=""><figcaption></figcaption></figure></div>

### Radius Scattering

Once you click on "Radius," you can see a little menu with more options like the radius, mesh collection, and scattering mode. You can ...

Increase and decrease the size with the Middle Mouse Up/Down&#x20;

Tweak the final density by holding Alt + Middle Mouse Up/Down

<div data-full-width="true"><figure><img src="https://1183020519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPG4VCwrauYbUVuYUTKpq%2Fuploads%2FBQS4C78mnEpZpm5qdEZ4%2Fimage.png?alt=media&#x26;token=04fffbe5-ed15-4de6-b7da-4a81ce3551f1" alt=""><figcaption></figcaption></figure></div>

Mesh Collection: It is the database that contains all the visuals and spawning rules. More on that later.

Radius: Determine the radius of the spawning sphere.

Density: Affects the final spawning density.

Scattering Mode: Determine if the scattering is going from the center toward the outside, or from the outside part of the sphere toward the inside. In the screenshot above, the first one is set to "Sphere Out" and the second one to Sphere In"

Point Count Mesh: Determine the number of points to spawn per meter (be cautious, as this value is multiplied by the scale).

Jitter: Add more randomization in the spawning.

Seed: Determine the seed for the spawning.

Offset: Att an offset (up or opposing the wall) for the center of the sphere.

### Grid Scattering

Grid Scattering allows you to spawn vegetation or objects inside a volume and go in the top-down direction. You can...

Increase and decrease the size with the Middle Mouse Up/Down&#x20;

Hold CTRL + Moving the mouse to control the size of the grid

Hold ALT + Shift + Middle Mouse Up/Down to rotate

<figure><img src="https://1183020519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPG4VCwrauYbUVuYUTKpq%2Fuploads%2F3iFvi1uEFfP59tFUx1zt%2Fimage.png?alt=media&#x26;token=84202ff0-4a76-4476-992e-04878ea8b7a1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1183020519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPG4VCwrauYbUVuYUTKpq%2Fuploads%2Fu1ut2ChmjsxHg3O6Hbfc%2Fimage.png?alt=media&#x26;token=99f0e297-6736-4faf-af06-18baf56974a6" alt=""><figcaption></figcaption></figure>

Mesh Collection: It is the database that contains all the visuals and spawning rules. More on that later.

Size: Determine the size of the grid.

Point Distance: Determine the distance between each point inside a row.

Density: Affects the final spawning density.

Seed: Determine the seed for the spawning.

Row Count: Determine the number of rows.

### Spline Scatter

Scatter objects along a spline. It also supports an angle to either spawn in a 360-degree or a specific direction.

<div data-full-width="true"><figure><img src="https://1183020519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPG4VCwrauYbUVuYUTKpq%2Fuploads%2FFeAcUTkFL5C6fwejNnvD%2Fimage.png?alt=media&#x26;token=030b8cbd-66e0-417d-8077-feba560b005d" alt=""><figcaption></figcaption></figure></div>

Density: Affects the final spawning density.

Point Count Mesh: Determine the number of points to spawn per meter (be cautious, as this value is multiplied by the scale).

Jitter: Add more randomization in the spawning.

Seed: Determine the seed for the spawning.

Offset: Att an offset (up or opposing the wall) for the center of the sphere.

Angle Direction: Determine the spawning direction from the center of the spline if it's not 360 degrees.

Angle Range: Determine the total angle of the spawning along the spline.

Point Density: Determine the density of the spawning (number of attempts along the spline).

Max distance: From the center of the spline, the tool with do some raycast in every direction. This will determine how far the raycast can go.
