In part five of this tutorial series, I will show you how to quickly get started using the landscape tool and foliage tool in UE5.
Landscape Mode
According to Unreal Engine, the Landscape tool is used “to create immersive outdoor terrain pieces that are optimized to maintain playable frame rates across a multitude of different devices.”
I’ve already downloaded the textures I will be using in this tutorial
If you do not know how to do this, see my Getting Started in Unreal Engine tutorial
In the content browser, I added a new folder for my landscape
In this folder, I added a levels folder, textures folder, and materials folder
To begin making a landscape in Unreal, you need to first open the landscape mode – located under the select mode menu
There are three tabs that can be used in landscape mode – manage, sculpt, and paint
The manage tab allows you to create and modify landscapes
The sculpt tab allows you to raise and lower the height of the landscape
The paint tab allows you to add materials to the landscape
From the new landscape option, you can quickly create a new landscape from scratch
In the level viewport you will see a preview of the new landscape
You can add a material at this point but we will be doing that separately in this tutorial
You can also move, rotate, and scale the landscape just like any other actor in Unreal
Section size refers to the number of sections in each component – in this case, that would be 63
Sections per component refers to the number of sections within each component – this can be 1×1 or 2×2
Number of components refers to the green squares – in this case, 64 components because we have an 8×8 grid – this defines the size of the landscape
Overall resolution is the resolution of the landscape – meaning how jagged or how smooth the landscape will be
Total components refers to the total number of components
List of recommended landscape sizes
Once you have all of your values set, click on “create” to create the new landscape
Save this level in your levels folder
Sculpting
Notice that once you create the landscape, you are automatically taken to the sculpt tab
The sculpt tool “enables you to raise and lower the height of the Landscape heightmap in the shape of the currently selected brush and falloff”
In the layers panel, you now have a height map layer
Brush type allows you to define the shape of an area of the landscape
Brush Falloff determines how hard or soft the brush will be and the definition of the landscape
The tool strength determines how much effect each brush stroke has – this is especially relevant for people using a pen tablet with pressure sensitivity
Brush size is the size of the brush – including the falloff
Brush falloff determines how hard or soft the brush will be
Clay brush gives you the option to sculpt more organic landscapes
Painting with the LMB will give you a raised landscape
Painting with the SHIFT + LMB will give you a lowered landscape
You should change the brush settings as you sculpt to make the landscape more organic
Importing Height Map
Let’s explore a less manual way of making a landscape
Make a new basic level and save it in your levels folder
To use this second method to make a landscape in Unreal, you will need a height map
I have already made a tutorial showing you how to use NASA data to make your own height maps
There are also free and paid height maps available – I will be using a free height map from Motion Forge Pictures
Instead of creating a landscape from scratch, we have the option to import a height map file and use it for our landscape
Once you click on the “import from file” button, you can open your height map
You will now have the same options that you had previously
Make sure to check your resolution – it should match the recommended scale from Unreal
I can see there is stretching along the outer edges if I use the default resolution
I will reimport this map and change the resolution
For me, I will be using a Section Size of 15×15, Sections Per Component will be 1×1, and Number of Components will be 5×5
Then click on the “Import” button
I then save this Level
Making the Landscape Material
I have already downloaded textures from Quixel Bridge that I will be using for this tutorial
Again, if you do not know how to do this, see my Getting Started in Unreal Engine tutorial – link is in the description
We will be using landscape specific materials for more control over the textures which allows us to paint with layers
Under your landscape folder, open the material folder
Right-click and add a material and rename it
Double-click to open the new material
In the content browser, open your first set of textures you downloaded from Quixel
Select the textures and drag-and-drop them onto the material graph using your LMB
Select these three textures and under the details panel, change the sampler source to “Shared: Wrap” so we can use multiple textures within the material
Right-click and search for material attributes – selecting “make material attributes”
This node “allows you to define any of the standard Material attributes found on the Main Material Node, bundle them together, and pass them along through a single output”
Connect the base color texture to the base color of the material attribute
Connect the normal map to the normal of the material attribute
Connect the red channel of the mask to the ambient occlusion of the material attribute
Connect the green channel of the mask to the roughness of the material attribute
Adding texture coordinates will allow us to control the tiling of the textures
Right-click and search for texture coordinate – this will allow us to use different UV channels for tiling
Press the M-key and left-click to add a multiply node – this allows us to change the tiling of the textures
Press 1 and left-click to add a vector 1 node – this provides us with one vector (tiling)
Right-click on the vector 1 node and convert it to a parameter – this is what will allow us to change the tiling without changing the actual material nodes
Rename the node to “tiling”
Connect the texture coordinate node to pin A of the multiply node
Connect the tiling parameter node to pin B of the multiply node
Connect the multiply node to each of the UV pins of the textures
Apply and save the material
Save the project
Select the textures and the material attributes nodes and copy and paste them with CTRL + C and CTR: + V
Select the base color node
In the content browser, open the second material and select the base color texture
In the material window, click on the “Use Selected Content” icon
Repeat this process for the other textures
Apply and save the material
Save the project
Repeat this process for the third material
Connect the multiply node to each of the new textures
Apply and save the material
Save the project
Select the four nodes for each texture and use the C-key to add a comment
Change the name for each texture
Apply and save the material
We need to add a layer blend node so we can blend the multiple textures together
Right-click and search for landscape layer blend
With it selected, in the details panel, we need to add three layers – one for each material
Twirl open each index and rename the layer
Connect each of the material attributes to each pin of the landscape layer blend node
Deselect the nodes and in the details panel, activate “Use Material Attributes” so we can connect the landscape layer blend to the material
This will simplify the original material node
Connect the landscape layer blend to the material attributes node
Apply and save the material
Save the project
Using the Landscape Material
Back on the landscape, in the content browser, find your material
Right-click on it to make a material instance
A material instance “is used to change the appearance of a Material without incurring an expensive recompilation of the Material”
Select the landscape in the outliner
Under the details panel, look for “Landscape Material” and open the material instance you just made
Under the paint tab of the landscape mode you will see the three layers you just made
In order for Unreal to “see” the layers, click on the plus button, choose “Weight-Blended Layer” and save the layer – you can just use the default folder Unreal suggests
Now you can select a layer and begin to paint on the landscape
To change the tiling, open the material instance from the content browser
Double-click it to open it and activate the tiling option (this is the parameter that we made with the blueprints)
Now you can change the number to change the size of the tiling [0.3]
Don’t forget to save the Material Instance
You can now choose each of the layers and paint the materials on the landscape
Importing Foliage
I have already imported foliage and other items into this project from Quixel Megascans and the Unreal Marketplace
Again, if you do not know how to do this, see my Getting Started in Unreal Engine tutorial
Working with Foliage
Open the foliage mode
For now, we will leave the options at their defaults
Please note that the foliage mode only works if you already have a landscape in the level
Select a tree and drag-and-drop it into the mesh list
You will know you have an asset selected by hovering over it and seeing a checkmark
You will now see even more options for this tree
In paint mode, if you hold down the LMB, you can paint the foliage onto the landscape
The brush size controls the size of your brush which determines how much of the landscape you can cover at once
The paint density determines how dense the foliage will be when you paint
Erase density is how much density of the foliage is left behind when you erase (this is done by holding the SHIFT key and using the LMB)
Single instance mode allows you to paint a single foliage instance where your cursor is located
Place in current level will place instances of the foliage in the current level
In the foliage settings, you have access to a bunch of different settings – we’ll only discuss a couple in this tutorial
You have access to the density just like we’ve already discussed
The scale x allows you to set a minimum and maximum size for the foliage – this means that each piece of foliage you paint will be slightly different
The random yaw means that our foliage has varied rotation
We can actually paint multiple assets at once
I will add a grass clump to the mesh list
If I select the grass, I can change the parameters for the grass
I can now select both assets and paint on the landscape
Try using your other assets and fill out your landscape