Creating and painting landscape materials is the second.
Landscape Materials are very different than any other material you have to create because you have to be able to paint textures on the terrain such as grass, dirt, rock or sand.
This is done by a single material expression - Landscape Layer Blend:
Let me show you how to create your very first, basic landscape material that you can use to paint landscape textures.
In Content Browser, click Add New and choose Material:
Name it anything you want. I usually add a prefix of M or MAT for material followed by a name.
Double Click on the material from the Content Browser to open the Material Editor. At the moment the material will be completely empty.
Inside Starter Content > Textures folder you will find a set of textures you can use to create your material. There are many great textures here to use that include both color/diffuse and normal maps.
For this example I will use two color textures for our landscape material, T_Ground_Grass and T_Ground_Gravel:
From Content Browser, Left-Click Hold and Drag these two textures into the Material Editor:
Each texture will be inserted as a Texture Sample node.
Right-Click in the empty space of the material editor for search menu then type in Landscape:
Insert LandscapeLayerBlend node:
Select the LayerBlend node and go to Details panel and click on the Plus icon to create 2 elements:
Name each element. I named mine Grass and Dirt to identify texture layer that you'll be able to select and paint with.
Then set the following properties:
Blend Type is very important but it requires a lot more time to explain that's outside the scope of this tutorial. I want to stay focused on creating your first landscape material. If you want complete information on what each Blend Type does and how to use them download the "UE4 Landscape Essentials" course and watch video 11 in Module 2.
Left-Click Hold and Drag from each texture output node and connect it into appropriate LayerBlend input, then connect output of LayerBlend into Base Color input of the Material:
Right-Click in the empty space again and search for Landscape then insert LandscapeLayerCoords:
Select it and in Details panel change Mapping Scale to 5:
Large value will increase texture tiling of the texture.
Connect LandscapeCoords into each texture UV input. We'll have one LandscapeCoords that will control tiling for both textures.
Insert Normal Maps from the Content Browser the same way as you did color. The following two textures are T_Ground_Grass_N and T_Ground_Gravel_N:
Select the LayerBlend node and press Ctrl + W to Duplicate to be used for Normal Maps.
Reason we duplicate the LayerBlend node is because we already have the properties setup for this LayerBlend from the color textures as they need to be the same.
Connect Normal Maps into the LayerBlend node and LayerBlend node into Normal input of the material:
Then connect LandscapeCoords into both UV inputs for the Normal maps. This way we'll have the same tiling for color and for normal maps:
Hold 1 and Left Mouse Click to insert a Constant1Vector and connect this Constant1Vector into Metallic input of the material:
The default value of this Constant1Vector should be set to 0:
You don't need to do this. By default any material you create will be non-metallic. So by using a Constant1Vector set to 0 into metallic, we are just re-enforcing the default property. I like to do it as a visual reminder that this material is non-metallic but you can skip this step.
Roughness controls how shiny (reflective) or how rough the material is.
Hold 1 and Left Mouse Click to insert a Constant1Vector and change the default value to .9:
Duplicate Constant1Vector. We'll use these two Constant1Vector to control Roughness Dirt and Grass.
Duplicate LayerBlend node and we'll use this for Roughness.
Connect first Constant1Vectors into LayerBlend Grass and second Constant1Vector into Dirt:
You can now adjust what Roughness you want for Dirt and for Grass individually.
In the Content Browser, select the Landscape Material then select the Landscape in the level. Go to Details panel and scroll down to Landscape Material. Click on the arrow to Use Selected Asset from Content Browser:
This will assign the selected landscape material and apply it to your landscape.
Your landscape will turn black right after having a material assigned. This is normal.
You must create Landscape Layer Info's for each layer to be able to see the textures and paint those textures. Go to Landscape Mode (Shift+3), Paint Mode and scroll down to Layers:
Click on the Plus icon for each Layer to create Layer Info and for both layers create Weight-Blended Layer (Normal):
Just like for Blend Types, Layer Info's have specific rules. The Layer Info you choose depend on the Layer Blend Type you have set for each texture layer in the Material editor. I explain more about Layer Info's in the "UE4 Landscape Essentials" course.
Here are rules to follow:
Once you create a Layer Info, menu will pop up asking you where you want to save this Layer Info. I keep this at default and just press OK:
Once you've created your first Layer Info for the first Texture Layer, that texture will be assigned and applied to the entire landscape. This is now your base landscape texture:
If you don't see the base texture applied, Right-Click on the Grass Layer and choose Fill Layer :
You are now ready to paint.
Go to Landscape Mode > Paint Mode and select which layer you want to paint with, in our case it will be Dirt. Adjust various tool settings for the Paint brush:
Left-Click Hold and Drag to begin painting that selected layer:
Learn EVERYTHING you need to know for how to create/sculpt landscapes and create/paint landscape materials entirely in UE4 without any external software with "UE4 Fundamentals Vol.2: Landscape Essentials".
All content on this website is copyrighted ©2008-2023 World of Level Design LLC by Alex Galuzin. All rights reserved.
Duplication and distribution is illegal and strictly prohibited.
World of Level Design LLC is an independent company. World of Level Design website, its tutorials and products are not endorsed, sponsored or approved by any mentioned companies on this website in any way. All content is based on my own personal experimentation, experience and opinion. World of Level Design™ and 11 Day Level Design™ are trademarks of Alex Galuzin.
Template powered by w3.css