Join Craig Barr for an in-depth discussion in this video Defining the water body, part of Unreal Essential Training.
- Creating environmental effects within Unreal Engine 4 can often be a combination of several different editors, or that is, several different nodes within the Unreal environment. And this could be a combination of things like materials, lighting, animation, and even a combination of visual scripting in there as well. Now, we have our scene really coming along here. We have our island built up. We have our hero scene with our lighthouse, and we've built the lighthouse light. And we have this nice beautiful sky environment.
But of course, we are missing something major here. We're missing water. Now, I want to show some ways that we can work with water within Unreal Engine 4. The first way that I want to discuss here, is ways that you can use pre-existing, built water effects for you to produce a variety of different things. And this could be anything from a small water effect, something like a pond, all the way up to something larger like a lake, right up to complete ocean environments. And the way that we want to do that is to take advantage of the entire Unreal Engine world, and that is the community that exists out there.
What I want you to do is go to your Epic launcher. Now, you can certainly access what I'm about to show you regardless if you have access to this content or not. If you have access to this content, what we're going to be doing is adding in an asset from the Unreal Engine community, into this project. So what we want to do is switch over to our Epic launcher. And if you're familiar with the Epic launcher, you'll remember that it has this kind of tab-based system, much like the Unreal Engine editor works like as well. Now, you'll see that we have this Community tab, and of course, this is where we produce things like news and announcements.
But we also have this area of Learn, and this is an excellent, really powerful area to be able to dive in and find things like tutorials, could be things like blog posts or example scenes for you to really broaden your knowledge and your skills here in Unreal. If you scroll down in this Learn center, you're going to find an area here called "Water Planes." Now, I should point out, this community is always updating, it's always changing, so where Water Planes is physically within the launcher right now today, may be different by the time you're running this course, but it simply is referred to as "Water Planes," and this is a collection of water surface examples that the awesome team with Unreal Engine have produced to help you get started or to also help you understand how water effects work within Unreal.
So, if you don't see it immediately within here, you can simply search for "Water Planes," and that is the name of this content. Once you've located this, simply click on the little download arrow, and actually download it in. You can click on the actual project itself, to see what's going on in here. You can see some videos, that'll show some demo videos, and overall description of it, but this is where you want to add to your project. And once you've added that, or downloaded that and added it to your project, if you come out here back to your Library, you can scroll down and see in your Vault, what you have in that Vault.
In this case here, I have this Water Planes thing, and I can simply click, "Add to Project," and define where I want that to go, and I actually have this added to our beach project right here, and I want to show you that in the Content browser. You'll see that underneath Content, I have in here our content that is included with this course, so the content that's available for this course, and of course down at the bottom here again from the View options, I have "Show Engine Content" enabled, and this is the default example content that comes with Unreal Engine.
But since I've added my Water Planes content folder to my overall project directory, you can now see it here in the project directory. Water Plane. And if we click and open that, and dive into this, in our Content Browser, we'll see that we have several different things here. I would encourage you to go in and play, and take apart, and just dial in some of the different parameters, to see the different effects that are available here, to really give you that overall understanding of how something like a water environment might work in Unreal.
Now, regardless of the setup, you're going to find that there are a couple of basic things in common with all of these. It's utilizing some form of plane. A piece of geometry, for example. It's utilizing typically a more complex material. Something that's layered with many things, that might incorporate translucency, some that do not. And of course, we have different maps, such as HDR environments to provide reflections on the surface, and even right down to different effects that you might have for things like wave caps and overall structure of the wave environment.
So take a look at all of these. For the example here that I want to use for this scene as kind of a quick start, and a way to get a nice water environment here in our scene, we're gonna go underneath that water plane folder, and we're gonna go right to the bottom. We're gonna click on "Translucent." And you can see down in Translucent, it has these two folders, "Blueprint" and "Materials." And we can see these over here in the actual Content Browser. Click on the Blueprint tab, and take a look at what's in there. There's one node. And anything with "BP" in the front of it means that it's a blueprint.
Now we're not going to dive deep into blueprint in this lesson here, but what you should understand is that a blueprint is visual scripting, and it's essentially an assemblage. If you can think of it as a packaged asset here in this case, for what we're using, it's an assemblage of simple plane, with some materials, and some animation driving the overall effect of how this water is going to work in our environment. Now, if we go back out to the Materials folder, there are two materials in here. And if you're familiar with how we've built materials in this course, and how we've utilized material instancing, you'll be familiar with this.
This is the master material, which is the translucent water for this example, and we have a material instance which has certain parameters, promoted to the top level, that we can dial in to really adjust the overall look and feel of that. So what I want you to do is go back to the Blueprint folder and I'm just gonna click and grab this Blueprint Translucent Water, and by doing that, left click and hold it, and just drag it right out into the view port. You'll see it first it's going to be quite a large view, 'cause it's actually close to the camera here. If you can, if you have access to this scene, drag it down to something around this size.
Just kind of bring it into this area in here. And it doesn't actually have to be anywhere specific. That's fine for now. What we're going to do is have to dial in or place where we want it, once we get our overall scale of the effect of this. Now, if we were to zoom in on that piece of environment or that structure here, I'm just gonna hit my W key and my right mouse button, you'll see if we zoom right in, oops, hit S and come out, that we actually have some water effects going on, but of course, it is way too small for our overall environment.
Well, this is where we want to take advantage of some of the parameters that have been exposed or promoted up to the top level here, to dial in our overall water scale. Now, we have things like Location, Rotation, and Scale. We're going to leave those alone for now, because this setup actually has its own environmental scale here. A Water Scale in X and a Water Scale in Y. Now, to figure out what scale we want to work with, we can simply start to dial that in, both of these here maybe to try to get a feel for the overall scale of it, but it's going to be much larger than I think, just dialing in something simple here.
So typically we're going to probably want to jump up to something kind of the 35 to 50,000 range, and if you adjust these and set them to about 40,000 in scale, this is going to start to give us a bit of real simple, basic water in here. Now, if we look at the depth of this, I can tell that the water is not giving us the depth that we want. So I'm simply going to grab our translation here, if you're not in translation, you hit the W hotkey to bring that up. And I'm just going to bring up that overall depth, just a little bit.
This shoreline is painted, when we painted the landscape, to have kind of a darkened, kind of wet feel. So we'll bring it up somewhere in the middle area of that. Maybe in this area here is probably fine. Now, if we zoom in again, on this water. Whoops, I'll just hit Escape to get out of that. And hit W and right click. We'll see that we have some effects going on here, but they're definitely not bold enough for what we want to do on here. We want to work with things like Overall Water Scale, and how much the amount is varied.
We might want to adjust that a little bit. The scale of this water is way too small. So we can simply start to dial this up, and begin to get towards a scale that we might want to work with. Let's see how that is working here, if we zoom out a bit. Maybe hit our S key and just come out. S and right mouse button. That's starting to get in there, but I'd like the waves maybe a little bit bigger. So I'm going to probably bring this up to something like around maybe 63,000 here. And that's looking pretty good, actually, from where we are right now.
Now, we should maybe vary the amount a little bit. We can dial that up to see, actually it brings it down, so I don't like that. I want to bring the variation, or the noise of the overall surface, up a little bit. So by dialing that Variation Amount value down, we'll go below .8, and that'll help us. With that overall environment. Now, a couple things to note. When we dial in this overall scene, if we take a look in the distance, you can really see that kind of tiled pattern in there. I'm not so much worried about that, for this scene. For this scene here, I'm just going to select this car, hit F to frame in, and just use that as my focal point here.
We're going to be placing a bunch of different other effects within this environment here, things like environmental fog, other things that are going to really fill in this background. We have a bunch of foliage and things that we need to address and put in here as well. But we can see that this water, right now, is really starting to give us a really nice effect for this scene. And if we zoom in, just grab a rock, and simply hit F. The nice thing about this water setup. Look at the effect that's happening. We have nice translucency, and we actually see this kind of scattered feel of the water on the rock.
So we can actually see a little bit of bottom in there. And we can adjust that, in the overall settings here. If we go back to our material here, we can adjust how that would appear. So we can adjust that through the blueprint as well, by Shore Depth, and also at the material level. So just the last thing I wanted to point out here, now that we have this water looking quite nice in our scene from these awesome example files that the Unreal Engine guys have put together here for us, let's look at quickly how the materials work in here.
So we can either do that in a couple of ways. We can click on the Materials here, or I always recommend to work with the actual material node from the details panel, just simply double click on that. This is going to bring up the Material Instance pane. And if we come along here, we see all of these different promoted parameter groups here. This is where we can adjust things like the water color, to help with the depth, right. A reflection cube that we may or may not want visible within the scene. We can dial in things like how the variation is being blended into the scene here as well, and of course, if we come right down to the bottom here, you'll see that we have these parameter values of things like Deep Water, and Shallow Water.
These are vector parameters that are adjusting the overall color as to how that color will look in shallow or in deeper water, for that matter. Now, the General tab, if it's collapsed, down on the bottom here, you can simply click to open that, that's going to bring up the master material. This is the main material that this instance is built on. Let's double click that. And we're going to actually bring up the full material of this. I'm actually going to grab this one, and just drag it into the full user interface, and collapse our material instance. And the reason why I want to do that is just to quickly show, you know anything to do with water here, it's going to most likely be more of a complex material setup.
You have things like displacement, that are driving the overall animation of the view of the water, and we can see that in here, that we have different kind of cloudy effects, and normal maps driving the overall animation and effect on the water, and we can also see that we have reflection cubes, and how that's going to affect that water as well. We have color nodes in here that are going to affect the depth, whether it's deep or shallow water, and of course, this is all being mapped through a simple material node here at the end, this master, main material node, where we have things like Base Color, all the way to driving in how our reflectivity and overall specularity is working, and of course, our translucency, which is driven by this Opacity.
So that's a quick overview of setting up water using some of the example scenes here, within Unreal Engine, and how we can adjust that to our liking for our 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