Forming the topography
Video: Forming the topographyOnce you've created a terrain object, and put it in the right place, you can start to brush in major land features. We need to do one more bit of moving around first, and here's why. When we select this terrain object, we have the option to brush in our land forms. For example, this first tool here is the Raise and Lower Terrain tool. What this lets us do is, brush in hills, or push them down. But we can't take the terrain and brush it below its original level. Even if we move this terrain to a different y height, we still can't push it flatter.
- Next steps
Viewers: in countries Watching now:
Interested in game making? Start in Unity—a game engine for mobile and desktop games and real-time simulations. Author Adam Crespi shows techniques used in game development with Unity and introduces the basics of scripting and game functionality. First, learn how to import models and textures, organize your project and hierarchies, and add terrain, water, and foliage. Next, Adam explores how to use lighting to bring the game to life, and add rendering, particles, and interactivity. The end result is a sample game with a lush environment, fully animated characters, and some basic interactive gameplay.
- Designing the game
- Creating and transforming objects
- Importing and configuring models and textures
- Setting properties in the Inspector
- Creating the terrain geometry
- Building materials and adding shaders
- Creating GameObjects
- Exploring physics
- Animating objects
- Lighting the scene
- Creating 2D game elements
- Adding special effects
Forming the topography
Once you've created a terrain object, and put it in the right place, you can start to brush in major land features. We need to do one more bit of moving around first, and here's why. When we select this terrain object, we have the option to brush in our land forms. For example, this first tool here is the Raise and Lower Terrain tool. What this lets us do is, brush in hills, or push them down. But we can't take the terrain and brush it below its original level. Even if we move this terrain to a different y height, we still can't push it flatter.
So what I'll do is move the gallery up a little bit and let the lowest level of the terrain actually be the lake bed around. Then I'll sculpt up all the hills and flat areas around the galleries. This way, I'll get away that can't brush below zero limitation. I'll pick my gallery object here in the hierarchy, and there's its y position at zero. I'll put the y for the gallery up at well, let's say four, and it jumps up a little bit. Here's my first person controller and I'll need to move that up as well. Because I know I moved up four, I'll click and drag on that first person y, and simply pull it up higher to about five or so.
I'll press Play and just see how this looks. Now, remember, we had turned off the sky and the environment, and the fog in the scene. But in the game here, I can still see my sky outside. And it looks like we do still land on the floor in the game. So the move worked, and we're ready to brush in the terrain. I'll select the terrain object. And the first thing I'll do is start to brush in some hills around. Which is actually forming the lake bed. But again, we can only go up from the original terrain base. In the terrain script then, we've got brushes we can choose from.
And brush sizes and opacity. What this lets us do is say, are we affecting it a lot or just a little bit. We can see that I've put the brush size up to 100 and that blue dot is actually my brush. I'll zoom in on my gallery by selecting it, pressing F to focus and then re-selecting that terrain and then back out a little bit and start to brush in the lake. As I start to brush the surround, I can see that those hills raise up very quickly. I'll press Ctrl+Z, and pull them up just a little bit by pulling back the opacity on that brush.
And I start to brush in hills, I can see that, that subdivision is taking place. And it's difficult to see in a textured wire view. I'll change back from textured wire to textured. And brush in the first low hills. This is the start of that lake bed, and I'll zoom in on the gallery and make sure it's not submerged. It looks good. I've got a little bit of a hill going on around, enough so that when I put in water, this gallery should sit in water nicely. What we can do for something like this, because we haven't made water yet, is to put a plane in.
I'll choose Game Object>Create Other>Plane. I'll take this plane and scale it by pressing r, and simply scale it out. This object starts out with a height of five, and so I'll pull it down to where my water should be, just under the surface of those floors. And this will give me a measure. I'll make sure that the podiums are submerged just a bit. And that's the water level, it's a rough marker that I can delete later. But at least I have a good idea of where that water will go. I'll scale this out just a bit more and then put a blue color on it.
What I'll do is go into the materials, right click and choose Create>Material, and I'll call this new material temp water. I'll click on the main color and just put some blue in there, then I'll pick this plane and drag that material onto it. Now, it's a fairly screaming blue, but I have a really clear idea of where that water will go. So I don't accidentally submerge or erode too much of the lake. And now back to brushing the terrain. I'll pick the terrain object. Go back to my raise and lower tool and brush in around here.
Doing and undoing as needed. Lowering the brush size just a little bit. There we go. And brush in that lake, eroding the edges of that plane. And giving it a small pond feel, as if this was purposefully set in the water. Now I'll back out and start to make some larger hills. I'll take that brush size back up. Bring up the opacity just a bit. Pull back and add in some mountains. With my brush up and my opacity, moderate strength, I'll start to add in some hills.
We can see that terrain subdividing and this brings up an important point here. When we're brushing in terrain, we need to work in broad strokes. Adding in details and layers as if the mountains had formed over time. We don't want to take the opacity all the way up and simply make giant spikes because that will look kind of odd. We want to add these in. So that we're adding in bit by bit. Ridges, and hills, and so on. I'll let these blend together a little bit on one side, and leave the edge of my terrain alone.
Now over here, I'll start to add in more hills. This side gets a little bit taller. And then finally, I'll bring in another mountain range beyond. Now these are low rolling hills, nothing really drastic yet. But it's enough in here to end the view without feeling like we're trapped on a mountainside. I'll make sure to erode in and brush out any corners in here. If you find you need to start to push things down as well, you can hold Shift and push that terrain in. I'll push down some of those mountains. Bring up others and put in some ridges in my low rolling hills.
The big thing with the terrain is to make sure we don't add in obvious cones or other very symmetric features. We can use different brushes in here to really be able to sculpt this around. I'll switch over to a different, more spattery brush. And brush in some other terrain features. Now, we can see in this, it starts to add in considerable detail and this is okay because my brush is fairly large. I'll make sure that opacity is nice and low and run this over. When we do this, this gives us the idea of nubbly hills and detail, rather than simply having these smooth, soft, sort of, melted ice cream looking hills.
I'll test this out by pressing Play and I'll see what it looks like when I go out on the balcony. I'll go forward, right through the door, up to the railing and I can see in here my, well, unnaturally blue lake, and there's a mountain range around. It looks like it still needs a bit of work, as they are kind of smooth looking. But I definitely get the idea of being on the water in this gallery. I'll go out and look at one other place here. Standing on a balcony, and looking past the building, the mountains really nicely block the view. And it's okay to see the sky above.
So my terrain brushing is working. I'll use my other brushes, and sharpen up some of the hills just a bit. Making sure that they're not all smooth and flowing. I'll play with the opacity and brush size. And, I'll show what it looks like when I'm done. I've brushed in more terrain features and I can start to look at some of the other tools here besides raise and lower. The paint height allows us to paint in additional height. One of the things we can see is that these hills tend to be very smooth. And switching over here to a paint height really lets us raise and lower parts of that terrain a little bit more.
I'll pull these up even more, rather than simply brushing in and raising and lowering, I'm adding in more and more height. And even ridging some of the mountains. It's okay if some of them plateau a little bit. And more of them start to, well, peak up. I'll pull up a few more. And, we can see that terrain uprezzing and downrezzing as I brush. Once I do this, I'll switch brushes again and paint in that height. In the settings, I've got brush size, opacity and a height. Flatten actually flattens out all the terrain. So, be careful of that.
But if you realize your terrain isn't quite working and you'd like to change it. You can flatten it. I'll bring up my height a little bit more, and really start to brush out some of those areas that got flattened. I'll use that height to brush in an area, making sure that I don't have a perfect ring around my terrain. It looks pretty good, and I can also smooth this out by choosing the smooth height. What this will let me do, is if I've got any areas that are perhaps accidentally a little bit too flat, smooth them. I'll switch back to a soft brush, and paint those out a little bit.
It's working, and I'm ready to get in and start adding detail and color in my terrain. I'll give it one more play test and see how this looks Much better. I've got some low hills around in two stages. We can really see where that fog on the second hill is giving them some good distance back there. The low hills around the lake really kind of bound it. And I definitely feel like I'm in a small valley. More important, as I smash through the doors again. The terrain is really ending the view. It's providing a nice way to look through and see, well, mountains and sky, and gets the serenity of the place across, as I smash through the window.
But doesn't show that this is the only part of the game that exists. We assume there's more world and so it's working very nicely. Now that we've got the terrain in, we can start to add some color, because those matte grey hills really need some live to them.
There are currently no FAQs about Unity 4.3 Essential Training.