Painting the terrain textures
Video: Painting the terrain texturesWhen we're painting terrain, we have the option of adding color, really at any point. We can rough out the terrain and then put in some color to see how it looks, starting out in gray, so we can really see how the model contours look. Or, we can start out with color and brush the terrain into it. It's up to you which way you'd like to proceed. I've chosen the first route here. Brushing in at least the general hills around the valley, and now I'll add in some basic dirt, and then brush on some cliff color. I'll start out my terrain by selecting, and I'll go over to the Brush tool.
- 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
Painting the terrain textures
When we're painting terrain, we have the option of adding color, really at any point. We can rough out the terrain and then put in some color to see how it looks, starting out in gray, so we can really see how the model contours look. Or, we can start out with color and brush the terrain into it. It's up to you which way you'd like to proceed. I've chosen the first route here. Brushing in at least the general hills around the valley, and now I'll add in some basic dirt, and then brush on some cliff color. I'll start out my terrain by selecting, and I'll go over to the Brush tool.
As we can see, I have no terrain textures defined here in the Inspector. So I need to bring in some terrain textures. What I've done is to put in the Assets folder in the textures. A couple of cliffs, and some dirt. These are textures I created in Photoshop, using a combination of Custom brushes, lighting effects, some clouds here and there and a few other tricks up my sleeve. You can make your own fairly easily, and I highly encourage that. Unity does come with a couple of cliff textures and dirt. But remember that everybody has them.
So, craft your own work, and that way you can use it in your game, and really fine tune the look of your terrain to your world. There is two cliffs, cliff 1 and cliff 2. And they are slightly different color, one is a little darker, one is a little yellow and a little brighter. The dirt then is a rich red dirt, with just some slight variation. It will service my base color until I can get the cliffs on. With my terrain selected then, I'll click on the Edit Textures Button, and add Texture. In the add terrain, test, or dialog I can choose both a color and a normal for this terrain texture.
I'll click the Select button in the Texter, and in the Assets folder I'll browse down to pick Dirt. I don't have a normal map for the moment, but its easy enough to come back and add one in. What I will do is make this dirt texture bigger. Its uniform enough I don't mind it being pretty big on the world, and then I'll add detail at a smaller size. I'll put in the size at 50 by 50. And click the Add button. When that goes on, I get terrain in, well, dirt color, and I'm ready to get some cliffs in. I'll zoom in on one of the more vertical faces here.
This looks like a good place to start to get some rock. Right here, where my brush is highlighting, is nubbly enough, it really would support a rock texture well. I'll add in another one of my rock textures. I'll click Edit Textures button > Add Texture click Select, and pick Cliff1C. I'll make the size on this 30 by 30 and see how it looks. I'll click Add, and add in one more. They select when they're in blue, and so Edit Textures > Add Texture, and pick the other cliff.
Here's cliff two, and i'll put it in at the same size, 30 by 30, and I'll click Add. And now I've two different cliffs available and some dirt. What I'll do then is, keep my brush size fairly big, I'll try it around 80, keep the opacity up, maybe towards 50%, and raise up that target strength. These may be set to whatever default they were on or whatever you used last, so don't be afraid to push them around. Now I'll start brushing in those cliffs, spinning around so I can see.
I've got the cliffs selected here in blue. And as I brush, I get that texture. We can see in here, that the cliff is tiling. That, I’m getting a lot of repetition in it, and I probably need to raise up the size of that rock as well. I’ll undo those brush strokes. And in here, I'll lower the brush size and then, edit this texture. I’ll click Edit Textures and Edit Texture. And I'm going to make the size of this rock 50 by 50, and I'll see how it looks. Now I'll lower that opacity a bit, and that way, it blends over the dirt.
I'll brush in a little bit of cliff and it's working pretty nicely. At some point if I edit that texture and get rid of that dark rock that's tiling, it should look pretty good. But it's a good way to get in and really add some life in here by brushing that across. I'll put some rock in other places, letting some of my hills be rolling, and some of them be rock. Here's another good place for some clips, and I'll brush some rock into it. It's working nicely, although I could probably stand to have this be a little more vertical. We can always come back and start to sculpt things and flatten them if we need.
I'll pick my raise lower terrain brush. Switch over to a harder brush And see how it looks if I raise this up a bit, making those a little more vertical here. This should look a little better, and the paint flows right a long with it. Now I'll come back to my brush, pick the other cliff, pull back the opacity and very that color across. This way we can get the idea of veining and color in the rock. So far it seems to be working. I'll hit Play and see if I can tell. It works decently, although the fog is a little thick, and I don't have enough light.
But definitely the dark cliffs, and dark rock, and dark dirt, are making a difference. We can also tell that that fog is really too big. That it's really getting in there and just whiting out those hills. So I'll change it and test one more time. I'll go under Edit and Render Settings. And there's the linear fog in, in that fog color. What I'll do, is take this linear fog end out to oh, let's try 600 and see how it looks. I'll hit Play one more time, and run outside. This is a little better, but I still just have too much fog off in the distance.
I'll pause and bring this out to 1,500 on the linear fog end. There's also a fog density, and we can really take this down if we need. In that fog mode, we can say it's linear exponential. Or EXP two where it get's exponentially squared, gets very, very big very quick. I'll try it as linear and play one more time. Much better. I've got rolling brown hills ready for some trees and obviously some daylight. I can just see some variation back there in the fog where I painted in those cliffs, and the idea of that rock is really reading nicely.
I've good variation and density going in that fog. And when it's pulled back to be, perhaps not quite so thick, I get the idea of being surrounded by gentle rolling hills on this lake. I'll brush in some more rock on these cliffs. And very that color up. When you're brushing terrain, really try to make it vary. We don't need to see one texture over everything, unless we're dealing in of course a desert, where it's all one color sand, we could say. But outside of that, really add some color variation as a base, before your forest or your trees.
It'll really read nicely if you've got some rock and dirt color going on. And feel like things are organic, and natural, and random as they should be.
There are currently no FAQs about Unity 4.3 Essential Training.