You are on page 1of 25

Mountains

I was playing around in Blender several months ago and messing with cloud textures when I found a great way to make landscapes entirely within Blender (without height maps from The Gimp or some other application) and decided to make a tutorial (yes, it does use the noise tool). [edit]Making

the Mesh

To start, open up Blender and with the cube selected, press the XKEY and click Erase Selected Objects. Add a grid (SPACE--> Add--> Mesh--> Grid), using whatever numbers you like, remembering that bigger numbers means more vertices. For this tutorial, I'll use 60 for x and y resolution. Scale the grid up, but only a little bit (I went up to 1.3) as the texture won't make very tall landscape with a very big grid. Press the F5 key to go to the Materials tab, then add a new material.

[edit]Displace

and Shade

Now press the F6 key to go the Textures panel, and add a cloud texture in the very first slot (slot 0).

After Pressing F6, look at the windows on the bottom. To the left is the "preview" window and next to that (to the right) is a Texture window with an Add button... click that and then go to the little pull down menu that shows up just below and to the right. From there, find and select "Clouds"... and now, continue!

You may be wondering how we are going to make landscape with a cloud texture, when you could just use the Gimp height map plugin, Terragen, or the A.N.T. modeling script right in Blender. Well, we are going to make the landscape with a height map. The color determines the height: white = very tall; grey = halfway tall; black = no height. This makes the cloud texture a very good candidate for land. The next thing we are going to do is adjust the size. You can set the noise size to whatever you want, but I want to have several bigger pieces of landscape, instead of a bunch of little ones so I'm setting noise size to 1.00 and noise depth to 6, as I want a high level of detail. (The Preview immediately shows you the effect of your "tweaks" as you make them.) Noob Note: You can hold shift and click the number next to noise size then just type 1 and press enter instead of using the arrows. The same applies for NoiseDepth, almost every other setting in blender changes like this as well. At the top, we can select Hard noise or Soft noise. Each gives a different landscape, so experiment with them. Next, go to the Colors tab (it's right next to the texture button by default). Adjust the brightness and contrast as required. For "Hard noise," try a brightness of 1.9 and a contrast of 3.45. For "Soft noise," a brightness around 1.0 to 1.2 should be fine. Noob Note: The above noob note applies to the brightness setting as well!

Jump back to material buttons with F5 and go into the "Map To" panel. Turn off col and press nor once. Noob Note: I had a difficult time finding the "Map To" so if you are too... This is one of the several small Windows that opens at the bottom of your screen after pressing F5 and for me, it was on the far, far right, off my screen. I had to use my mouse wheel to scroll the Windows to the side to

bring it into view and found it as a Tab on a Window with two other tabs. "Col" and "Nor" are buttons in the Map To Tab. What the buttons are for: The "Map To" settings determine which various attributes of the

material will be affected by our "cloudy texture." "Col" refers to "color." We turn it off here, because we don't want our surface

to look "cloudy." "Nor" refers to "surface normals." This is the angle at which light seems to reflect

