Before we can begin to use the Grass Tools we first have to create Material that can work with both the Landscape terrain and the Landscape Grass Type.
In the following section we will cover how to set up this Material as well as how to link it so that it will work with the Landscape Grass Type.
If you would like to have a more in-depth look at how the Landscape terrain works in UE4 check out the Landscape pages for more information.
First create a new Material for our Landscape Terrain by right - clicking in the Content Browser then selecting the Material option form the Create Basic Asset
section naming the new Material MAT_GT_Grass
Open up the MAT_GT_Grass Material by double - clicking on the Material inside of the Content Browser and then add the following two Textures from the Open World Demo Collection to the Material Graph.
Search for the Material Expression nodes listed below using the Palette search function.
Once you locate a required Material Expression node select it in the Palette and then dragging it into the Material Graph.
Material Expression Name
Landscape Layer Blend
To make the Landscape terrain look more realistic you will often need to blend and paint multiple together or separately and that is what the Landscape Layer Blend allows you to do.
Landscape Layer Sample
This Material Expression allows the Material and the Landscape to talk to one another to ensure the right Static Mesh is used whenever a certain Landscape layer is painted .
Landscape Grass Output
This enables the Landscape terrain to be able to spawn the Grass Types based on the setup in the Landscape Material.
If you are unfamiliar with how the UE4 Material Editor works or would just like more information about it, check the official Unreal Engine Material documentation for more information on all things related to Materials.
Select the Landscape Layer Blend node and under the Details panel in the Layers section and add two new Layers to it by clicking the Plus icon 2 times.
Once 2 layers have been added, set the Layer Name of one to Grass and set the Layer Name of the other one to Rock also setting the Preview Weight to 1.0 for each.
Connect the T_AlpinePatch001_D_alt_R Texture to the Layer Rock input on the Landscape Layer Blend node then connect the T_GDC_Grass01_D_NoisyAlpha to the Layer Grass input finally connect the Output of the Landscape Layer Blend node into the Base Color input on the Main Material Node.
Select the Landscape Grass Output node in the Material Graph then in the Details panel in the Grass Types section press the Plus sign icon to add a new element to the Grass Types array.
In the Content Browser, select the Grass_00 Landscape Grass Type that was created in the last step.
In the Material under the Grass Type option, press the Arrow icon to load the Actor that is currently selected in the Content Browser.
Select the Landscape Layer Sample node under the Parameter Name input Grass for the name and connect the Output from the Landscape Layer Sample to the input of the Landscape Grass Output node.
When completed you should have a Material that looks like the following. As always, do not forget to press the Apply and Save buttons to compile and save the Material.