Join Craig Barr for an in-depth discussion in this video Creating atmospherics, part of Unreal Essential Training.
- Unreal Engine 4 contains a very robust effects system within it and these effects exist in a couple of different formats. We have the ability to create global atmospheric effects, things like, for example, an atmospheric fog that we can apply globally to our scene and also something like itemized or localized particle systems. And this utilizes a very powerful particle system within Unreal Engine and that's where we can build things like, for example, smoke or fire. And then, a third aspect is this ability to create dynamic foliage.
Now, we've created our nice scene here. We've built a nice landscape that works for our hero assets. We've looked at how we can place these hero assets onto this landscape. We've created some material effects on the water, and you can see that we've really dialed that in nicely to have this sea foam effect. And you can see that our global environment.. We have a nice sun and we have this water plane that we've built in here. And it doesn't fill the entire environment. That's not a problem because of how we're going to utilize or start to populate and really bring this scene to life here.
Now, one of the things we want to take a look at is this ability to create foliage over the top of our landscape. Now, with foliage, we want to do a couple of things with these. We want to place these objects so that we're populating our scene, but we want to place them in a way that we have lots of control over them. Control over their scale, maybe control over their randomness, but also a way to rapidly place them. We can certainly at any time come in here and place individual objects. For example, this tree that we have in our scene. It's just a simple static mesh of a simple hero tree, and that's fine, but that would take a long time to really populate a very dense scene with things like a forest, for example.
Well, Unreal Engine 4 contains the ability to rapidly populate an area with foliage and we're going to take a look at how we can do that right now. So what I'm going to do is, we're in the Foliage tab, and you can see that this is a very simple setup. Let's take a quick tour as to what's happening here. You can see that we have this first, by default, Paint tool for foliage. And this is how you're going to place your foliage within the scene. You can adjust things like brush size and density and how the meshes are placed across the landscape, as well.
Down below that, we have this Reapply settings to instances. So this is where you could adjust settings on your main hero aspects or foliage, and then just simply go in and paint those exact same settings over the top of the instances there, as well. So, it's a pretty powerful way to work. Then we have down here some default selection tools. The selection arrow, lasso, to simply go in and be able to rapidly grab areas or pieces that we don't want so that maybe we can delete them if we don't need them, and then a paint bucket. You can flood an area with foliage in the same manner as a painting system, where you could flood these with trees or grasses, for example.
Now, let's go back to the paint tool and you'll see down below that we have Drop Foliage Here. We can either drag and drop or we can dial it in through this little menu. Let's go into our Content Browser, down below in the project, and click on Models. You'll see we have this subdirectory of Foliage, so if we left-click on that... Double-click on that, sorry. We want to place some foliage within this scene. We want to populate our landscape with some trees. But we also need something down in the main hero area. Let's work down in this main hero area, here.
So I'm going to actually just click. If I want to interact with this environment right now, I can't. I'm in Foliage mode. So let's go out of Foliage mode for just a second here. Click on something like maybe a rock within the main hero area and just hit F to frame it. And I'm just using that to get into this space, so that at any time I can begin to work this area up here with some grasses. Let's go back to our Foliage mode and just left-click on that. So now, underneath the Models, Foliage, we can see that we have a bunch of different grasses and we even have some trees.
Let's start by placing some grasses. So, let's grab something like this grass_2. Drag and drop that into the area. Once we have something in this Foliage area, you'll notice in the viewport that we get this pulsating, off-blue orb or sphere. This represents your brush size, as well as the density of where you're going to place your objects in here. So, we want to paint this foliage. Now I should point out, before we start dialing in any settings, painting foliage or painting any kind of geometry across another piece of geometry is a bit of an experimental thing in the way that you place it.
And what I mean by that is that odds are the first time you place it, it's not going to be the exact scale or orientation, for example, as to what you may want it to be. So it really is a try and test kind of thing. Now this is where you'll probably paint, and you'll use Undo, and you'll come back and dial things in and you'll paint. It's just part of the process, so just to give you a heads-up on that. You're never going to get the perfect thing right off the bat, but you can really dial it into exactly what you want as you go. With that said, if we take the default settings on here on this grass, and I left-click, and I start to populate my scene, I can see something happening there but there's not a lot.
In fact, they're way too small and they're too spaced out. So let's adjust how we want to do that. Well, up here on the paintbrush, we have this overall Paint Density. This is a global value that's applied to the brush outside of the actual asset that we're using and we'll look at the settings for this as well. This has its own density. Let's take a look at how this is going to change it. And we can see that's improving it a little bit. But they're much too small. So let's leave this alone for a moment and take a look at the actual asset.
We have a density and we have a radius in here, but we also have a scaling. We have different choices for scaling. We can use a free scaling or we can control all of the x, y, and zee or zed scaling, but I want to leave this as a uniform scaling. Now, the default, as we can see if I drag across there, is much too small. So let's put our maximum up just by dialing in something maybe to that size, and then maybe our minimum up to around half of that. We're going to notice though-- Oh, that's much too big now. So that's not a problem. We'll hit CONTROL + zee or CONTROL + zed to undo, and we'll come down here and we'll maybe just dial in something that might be a little more towards what we want to work with here.
So maybe something like a minimum of 1.5 and a maximum there of just around three. That's looking a little better. In fact, I want to zoom in just to see how that's looking. I like that, but I think it might still be a little bit big. I'm going to put it down to around 2.8 and we'll leave that minimum maybe at around 1.2. And we might want to make our brush size a little bit smaller here, just so that we have a bit more control as to where we're placing these objects. That should be fine, the size of it. One of the things here now, I like the way that's placed but I do want to increase the overall density of that.
So, maybe we'll bring this up a bit, make our brush size just a little bit smaller, and just kind of go into some of these areas here and put in a little bit more dense grass placement. And that's fine. That's starting to bring up the overall area in there. And then we can, of course, make our brush size a little bit larger and begin to rapidly place some grasses back, in and around the different props here. So I don't want to go too crazy on how we're working with these grasses. The same approach can be applied to all of these. So we can really start to use this to dial up or populate our scene.
I want to show you one more thing that's actually interesting. I pointed it out earlier. I have this set to Landscape, where I want the foliage to be placed. Well, the cool thing about the way this works within Unreal Engine 4 is that you can use this as a rapid way to populate a scene with any type of geometry. It doesn't just have to be a grass or a tree. It can be something... Anything, really. And we can also have it affect static meshes. So if I click that on, just to show... Just to illustrate here. We could actually populate over the top of that car or even across the side of the rock.
And we can even go up the lighthouse, as well. And this is really interesting because this allows us to follow the contours of our geometry. So if you think about that in the sense of using this to place other objects in context to an asset, a model, or even a character, it's a really nice way to work with this Foliage tool. So we've placed some grasses. Let's now place some trees along the background here. So I'm going to turn off that static mesh as we don't want to put trees, of course, across the lighthouse or anything. We want it just on the landscape. So I'm just going to use my S, right-mouse button, and I'm going to use ALT just to kind of frame this up a little bit.
Maybe we want to come out a little bit more... This is fine. And, what I want to do now is place some trees. So, we'll just open this up a bit. And we'll use this tree_2. It's a hero asset, and we'll just drag it in, drop it. And now you'll notice if I click on that tree, it has its own settings. So, it's different than these settings here and, of course, different scale anyway, so we're going to have to play with the overall size on that. Let's make our brush here on the back a little bit larger. In fact, let's make it a lot larger than that.
We want to be able to populate this area. And again, I said, this is kind of an experimental thing. We want to try and undo as we go. So there's going to be a couple of things we want to change, especially for trees. Let's left-mouse button, drag. I can tell you right now that those trees are much too small and much too dense, so let's hit CONTROL + zee or CONTROL + zed to undo, and let's adjust how want to work with that. So there are a couple of things that we can do first here. Let's bring down the paint density to something much more smaller for these guys, first of all.
Maybe something in around 0.1. You can see that that's breaking it up. Making it a little more sparse. That's fine. But our trees are tiny. We definitely need them bigger. So let's scale up the max to something maybe around seven and the minimum to maybe around high fours or around five there. And then again, let's go in, and we can see now our trees are looking a lot better. A lot bigger, but again much too dense. This is where we're going to want to really adjust the radius, which is the distance in between the placement of these trees, and the density of this actual tree in here as well.
I want you to drag that density down to somewhere around 20. And let's increase the radius or the gap in between these trees. So now if we go in and place them, we'll see that we're starting to get a little less dense. I'm going to bring that down even more. Bring up the radius a bit on that. Now that's starting to look pretty good. Little bit too dense, so I'm going to bring down the overall paintbrush density. The global value of that. And that's a little bit better. But, there's something happening here. You'll notice that as I place these trees, look at the angle that they're going on.
This is because, by default, it's doing what it's supposed to do. It's set to paint or Align to Normal and that's underneath the Placement tab of each of these little assets. I'm going to turn that off. And you'll see the difference we get here now if we drag across the landscape. We get trees oriented directly up. It's a lot more realistic. I'm happy with the way these are starting to come along here now, but I definitely want a little more gap. So I'm going to maybe bring this paint density down to something like 0.06, and that radius, we can bring that up a little bit more.
We'll just make sure that we're placing trees in and around the environment here. Just to come out a bit here, and I'm going to place these trees at the back here. Now, we're not really going to see the back directly dead-on, but we are going to see it from the perspective of our view here. So I'm using W, right-mouse button just to kind of frame back up and we use ALT to rotate out. And this is really starting to come together nicely now. But I want to break up those trees with something a little different. Let's apply this tree_3. This is a sparse, very tall, different kind of tree.
We might want to make our height on this one here a little bit different. Maybe something in the range of eight. Maybe our minimum around 5.5. We're definitely probably want that density back down to around 20, and if I remember correctly here on this one, it was around 1.8 in the gap, there. Let's put that at two. And make sure that we're using that tree and then just come in and drag this. One of the things that we need to set, because it's set to each asset in here, is let's turn off Align to Normal. And then come in and begin to place these trees in here.
And you'll see that that's nice. It's breaking up the overall scale of the size of those trees. So that's looking great. We've looked at how we can rapidly populate our scene with foliage, and that we've also taken a look at how we can align that to the surface normal, or not, how we can dial in the density, and how sparse we want that forest or those grasses to be. Now we want to take a look at how we can actually get into applying some effects to this foliage in here. So, the Foliage tool is very powerful in Unreal Editor 4, and it's certainly a very nice way to bring up the life in 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