from the surface. (The so-called "bump map.") Experiment with the other "Map To" buttons, as well! For instance, "Disp" (for

"displacement) actually causes a map to deform the geometry of a surface... but doing so only during rendering. In this tutorial, as you will see, we are going to combine several techniques to produce a very rocky surface. Here, we are changing the way that the surface reflects light. Then, we'll actually deform the surface geometry.

Turn the nor value all the way up, to 25 (that will give it a nice rocky look). Go into the Shaders tab and then change the "Diffuse Shader" (the top left selector, defaulting to "Lambert") to "Oren-Nayer," and the "Specular Shader" (the 2nd selector, defaulting to "CookTorr") to "Blinn." Adjust the Rough value in Oren-Nayer to 1.5 (rock is really rough). Also, set the Spec value to 0.01 and Hard to 25. Now we are ready to make some mountains! Trivia note: In computer graphics, a "shader" is a mathematical function, and they're

customarily named after the clever people who invented them. These functions determine exactly how the cloudy-texture will "map to" the attributes (e.g. "Nor"...) that we selected.

[edit]Making

Mountains

Press TAB to go into edit mode and press the AKEY twice, in case you had any specific vertices selected. Go into the front view and press the "Noise" button(located under mesh tools in F9). You should see the vertices jump up a good bit.

If not, you may have scaled your grid up too much, so make it somewhat smaller. Depending on how high you want your mountains, press the Noise button to your required amount, though I pressed it 8 more times. The mesh doesn't look very good right now, as it is not only blocky, but it is missing that last bit of random detail. Important note! The mesh-editing button named "Noise" causes a permanent change to

the geometry of the object in the "Z"-axis, as provided by the texture. (The vertices actually moved, and their new position is permanent.) There is also a procedural texture named "Noise," but that is just pure

coincidence. The two are unrelated, both in what they do and in how they work.

Important note! Those using Blender 2.5 Beta in order to get the height map to affect

the geometry you will need to use the displacemodifier instead. If you are not in edit mode, go into it and select all the vertices. Press Fractal (in the same row as Noise under mesh tools) and enter a value of 15 in the random factor. Hopefully, your system can manage all these vertices: if not, then don't do any fractal subdivide. If you want to, you can use a smaller value in the fractal box and do it several more times for more displacement. Be careful, though: too much randomness will cause vertices to separate, causing tears in the mesh that you will have to fix by hand. Finally, tab out of edit mode and press Set Smooth. Then, if you want to make the mesh even more smoother, add a Subsurf modifier, with what ever level you want. (I'm going with 1 for faster render times.)

If you desire, you can scale up the mesh however big you want though for close-ups, you may want another level of subsurf or another subdivide. Then, apply colors, set up the lights, and render! A word to the wise, however: this process creates a huge file (about 986kb). [edit]Discussion You have just made mountains all in Blender, without having to generate height maps in The Gimp, or any other program. The next step is to go beyond the tutorial. Try using different noise sizes and noise basis, and even try using other textures like musgrave and marble. Or try using two textures and see the conclusion. The possibilities are almost infinite! Have fun. Observe how the technique illustrated this tutorial is "the same, yet different" from the one demonstrated in the tutorial for "height maps": A procedural texture was used to supply changes to the Normal Mapping of the object at

render time. (This is the angle at which the object reflects light.) (The "height mapping" tutorial did not do this.) Then, the mesh-editing button (also...) named "Noise" was used to deform the actual

geometry of the mesh. (This is the same technique used in the "Height Map" tutorial, although a different kind of texture .. an image .. was used.) The texture, once used for the height-mapping (deformations) was left in place, still

mapped to the surface "Nor"mals. The result will be avery mountainous landscape. Yep! The techniques shown in all of these terrain-modeling tutorials can be combined! And, they frequently are. Very often the most satisfactory results are obtained by combining several different techniques. You could have used an image-map (from the "Height Mapping" tutorial) to deform the geometry, then used the "noisy Normal-mapping" idea from the first part of this tutorial, and even used smoothing. All at the same time. The choice is yours. When using "Map To," remember that a single material can have several different textures applied to it, each one mapped to the same or to different attributes. This mapping can even be animated. Experiment! The sky's the limit!

I worked with a group to make a small animation for class and I was responsible for the environment modeling. I really liked the

results of the process I used, so I decided to share it with others. By the end of this tutorial you'll have the know-how to create your own flexible, realistic terrain utilizing multiple textures for different ground types. This tutorial assumes that you have the very basic understanding of using Blender (how to add/remove a mesh, how to change views, etc...) I use the following textures in this demo. Feel free to use them if you don't have something on hand to use.

NOTE: This is not the actual texture I used in this demo. I couldn't find the original source for the one I used (though I know it was a public image), so to avoid licensing issues I replaced it with one that I did have licensing info on. Sorry.
Contents
[hide]

1 Creating the Canvas 2 Molding the Mountains 3 Texturing the Terrain 4 Reader Contributions 5 Reader Contributions 2 6 Reader Contributions 3

