BTEC Games Design - Level 3
Setting up and painting textures onto a landscape with Unreal
By Dave Johnson
Setting up and painting textures onto a landscape with Unreal
By Dave Johnson
Create a new folder called 'Landscape'. Within that, create three more folders: 'Materials', 'Resources', and 'Textures'.
Within your textures folder, import your graphics file. Make sure it is big enough and also a decent resolution suitable for monitors (72 dpi and a minimum of 1024 pixels by 1024 pixels ideally).
Within your materials folder, right click in the content browser and select 'Create new material'. Name it appropriately. Double click it.
The blueprint editor should open with the above node inside it.
Under the Details tab, check 'Used with Landscape'
Right click and type 'Landscape co ordinates' into the search box that appears. Select texture coordinates. This maps the texture to the landscape model.
Drag in your graphic texture file from the Content Browser.
Connect up the nodes as per the previous tutorials on creating materials and textures. Compile and save it.
Right click in the graph and select Landscape Layer Blend. To add Layers to it, you need to first select the node in the Material Graph and then in the Details panel, click on the Plus icon that is in-between the word Elements and the Trash Can icon. This icon is highlighted yellow in the image with the number two on it. Depending on how many textures you are using will determine home many Layers you will want to have.
Layer blends specify texture weight and opacity. You will need to set up two, layer blend base colours and layer blend normals. Base colours are our texture files and Normals are our bump maps to simulate roughness to the texture.
Below are some examples of how 3 different textures may be set up in both their base colours and normals.
Once the Layer Blend nodes have been set up, it is time to connect the Texture maps to them. When completed, you should have something that looks like the following:
This might look daunting but actually it's not. The coloured gradient box on the far right is your texture co ordinates. The next column of six boxes are all your texture files that have been dragged in from the content browser. You can then see the two layer blend boxes have had a layer fro each texture file set up within them. The person who created this picture also set up layer height layers, which is not necessary for our purposes and outside the scope of this tutorial. The usual metallic and roughness values have also been added in the third column, as per the previous materials and textures tutorials. The final 4th column contains the Landscape material node, which should be fairly familiar by now. Compile and save the blueprint.
We are almost ready to begin painting. Open the materials folder in the content browser and highlight it by clicking it once.
With the Landscape Material selected in the Content Browser, select the Landscape in the world by clicking on it. Then, in the Details panel, expand the Landscape section and look for the Landscape Material input.
Apply the Material to the Landscape using the Use Selected Asset from the Content Browser arrow icon (shown above).
You should get something similar to the above picture occurring.
We need to create three Landscape Layer Info Objects, one for each Texture that we wish to paint by doing the following:
- First, make sure that you are in Landscape Paint mode.
- On the Modes toolbar, under the Target Layers section, you should the inputs you set up in the layer blend node.
- To the right of the names, there is an icon of a Plus Sign. Clicking on the Plus sign icon will bring up another menu that will ask what type of layer you would like to add. For this example, please pick the Weight-Blended Layer (normal) option.
- When you select the Weight-Blended Layer (normal) option, you will be prompted with a pop-up box that is asking you where you want to save the newly created Landscape Layer Info Objects. Select the Resources folder that is under the Landscape folder and then press the OK button.
- Now with the Landscape Layer Info Objects created and applied, we can begin to paint our Landscape.