Language:
Page Info
Skill Level:
Engine Version:

3. Landscape Materials and the Grass Tool

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.

  1. 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

    T_Create_New_Material.png

  2. 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.

    • T_AlpinePatch001_D_alt_R

    • T_GDC_Grass01_D_NoisyAlpha

    T_Added_Textures.png

  3. 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 Amount The Why
    Landscape Layer Blend 1 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 1 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 1 This enables the Landscape terrain to be able to spawn the Grass Types based on the setup in the Landscape Material.

    T_Add_Material_Nodes.gif

    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.

  4. 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.

    T_LB_Add_2_Layers.png

  5. 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.

    T_LS_LayerBlend_Setup.png

  6. 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.

    T_Hook_Up_Textures.png

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

    T_Grass_Out_SetUp.gif

  8. In the Content Browser, select the Grass_00 Landscape Grass Type that was created in the last step.

  9. In the Material under the Grass Type option, press the Arrow icon to load the Actor that is currently selected in the Content Browser.

    T_Input_Grass_Type.png

  10. 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.

    T_LLW_Setup.png

  11. 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.

    T_Final_Material.png