[edit]Creating

the Canvas

The "canvas" that we'll use for our terrain is an evenly spaced grid of vertices. Open a new project, delete the default cube, and add a grid mesh. Use whatever size you want. The more vertices you have, the more detailed and realistic your landscape will appear, but don't get crazy with it since we'll apply subsurfacing at the end to smooth it out. At the same time, you do want enough vertices to prevent sharp edges, and we'll need them in the second tutorial when we cover texture stenciling. So consider how big you want your landscape and try to find a reasonable balance. I like to start with 100x100. The grid will be pretty small, so scale the entire thing up, let's say by a factor of 20. This grid will be used to build our landscape by pulling hills and mountains out of it. Noob Note: If you dont want to have to delete the default cube every time you open a new file, just delete the cube once so you have the blank window (only lamp and camera left) . Then select File - Save default settings or hit Ctrl+U. From now on, each new project you create will start off without the cube.
[edit]Molding

the Mountains

The key to making good mountains is using the proportional edit mode (OKEY) and constantly adjusting the radius of influence. If you've already gone through the Mountains Out Of Molehills tutorial then this section will be familiar. One major difference is that in this tutorial I recommend rotating the 3D view around so you have a good view of all three axes instead of working in the front or sides view. Using the proportional editing tool affects multiple vertices, and it helps to see what effect your changes are having as you make them. Go ahead and turn on proportional editing, either by pressing OKEY or clicking on the grey ring on the 3D View header. You have to be in Edit Mode to select this option. Once proportional editing is enabled, the ring will appear orange and a new drop-down menu will appear next to it with different falloff styles. Select Smooth if it is not already selected.

Select any random vertex and grab it (GKEY). You will see a ring around the vertex you are grabbing. This is the radius of influence, and only vertices inside this ring are affected by the transformation. If you are doing this in the orthographic view from the front, side, or top, then this will be obvious. But if you're at a view where you can see all three axes, then it may be less obvious.

Restrict movement to the z-axis (ZKEY) and translate the vertex upward. Throughout this entire process you ONLY want to translate along the z-axis. If you start moving vertices in the x or y directions, things become distorted and you get some nasty creases. Play around with adjusting the size of the radius of influence (Mouse Wheel) to get steeper or flatter hills.

Keep repeating this process with different size radii and different heights until you have a decent mountain range, but leave an area flat. We'll be using that spot later in the second tutorial. Don't be afraid to occasionally translate some vertices

down instead of up to create depressions in the hills. Remember, variety is the spice of life. Very few things in nature are naturally geometric, so mix up your hills and especially make sure they overlap. How often do you see a nice, smooth hill all by itself in nature? Note: You'll notice in my screenshot that I have reduced the size of my grid. For simplicity's sake, I didn't feel like filling an entire 100x100 grid with mountains since this can take some time. Well now, that's looking pretty good! Now, there's one problem with our hills so far. They're too smooth! Let's bumpify them a little. Change the falloff type from Smooth to Random.

Select a single vertex and grab it (GKEY). We're still working on the z-axis only, to restrict your movement with the ZKEY. Now when you move the vertex up and down, all vertices in the radius of influence will also move but with a random falloff instead of smoothly. It only takes a little movement to get the effect we want, so something around 0.5-1.0 is enough. Mix up moving up and down with different vertices, again to add variety to the scene. Once you have your landscape the way you like it, add a subsurf modifier under the Editing tab (F9) and select CatmullClark. This will smooth out your terrain a little so that it's not too rough. Given the number of vertices you already have, it's not necessary to have a higher render value than 1 unless you just

REALLY want it to be smooth, but I don't recommend it. Land is supposed to be bumpy and rocky, we just don't want sharp edges. Noob note: If you're making mountains using Random Falloff and the peaks stick up too much: in Edit mode, select the points in the area around the peak using circle select, then press WKEY and click 'Smooth' until you're satisfied (or, in the Editing tab (F9), click the 'Smooth' button). Useful Tip Proportional editing can be used on multiple vertices simultaneously. This is especially useful if you're trying to create a cliff face or a river bed. Use the box tool (BKEY) to select a group of vertices and then translate them. Keep in mind that the size of the radius of influence determines how many vertices around EACH VERTEX will be influenced. So suppose you have a 5 vertex radius, that means that 5 vertices all the way around your selected region will be influenced.
[edit]Texturing

