# Grass and details

### Detail setup

Adding the new detail system is relatively simple. By opening the BP\_CalystoWorldEditor, Calysto will automatically add the BP\_CalystoWorld to your scene. This will be needed as it contains the grass system.

The next step will depend on whether you have a world using World Partition or a simple world.

**Simple world (not using World Partition)**

Simply open the Calysto Editor, in the detail panel, there is a button "Set detail bounds"

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FbTmEuheLhZ5XCcDM1Xyv%2Fimage.png?alt=media&#x26;token=2b103fbb-4f09-4174-858e-e62e71c61666" alt=""><figcaption></figcaption></figure>

**Using World Partition**

You can click on BP\_CalystoWorld and set the box bounds manually. You can adjust the thickness of the cube to help you see it better or hide it afterward.

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FsuGzGuoAdwSXjdLFLDNu%2Fimage.png?alt=media&#x26;token=532a9410-eca3-43bd-a6ca-dbdeab0c2dd6" alt=""><figcaption></figcaption></figure>

So now the default grass is already installed, you can click "Play" and you will see it spawning around you.

### Additional options

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FLl76IVI0pl2Lx7GSN9uY%2Fimage.png?alt=media&#x26;token=5064c6f9-c05f-4760-8a82-99c6d42fc07f" alt=""><figcaption></figcaption></figure>

You can Toggle Show Details to see the details in the editor (without play mode). Most of the other buttons are helpers, but keep in mind the "Update All Biomes"; this one will be important for the next section.

### Creating your own detail database

Right-click on the content folder and create a new data asset of type PDA\_Detail

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FZdP8m6ppYnFQhD6pQ4g2%2Fimage.png?alt=media&#x26;token=45494371-f285-4701-8cfe-844dcc1778b9" alt=""><figcaption></figcaption></figure>

You can now customize your own details here, but be sure to read the upcoming section "Adding your own meshes" first.

Let's look at the demo example in /Calysto/World/Data/DataAsset/DA\_CalystoDetail

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FNG8eUrFJF6p15foQiRoY%2Fimage.png?alt=media&#x26;token=527cd103-0aa9-46c6-9bc7-fa17b74abccc" alt=""><figcaption></figcaption></figure>

The settings are relatively similar to the vegetation setting in the biomes, but with some smaller differences. The detail system is also affected by the priorities, just like the biome vegetation, meaning the index 0 will have spawning priority over index 1.

Layer: Can be set to All Layers, Layer 1, Layer 2, or Layer 3. The grass system uses the unreal landscape material to know where to spawn; therefore, those layers will need to be added later if you want to use another landscape material. This is very simple and will be covered later.

RandomRotation: Will only randomize the Z axis.

UseCluster: Works exactly as the previous cluster we saw in the biome vegetation, but with 3 noises.

Cluster Scale: The detail uses 3 noise instead of 2, to add more micro details in the spawning logic. Note that for a better result, the Macro scale will have more weight than the mid scale, and the micro scale will have the lowest weight in the result.

ClusterContrast: Helps you fine-tune the final result of the cluster noise result

ClusterTreshold: Set the influence of the clusters

ClusterScaleInfluence: This setting affects the final scale of your vegetation related to the cluster. It acts like a multiplier. The higher the value, the more it will affect the final scale with the bigger plants near the center of a cluster.

Blueprint: Allow you to spawn a blueprint near the center of a cluster. For example, spawn some butterflies Fx near a batch of flowers.

### Adding your own meshes.

Adding your own mesh to the database is simple, but it needs some transformation in the background to work with the GPU properly. The good news is, I made it very easy for you!

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2F7lXPEJZNbvcFyHFfLWUp%2Fimage.png?alt=media&#x26;token=d48ab5cb-842c-42e7-a91e-7f4d5c24f422" alt=""><figcaption></figcaption></figure>

When you are adding meshes to the database or moving the order, be sure to click on "Update All Biomes", and this will update them properly.

### Detail density and distance

Due to some limitations, I couldn't expose the spawning distance and density. That said, changing it is still very simple.

To modify the spawning distance, you need to go inside Calysto/World/PCG/PCG\_RuntimeScatter

Make sure you don't have any node selected by clicking anywhere in the background, then, to your right, on the detail, you will have a default grid size. Feel free to increase it or decrease it to fit what you need.

Note that this will affect the detail density because the GPU spawns the same quantity of points per grid. So if the grid is 4x bigger, the density will look 4x less dense

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FnwLkSMcMgLoHh7wp6cOK%2Fimage.png?alt=media&#x26;token=516c8398-fee3-43a1-a0ab-de5f74797e35" alt=""><figcaption></figcaption></figure>

The second step will be to fix the density in the same folder Calysto/World/PCG you will have PCG\_GroundDetailGenerator.

This time, click on the Custom HLSL node, then, to your right on the detail panel, you will have "Num Elements". This is where you will adjust the detail density.

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FCn9ResAK8CDIFWxW87m6%2Fimage.png?alt=media&#x26;token=a66a4a28-6aa9-4c9f-a29b-67131031dc26" alt=""><figcaption></figcaption></figure>

### Using landscape layers with the GPU detail.

Calysto's detail system works almost independently from the landscape layers. If you open the M\_CalystoLandscape on the right, you will see this section.

The important part is that the detail spawner will look at 3 very specific grass types

FT\_Layer1

FT\_Layer2

FT\_Layer3

So if you use your own landscape material and plan to use my detail, be sure to add them (Those are empty grass type, feel free to just add them on your landscape)

<div data-full-width="true"><figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FxcRSDhHpiT9OKlM1vXOy%2Fimage.png?alt=media&#x26;token=1c129976-0ff3-471f-ad08-95965014fa97" alt=""><figcaption></figcaption></figure></div>

Those layers refer to this section in the detail database

<figure><img src="https://3223403327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5xsfjHEQXblHDG7WFyoC%2Fuploads%2FCMxJL73V2Yim1V7zh6sa%2Fimage.png?alt=media&#x26;token=a49c48ff-9a68-41a9-8701-a1774e1dde44" alt=""><figcaption></figcaption></figure>

In this example, the layer one (auto landscape) will use the FT\_Layer1 (Layer 1) while the second landscape layer will use Layer 2.

The NoGrass is just a simple non-weight layer you can use to remove the grass that is needed.
