🌺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"

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.

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

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

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

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!

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

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.

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)

Those layers refer to this section in the detail database

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.
Last updated