the Terrain

Alright! We've got some pretty nice hills now! But there's still a few problems. Hills shouldn't be white, and hills shouldn't be SHINY! Let's dress them up a little, shall we? With your landscape selected, go to the Shading Panel (F5) and add a new material. Under the Shaders tab, drop the Specular value to 0. Go to the Texture tab (F6) and add a new texture. In the Texture Type drop down menu, select Image. Two new tabs will appear. In the Image tab, click Load and load a texture from file. In the Map Image tab, increase the Xrepeat and Yrepeat. Depending on the size of your terrain and the image that you use (please use something that tiles!), these values will vary. I've used 10 for each in this tutorial.

(Noob note: Render the scene (F12) to see the applied texture) (Noob note: A quicker way to do this is by using the render preview tool, 3d view window - render preview, View--> Render Preview or press SHIFT--> PKEY) (Noob note: you may also select shaded in the Viewport Shading menu next to where you select object mode or edit mode to see your texture on your mountains without rendering, however it does slow your computer down some which could make editing frustrating. So only do this if you want to see what your textures look like, then switch back to solid for more editing.) Finally, let's do something about the lighting. Go to Object Mode (TAB) if you're not already there and select the lamp. Choose the Shading Panel (F5) and then click the icon that looks like a light bulb to display the Lamp buttons. Change the lamp to a sun and up the energy to 1.5. You may also need to increase the distance if your terrain is large, or rotate it around if you don't like where it's pointing. The dashed line coming out of the light is the direction. Play around with different angles and energy values for the sun to get different times of day in your scene.

And there you have it! Your landscape is now textured with some nice grass to make it look a little more realistic. Play around with hill sizes and roughness if you're not satisfied with your landscape, but try not to be too picky. Nature shouldn't look too sculpted.

Remember, you won't notice a change in texture unless you render your image. NOTE If you went with the suggested 100x100 grid, the rendering process could definitely take some time depending on your system, especially if you have ray tracing and shadows enabled. To boost the rendering speed, go to the Scene panel (F10) and under Rendering, disable the buttons that say Shadow and Ray. Also note that because we've created some hills, your camera may now be under the terrain. Switch to the camera view (NUM0) to see what your camera sees and move it if you need to.

Join us next time as we explore how to make the landscape look even better using texture stenciling! And please, if you have any issues with the tutorial, or feedback (positive or negative), drop it in the discussions. I'll try to keep an eye on it to see what people have to say. - Moohasha
[edit]Reader

Contributions

I'm mainly doing this so the hills look better and more realistic. Reading this will consume more time than doing it. I'm making everything clear for beginners. It will only take about 8 minutes more for your hills to end up like this:

1. First step to achieve it is to switch from the default lamp to Sun. 1. You do this by clicking on the default and go to the shading tab (F5) 2. Click on Sun. 3. Go to rotate manipulator mode with Ctrl Alt R. 4. Rotate the sun until the dotted line is in your desired position. That is where the main energy will go. It will differ if you want to achieve the different time of

