- Creating effects within Unreal Engine 4 is a very powerful process to really bring your scene to life. And we can certainly take advantage of these different types of effects within Unreal Engine 4, and there are many really infinite ways to work with different kind of effects within the Unreal environment. We've placed some foliage in our scene, and I've taken this scene a little bit further and edited it in to have a little bit more in grass and a little bit more going on with the trees. But what we want to do now is really bring that overall scene to life by adding in some wind effect to our foliage that we've created here.
So we can see our scene is really starting to come to life now. We've populated the environment with some trees and with some grasses. And what I want to do now is work with the grasses first and then the trees. I want to apply just some nice little ambient effects here. And I'm going to show you what I mean by that here. If we click on the car, and we'll just use that as a focal point, and then hit F to focus in, I'm just going to kind of place my camera so that I can see what's happening within the scene. And if we orbit around, just kind of tumble around and get into a place where we can see what's happening here, if you can see that these simple little flowers here are moving.
There's some nice ambient wind effects on those flowers. That's because it's actually driven through the materials. So if you have access to the content for this course, I want you to go to the Materials folder, and go into Foliage. These are the materials that we're using for all the foliage for the trees, for the different grasses, and these little flowers that we can see moving within our scene. So maybe we might want to zoom in a little bit so we can see that movement. You can see there's just a slight little sway based on some ambient wind happening, and we can even see that previewed at the material level.
So let's go to View Options, and just dial up the scale of the thumbnails, and we'll see that we have some movement on that. That's because that's actually driven at the material level. And we can do this through the Material Editor. So what we want to do is work with the textures that we've applied, or the materials that we've applied for our foliage. We have our pine branches, we have some leaves, and we even have different grass materials here. So let's take a look at how we can add those effects at the material level here. So I'm going to do is, let's just start with something like this simple grass.
So we'll just double-click on that material, and it's going to open up a Material Editor. Now if you double-click on that, and you get something like this in here, just grab the tab and drag it up to the top tab bar in the user interface to give you more space to work with. Now in the Viewport, what we want to do is actually just kind of zoom in a little bit, so we can actually see a preview of what's happening with our material. Now I'm going to zoom out, and we'll just give a quick tour with this material. Very simple, nothing complex going on. We have some simple texture maps driving the overall base color, and some simple maps driving things like a normal map, the opacity, and the overall roughness and specularity as to what's happening with those grasses there.
I'm going to grab all of these little nodes and just kind of move them out of the way, move them up to the top, because we're going to use a little bit of space down below here. We're going to actually create a really simple setup to drive movement of those grasses. The way that we want to do that is we want to use this World Position Offset on the main material node. So we can grab a couple things that are going to bring some effects about to our material, in this case, this grass. So we can use the palette, we can search in here, or we can right-mouse-button-click within the editor space, and I want you to simply type in simple.
And you'll see that we have, underneath World Position Offset, Simple Grass Wind. So let's just click that and drop that into our space. Now there are a couple of inputs here that we're going to need to populate with something. We're going to drive in something to control this. We have a wind intensity, we have a wind weight, and we have this additional waving grass parameter that we're going need to fill with something as well. So the first thing that we should notice here is that we are going to drive this into the World Position Offset. Now once we bring this in, we're going to get an error down below, because we don't have anything driving this overall grass.
So what we're going to want to do is bring in a couple of different parameters to drive that overall grass. The first thing that I'm going to want to do is just hit M, and left-click, and drop down a multiply. And we want to blend the overall texture and the normal map into this, and the reason why we want to do that is this is what we're going to essentially affect with this node. So now, with the color map dragged into A, and the normal map here, you can see that this is attached here to Normal, with this normal map, same thing, RGB output, into B, let's just grab that input and bring that into the Additional section down below.
Now we still have an error here, because we still don't have anything controlling the intensity or the weight of this. Well this is where we can use simple parameters, and the hotkey for that is just hold down S, and left-click in the editor. And we want to do that again. So we want two params here. Just going to move that multiply out of the way. And we'll bring in this bottom one, we'll put that into Wind Weight. And we'll bring our top one here, and we'll put that into Wind Intensity. Now you can see our error's gone. It likes the hookup. Everything's fine, it has everything in place to now utilize this material to provide an overall effect to this.
But nothing's happening. We don't have anything going on in this, and that's because we haven't defined a parameter to drive wind intensity or to drive wind weight. So we can just simply come into a parameter, and we can start to play with this setting in here. So if we come to this one here, for example, and maybe just start to drive up an overall value on this, we can see that right away by using the default value, it's going to affect both of these parameters actually. We can see that we got some wind in there. That's looking a little too much. We can check it out in our scene, and if we want to, we actually have to save that to be able to look at it here.
But let's dial that back, because I know that it's going to be a little bit too harsh for our scene. Maybe put it down to 0.4 for now, and let's actually save this material. So if we come out here and we find some of the grass, once this is saved, there we can see that these little grasses here now have a simple little ambient movement. And I can tell by the flowers, that's not too far off, but we might want to add maybe a little bit more to that. Let's go in and dial that up. Now we're using just a simple default value. I should point out that we can certainly put a minimum and maximum in, but for the case of this example, let's just keep this at a default value across here.
Let's try that 0.55, we'll just hit Save. It'll save our material out. And we'll come back to our main scene. And I think that looks a lot better. Certainly matches the flower wind there. And you can see, that's really starting to bring the scene to life here. We have some nice movement on the grasses. Now we would do the exact same setup here for the grass fluff as well. But we also want to do a setup here for our trees. So let's get something here to focus in maybe a little bit more on those trees there.
Maybe let's just use a simple little rock over here, just hit F. And the reason why I want to do that is I just want to get into a section here where I can see the overall trees so that we can dial in that same kind of effect in here. Maybe something like that. I'm just going to hit my S key, or actually W key, and just zoom in just a little bit. And all I'm doing here is just frame up this to take a look at these trees. That's fine. Now these are conifer trees. They're going to be a little more stiff than something large with a lot of leaves, so the wind is going to affect it, but we don't want anything too dramatic.
We want something that's very ambient. Just going to hit escape so we have nothing selected in here. I know that this pine branch material is what is driving the material on these trees. So I'm just going to simply double-click on there. I should point out that we can see our materials having effect on the thumbnails here. There's our flowers, and there's our grass. So let's double-click on the pine branches. We can close off our grass one for now. And in the pine branches here, same thing, exact same setup happening with the material. And we actually want to build a similar setup that we just had.
So quickly once again, type in a simple. And bring up a simple grass wind. Hold down M, and press left-click for a multiply. Bring that down. Hold down S and left-click to bring down a param, and do the same thing again, S, left-click, another param. And let's wire all of these in. The first thing we want to do is hook up the multiply. Now if we look here on the base color, we can see that the base color is being really driven by this guy here, so we'll take his RGB value and bring it down into our Multiply A.
And here's our normal map, and we can see that that's driving the Normal here, hooked up to that setting. I'll bring that RGB value into B. And now we're going to pipe in this. We can start to zoom in now. I'm going to bring this into this Additional setting down below. And then I'm going to bring in my parameter to Wind Weight and Wind Intensity. Because we're using the default value, we really could get away with actually breaking apart this link here, and getting away with doing the same one driving that if we wanted to. But if we need more control, we want less intensity and more weight, this is where you would use these two parameters.
But we could certainly get away with using the same on here for this. Now let's take the result, left-click, drag, and attach it to World Position Offset. So with this parameter here, let's take our Viewport here and just left-mouse-button-drag around, and just kind of middle-mouse-zoom out. And we just want to get kind of a preview as to what's happening in there. Let's take our parameter and left-middle-mouse-button-drag and start to get some effects in there. And we'll wait for that to update, and you can see that we're starting to get kind of an ambient wind effect on that.
Let's see how that works. So we want to click Save on our material here in the editor and come back out to our scene. And then we have something very, very subtle. So it's really, really subtle. We're going to want more than that. Let's go into the pine branches here and actually crank that up a little bit. Maybe up into something like this value here. This is going to show something crazy in this scene here, but let's just try kind of a much bigger value in this. And of course if it's too big or too low, we can always come back and forth to do it. That's way too big. So that's nice, we can just dial this back to maybe something in this area of 1.2, maybe down towards 1.
And we'll just hit Save on that material and go back to our scene, and we should finally see that we're starting to get kind of an overall nice effect. And that's pretty good. I still think it's probably a little bit intense to match what our grasses are doing, so I'm going to bring that down to about 0.85. Just hit Save. And come back to our overall scene here, once the material has saved. And there we have some nice ambient effects going on in there. Now again, I'm just using a default value to drive that. You could set a minimum and a maximum there, and you could set your own intensity or your own weight, but these are the basics to get this nice kind of overall foliage effects happening to really provide some dynamics to your scene.
- 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