UE4 Step-by-Step to Your First Landscape Material (2 Texture Paint Layers)

原文:https://worldofleveldesign.com/categories/ue4/first-beginner-landscape-material.php

Creating and sculpting landscapes is the first step.

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.

3-Day UE4 Beginner Landscape Immersion Series

  • Day 1: Step-by-Step to Your First Landscape for Complete Beginners
  • Day 1 Bonus: Easy 5-Step Process for Hand Sculpting Perfect Landscapes in UE4
  • Day 2: Step-by-Step to Your First Landscape Material (2 Texture Paint Layers) (current tutorial)
  • Day 3: Your First Landscape Material Instance (Make Instant Material Changes)

Video Tutorial

Create the Material

In Content Browser, click Add New and choose Material:

Name it anything you want. I usually add a prefix of 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.

Starter Content Textures

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:

Placing Textures Into Material Editor

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.

Landscape Layer Blend

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: LB Weight Blend
  • Preview Weight: .5 (only used for Preview in Material Editor)​

 

 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.

Connect Each Texture into Layer Blend

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:

Texture Tiling

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.

Normal Maps

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:

Duplicate Layer Blend

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:

Metallic Input

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

Roughness controls how shiny (reflective) or how rough the material is.

  • 0 = very shiny and very reflective surface
  • 1 = rough and non-reflective

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.

Assigning Material onto the Landscape

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.

Creating Layer Info

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:

  • If Blend Type = LB Weight Blend or LB Height Blend
  • Set Layer Info = Weight-Blended Layer (Normal)
  • If Blend Type = LB Alpha Blend
  • Set Layer Info = Non-Weight Blended Layer

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 :

Painting Textures

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:

Complete Beginner Landscape Material Setup

Click image to see larger size (opens in a new tab)

3-Day UE4 Beginner Landscape Immersion Series

  • Day 1: Step-by-Step to Your First Landscape for Complete Beginners
  • Day 1 Bonus: Easy 5-Step Process for Hand Sculpting Perfect Landscapes in UE4
  • Day 2: Step-by-Step to Your First Landscape Material (2 Texture Paint Layers) (current tutorial)
  • Day 3: Your First Landscape Material Instance (Make Instant Material Changes)

"UE4 Landscape Essentials" Course

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值