day. You can make the distance greater or less with dist.. I kept mine at default 30. 2. Now let's make more realistic, paler sunlight. 1. In the RGB slider, set R for 1, G for 1, and B for . 848. 2. Set energy for 1.63. This will all differ for different times of day, so set your east and west in your head, and the later into the day, the further the sun to the west and the more orange. For midday, keep the energy on 1.63 and put the sun right above your hills. I set mine for earlier in the morning. 3. Now click on the picture of a globe to change the background. 4. Click on the blend button for a more realistic looking sky. On the left of the World toolbar, that will be the color of lower down in the sky and the right sliders will be the color of the top of the sky. Naturally, the top should be darker blue than the bottom. 1. It will differ for different times of the day. So you might want something different from this. But I set up mine for the morning using the settings below: The left HoRGB sliders to 0.50, 0.68, and 1. The right ZeRGB sliders to 0.11, 0.25, and 0.66. 5. Now for the texture. This won't differ for the times of day, but it will differ for what type of landscape you want. 1. I got the texture from here. The best textures to use would be either Desert Canyon, Hill Country, Rough Terrain, Class M Planet, or Red Planet. Use Red Planet for a Rocky, Mars-like look. (Note: these textures are no longer available on this URL as of Nov 2010) 2. I chose Hill Country. Click on it, and I know it looks like snot, click on it again, and save the image. 3. Go back to Blender, go to Texture buttons (F6) 4. Click add new

Select image for the texture type 6. Go to the image toolbar, and upload the texture. Blender will only allow you to upload from the Blender documents, unless if you click on the up and down arrows on the top left of the screen and choose the place where you saved the texture (or picture). 7. After uploading, the X and Y repeats should be smallish, like 6x6, so the changes aren't noticeable. It will look ugly in the preview, but it will look nice after its wrapped. 6. Render, and 1 minute later, voila! Those are nice looking hills! 7. Now boast in front of your friends!
5.

Noob Note: You need to have your landscape selected if you are in object mode to change the texture, otherwise it will change the texture of the world.
[edit]Reader

Contributions 2

You can have a even better result if you use the texture to "bumpmap" the mountains.
1. 2. 3.

Press F5 until you are into Material Buttons Select the Map to tab Click on Nor once (the Col option must stay selected as

well) Slide the Nor slider to 5 or more (might differ depending on texture size and repeat options) 5. Render with F12
4.
[edit]

Creating the Stencil


The landscape from the previous example looks pretty good, but the entire thing has the same texture, so it doesn't look very natural. Let's add some rocks to those hills. If we just add a second texture to our material, it will completely cover the previous one. What we want is to have the first

texture only show in certain places and the second texture cover the rest. In order to do this we'll have to create a stencil, which is like a mask that determines where textures appear on the material. The stencil is a black and white image, similar to a heightmap, except the intensity of each pixel determines how much of the next texture will appear (black = 0%, white = 100%). I highly recommend viewingthis tutorial for a more in depth description of how stencils work. If you think you have the gist, then continue on here. We're going to create our own stencil to determine where we want rock in the landscape by "painting" on the object. *IMPORTANT* The next few steps will be performing temporary modifications to your scene, so be sure to save your file before you continue so that the changes will not be saved!! Also, if you have a subsurf modifier on the landscape, remove that at this time as it drastically slows down the following process. Select the landscape object and switch from "edit mode" or "object mode" to

"Vertex Paint mode". This is found in the Mode drop down menu, on the 3D View header. This mode lets you paint the object, and thereby change the color value of each vertex. When in Vertex Paint mode, you'll notice your object change color to a pixelated version of the texture that is applied to it. This is because with that texture applied, each vertex will be drawn with the colors you see. Noob Note: Vertex Paint mode is in the drop down menu that contains Object mode and Edit mode. Just select the object while in Object mode, click the drop down menu, and select Vertex Paint mode from the list. Switch to the Editing menu (F9) and you'll see a new tab called Paint. Notice the sliders

labeled Opacity and Size. Opacity determines how much to blend the selected color with the existing colors when you paint. So 0.2 means that when you click, you'll get 20% of the selected color mixed with whatever is currently there. Over on the right are different options to combine to colors. We want to mix, so as we paint the colors will mix together and give us a nice smooth blend. Size is the size of your cursor while painting, and thus how many vertices are affected. Keep in mind that does not change as you zoom in and out, so a size of 10 can actually paint more pixels if you're zoomed way out than a size of 30 if you're zoomed way in.

