- In Unreal Engine 4, we can take advantage of the powerful Landscape mode toolset that is available, and we can create a nice base form structure, then go in and edit and refine that landscape to get it towards what we need for our project. In this case, we're working with our island base form landscape, and now we want to bring it to life and add some materials and some textures on this. So there are a couple things to talk about in the way that landscape materials work in Unreal Engine 4, and I want to dive in and show you some of the basics on that, and then show how we can quickly paint up and get some good base textures going for this landscape for our project.
You can see that I've taken our landscape a little bit further. I've used the Manage tool and blown away some components. I've detailed some of the edges around where they're going to be touching the water a little bit, and then refined some of the areas where our hero assets will be sitting for the main project. Now what we want to do is work with materials and see how landscape materials work to enable us to overlay textures and to paint in layers with textures. So what we have now is our base landscape.
We want to first assign a material to this. As we can see if we select Landscape within our World Outliner, we can look down in the Details panel here and by just scrolling down through, you'll see underneath the Landscape tab that we do not have a material assigned. Now there are a couple of ways that we can assign a material to this. There are three basic ways that we can look at. So what I'm going to do is, in my Content browser, I'm going to select Materials. Now in there you'll see that we have a nice landscape material.
We're going to be talking about landscape and terrain. They look very similar and there's a reason for that. We'll get into that in a moment. Now there are a couple ways that I can assign this material. One of the ways is that within our Landscape Material where we see None on the thumbnail, I can click the pull-down menu, and I can drag and take a search through all the way through all these different materials until I find it and click on it in there. Of course, I could also search for it by typing in landscape material and then bringing that up and I could find it through there.
Or I can actually come down here and grab the material. I could left click and drag and drop and bring that right into here. So let's just take a look at what that would look like. I could drag and drop it in there. Or another way that I could do it is simply just select it in the Content browser and use this little arrow here and that little arrow always represents whatever you have selected within the Content browser it's going to drive it into that material. So let's just do that while I have it selected. I'll click that material. I'm using my left mouse button to do that.
And it's assigned this material to our landscape. Now what's going on here? Well, we had just a simple base material on there. We've now applied this landscape material. There's nothing too crazy going on down deep in the material and I don't want to dive too deep into how the materials work at this point here, but I do want to point out a couple of basics in the structure as to how and why we're working in this way with landscape materials in Unreal Engine 4.
So to do that, I want to take a look at how this landscape material is built. Now if I double click on this material, we'll see a couple of interesting things happen. Here we bring up something that actually doesn't have a lot of information on it. I just said this material has a lot going on in there, but this doesn't look like there's a lot going on in there. Well, that's because this is actually something referred to as a material instance. So it's actually an instance version of another material and that is a whole other discussion itself. Again, I don't want to get too deep into that right here, right now, but I do want to look at how the landscape material is working.
So this instance version has promoted at the top level some basic settings that we can access but really it's being driven by this Terrain shader. So if we go back to the main viewport in our Content browser you'll see that we have this terrain material. Right double click on that. We're going to again just to point out what's happening here in the viewport, it is automatically docking. I can tear any of these off at any time. I don't have to have it docked if I don't want to. But to work with this, this is quite a big material view here, so we'll just dock it right up there.
And just to point out that our viewport is back here. So there's our landscape instance material, and this is our terrain material setup. Now nothing too crazy going on in here. You can see that we have the schematic view, if you will, of how everything is looking and linked up within here. And you can see that everything is organized by type or essentially almost like a container as to what's happening. So our base color is being driven by all of these nodes. Now what's happening there? Well, let's zoom in on the actual Terrain material node.
Now we have three basic inputs here. We have a Base Color that is driving the overall diffuse or color of our landscape material. We have our Roughness here defined, and we have our Normal, where our normal maps are being fed into this. Now the one area that I want to focus on in here is how the Base Color is being defined and what is being driven into that Base Color of our landscape material. Again, we are looking at a number of inputs coming in but we do have just the one input coming into Base Color and that's coming from a very important node here in the materials which is a Layer Blend.
Now we have all of these different things being fed into this, so primarily the four nodes that are being fed into here are this rock texture. We have a wet type of texture that would represent where water is touching the landscape, and then we have a grass. And they're all being fed into this Blend node which is being fed into the Base Color, and this is important to point out because of how it operates when we paint. We want to be able to access all of these textures while we paint and that's what this material will allow us to do. So let's jump back out of here, get back into our main viewport, and look at how we can work with materials.
So there are a couple things that we need to do before we can actually paint. Now over here in our Modes panel, we're in our Landscape tools, we want to click on the Paint module here. And the paintbrush is essentially going to allow you to change the overall appearance with textures and materials to your landscape. Now a couple things to point out as far as the tools go. The Paint Tool actually looks very much like the way the Sculpt Tool will look in the way of options that pop up below it, except far fewer options. But we do have things like Smooth, Flatten, and Noise that we can work with.
For the shape of the brush, we're working with the default Circle, and everything is the exact same here. You can work with Alphas, Stencils or Stamps at a component level as well. And then for falloff we have the same as what we see in our Sculpt there. I'm going to leave it on the Smooth Falloff here as well. We can see now, below we have fed in here these four types of textures and these are operating as texture layers. Now we saw how that looked in the Landscape node there, and we want to be able to paint with these texture layers across our landscape.
So now before we begin, there are a couple things we need to do. We need to actually define a layer for each one. For example here, if I wanted to paint with this Rock texture, if I grab my brush and start to paint, it's going to give me this error message. It's going to say that I have no layer info assigned to it yet and that I must create or assign one before I can actually paint. Well, the way we do that is with this little plus sign. So if I just come into here and I click this plus sign, and we want to use Weight Blended Layer. And the reason why we want to do that is so that we can blend all these different textures together.
Now it's going to ask me where I want to save that. It's going to actually create a folder for me here based on the scene name. So this is fine. We can leave it as that, and I'll say OK. And we want to do this for each one. So for Mud, we'll do Weight Blended Normal, same thing, and hit OK. Grass, same thing, and Wet, same thing. And you can see that down in our Content browser, these files are being stored here, and this is storing the layer information for those textures. The next thing to keep in mind here before we paint, there is an issue here.
If I just start to paint on here, you may come across times where you see nothing but black once I start to paint on the overall scene. The reason for that is that it needs to have the entire area covered with this. Essentially it lets you paint your textures. So just to be safe, if I start to paint right here, you see that I'm getting that black. Just quickly bring your brush size all the way up to the maximum size, use the Rock, and just quickly fill in the entire area with paint, and now it will be fine. So once that's out of the way, we can now go and paint areas that we want to work with.
The first thing I want to do is around this shoreline, I want to paint some of this wet look, where the water would touch the shoreline. So I'm going to bring my brush size down a bit, maybe to something like that. That should be fine. And my Brush Falloff is at 0.5 and the Strength is at about 0.3 so that should be fine. And now I can get in here and I can begin to paint this kind of falloff here where it's kind of wet as the water hits the shore, and I'll even go in under the water there just to overlap it a bit.
And we can tumble around. I'm just going to hit the "f" key just to frame everything in. And we just kind of tumble around and go along the shoreline. We're not necessarily going to see back here, but we can just quickly rough that in. There we go, so we have this kind of wet look happening on here. And if I hit my w key and my right mouse button, we can start to just zoom in and see the effect that it's giving us there. Now let's add some more detail in here. We want to add some things like some mud, maybe to this area.
Start to maybe blend in a bit of some Mud effects on here. Let's just get in a bit closer on that so we can see some of the detail. There we go. I don't want to cover the whole thing with mud because I do want to put some grass in here. And then, of course, we can adjust the Opacity. Let's maybe bring the grass just down a little bit, and we'll just overlay it with this. Now remember we don't need to get too crazy with this because we are going to cover this with props and things like that so we don't have to worry too much about the detail.
It's a good idea to zoom in and just have a look as to what's happening as you work. Let's see the mud, apply a little bit of mud on here. And at any time we want, maybe a little bit more of the rock kind of showing through. We can just gently overlay that blended with that grass. There we go, we're just giving this a little bit of some life in here as we go, maybe a little bit of mud on this side and just a bit more grass. This is going to have a lot of trees up inside here, so we'll have some grass kind of cover up some of that area too, some of the top areas.
So we've now seen how we can create our landscape, how we can edit and manage the overall landscape structure, and how we can apply materials and how those materials work in Unreal Engine 4, and how we can quickly texture paint using layers within the Landscape mode tools.
- Customizing the Unreal UI
- Creating a new project
- Creating landscapes
- Blocking out levels
- Assembling a scene
- Working with materials and lights
- Adding post-processing effects
- Defining bodies of water
- Adding atmospherics, foliage, and wind
- Working with the Blueprint editor
- Creating cinematics
- Monitoring performance
- Packaging a game for distribution