Change the color to black and click the button that says Set VertCol (in 2.48 version, that

button is below the color square and named 'SetVCol'). This will change the color of your entire object to black. You'll notice that the object is not lit in Vertex Paint mode, so when the entire object is black it can be difficult to see where your hills are. You'll have to move the camera around to see the shapes. [Another newbie recommends: if you switch to the "object" buttons (f7) and turn on "Wire" under "Draw Extra" in the "Draw" panel/tab you should see a wireframe on top of the vertex colors you are painting, which makes it much easier to see where the hills are. Remember to switch this back off when you have finished painting.] Now we're going to paint the places where we want rock to show through. Change the

paint color to white. It's less likely that grass will grow on steep slopes, so start painting the tops and edges of the steeper hills white by holding down LMB and dragging your mouse (think MSPaint). If you didn't heed my earlier advice and still have a subsurf modifier in effect, the painting will be very choppy, so remove that now. As you're painting, try to make some spots pure white by going over them again and

again, but don't make any one area of white too large as this will make a huge area be all rock, and we're trying to blend two textures. This process can just be trial and error getting the landscape painted the way you want.

Once we apply our stencil later you may decide there's too much rock in one area, or not enough in another and go back and change it. A few things to keep in mind: 20% opacity means that most of the original texture (grass, in our case) will show

through, so the rock won't be very noticeable if at all. You'll have to go over the same spots a few times to increase the intensity.

100%.

You don't want a dramatic change from grass to rock, so be sure to blend white

areas with black. That's why we're using the 20% opacity instead of just bumping it up to

Make your patches random and spotty. This will end up creating a more realistic

effect once we combine the textures.

Once you're done you should have something that looks like this. Notice the mixture of

white and black in some places, how it doesn't just go from pure white to pure black as you move down the hills. This will make a more natural blend and it will cause random rocky areas mixed in when the grass. Now we need to turn this into our stencil. Go to the overhead view (NUM7) and make the projection orthographic if it's not already

(NUM5). Zoom in/out (Mouse Wheel or NUM+/NUM-) until the plane almost occupies the entire

window. Move the 3D cursor and any lamps or cameras away so that they're not over the

landscape and take a screenshot.

Open your favorite image editor (I'm a traditionalist, so I still like MSPaint), and cut out the

image of landscape. This is now your stencil. Save it under your favorite format.

Re-open the saved version of your landscape to undo the changes we made to create

the stencil.

So why did we make our stencil this way? This allowed us to actually paint on our terrain so that we ensure we get the rock exactly where we want it. Using this method, you can customize your stencil to any object, as long as it has enough vertices. For example, if we just had a flat plane made of 4 vertices, this technique would not have worked because we could only paint the corners. That's why in the previous tutorial I recommended using a high (but not too high) number of vertices in your grid. [edit]Applying

the Stencil

So now we need to apply the stencil to the landscape to mix our grass and rock textures together. Return to either Object Mode or Edit Mode (TAB), it doesn't matter which. Go to the Texture menu (F6) and add two new textures in the material (you should

already have the grass texture). Make texture 2 (the first new one you added) an image and load your stencil from file. Do

not repeat this in the x or y directions. We want it to map to the entire object. Make texture 3 an image and load your rock texture from file. This one you do want to

repeat, just as you did the grass. Now return to the Materials menu and select your stencil texture. It's a good idea to name

your textures, materials, objectives, etc... so that they're easily identifiable. With your stencil texture selected, switch to the tab labeled MapTo. Deselect Col (which

maps the texture to the color), and select Stencil and No RGB. Stencil will treat this image as a stencil, and No RGB treats it as a black and white image. If you didn't select this second option your stencil wouldn't work.

In the preview tab you should notice your material change so that the grass and rock are

now mixed. If you render, you'll see a much more realistic landscape than the one from the previous tutorial! Noob Info: Be sure that for the rock - texture col is selectet because we want to color the landscape with the rock-texture! Otherwise it doesnt work. Select Rock-Texture -> Map To -> col

[edit]Adding

Snow

Since you already have some nice mountains, why not add some snow to them? Adding snow is easy. All you have to do is add a fourth texture AFTER all the others. Make this texture the same as your stencil.

Make sure you're in Shading (F5) > Texture Buttons (F6) > Textures. Click on an empty panel beside Texture Type Click on the little box to the left of Add New Choose your stencil from the menu (hint: it helps if you name your textures) Render and see the results.

If you made your stencil properly, you should have some nice, snowcapped peaks. It's not much, but it's enough for a quick fix. If it isn't even, you probably didn't make your stencil properly (meaning pretty much all white on the peaks, and not much anywhere else). Of course, there are better ways to do this, ways I wouldn't know about; I discovered Blender merely three days before the time of writing. I leave it up to you to see the effect: I only have so much room and bandwidth for pictures! This effect works by saturating the underlying color with white, depending on the amount of white in your stencil. A light gray will saturate it only a bit, whereas a bright, 100% white will cover it very clearly and efficiently. If you look closely, you'll see that the light gray on the stencil DOES make a difference, but it's not immediately visible and requires lots of fidgeting with the Render Preview and texture options. You might also try fiddling with the Stencil and NoRGB option, although it worked fine for me with both turned off (I use Blender 2.48a) Some challenges: Try to change the color of the snow. Hint: RGB I've yet to do this, but try making snow out of a heightmap.

[edit]Multiple

Stencils

Remember in the first tutorial when I said to leave part of the landscape flat, because I'd be using it later? Well it's time to use it. I want to eventually use the landscape as the backdrop for a military base, so let's texture the ground around where the base will go to give it a dirt ground and road leading to it. *IMPORTANT* Just as before, the next few steps will be performing temporary modifications to your scene, so be sure to save your file before you continue so that the changes will not be saved!! Switch to the Vertex Paint mode in the mode menu on the 3D View header. Go to an overhead view (NUM7) and make the projection orthographic (NUM5) Once again, paint the entire object black by selecting the color black in the Paint tab and

clicking on Set VertCol.

For the next few steps, you may need to TAB back and forth from Vertex Paint mode to

Object mode to make sure you're painting in the correct area. Make the opacity of the painter 1.0 and the size 10 so that we can work very precisely.

Paint an area over the flat terrain in the shape of a generic military base, like you see

here. Reduce the opacity back down to 0.2 and increase the size to 20. Paint the road leading away from the base. We've reduced the opacity and increased the

size so that the road will blend more with the landscape around it instead of being more defined like our base. Once you have your stencil looking the way you want, take a screen shot and save it.

Then revert back to your previous environment (before you started painting on it). Go to the Texture menu (F6) and add two new textures. Load your stencil into the forth texture (the first new one), and the dirt image into the fifth

texture. Once again, remember to set the x and y repeat for the dirt texture. In the Materials menu (F5) select your new stencil and go to the MapTo tab. Deselect Col

again, and select Stencil and No RGB. Notice the new preview. Wait a second, where's the dirt path?!? Here's the problem and the reason I've included

this section: stencils are cumulative. That is, the first stencil defines which portions of ALL successive textures will be drawn, including other stencils! In order for our new dirt path to show up, we need to make sure it's part of the first stencil.

Open your first stencil (the one you used to add rocks to the hills) in your image editor

and combine the new stencil with it. The result should appear somewhat like this. Be sure that when you combine your dirt stencil with your rock stencil that the dirt stencil remains the same size and in the same place. That is, you want the two to be perfectly aligned. Reload your first stencil on your material, the one we used for the rocks. Now the preview

should look the way we want it to, and if you render you will see your new dirt area on the flat part of the landscape. You can add even more stencils the same way. Here is how all of the textures blend together:

NOTE I had to replace the grass texture in the above image since I could not find the licensing information for it. I apologize for the inconsistencies in the diagram that result from this. Well there you have it! This is a pretty useful method of texturing complex objects. Check out our new landscape and how it compares to the previous, boring, single-textured landscape!

Once again, if you have any issues with the tutorial, or feedback (positive or negative), drop it in the discu

You might also like