Blender 3D: Noob to Pro/Landscape Modeling I: Basic Terrain

From Wikibooks, open books for an open world
Jump to: navigation, search

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.

Blender3DNoobToPro-Grass.jpg

NOTE: This page uses a different grass texture for licensing reasons (sorry).


Creating the Canvas[edit]

The grid that will be used to build our landscape.

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 don´t 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.

Molding the Mountains[edit]

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.

Blender3DNoobToPro-Molding the Mountains 01.jpg

  • 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.
The first mountain created using proportional editing.
  • 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.
A nice group of 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.

Blender3DNoobToPro-Molding the Mountains 04.jpg

Rougher hills look more realistic
  • 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 Catmull-Clark. 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.

Texturing the Terrain[edit]

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.

Blender3DNoobToPro-Texturing the Terrain 02.jpg

(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.

Blender3DNoobToPro-Texturing the Terrain 03.jpg

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

Reader Contributions[edit]

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:

Blender hills.jpg

  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
    5. 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!

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.

Reader Contributions 2[edit]

You can have an even better result if you use the texture to "bumpmap" the mountains.

  1. Press F5 until you are into Material Buttons
  2. Select the Map to tab
  3. Click on Nor once (the Col option must stay selected as well)
  4. Slide the Nor slider to 5 or more (might differ depending on texture size and repeat options)
  5. Render with F12

Reader Contributions 3[edit]

Alternately from making the hill model manually, you can use a program like L3DT. It uses various algorithms to generate very detailed and realistic terrain heightmaps. It also lets you edit them in a more intuitive way than Blender does. After you have L3DT make your height map, you can export it as a .x file, which you can import into Blender. Noob Note: That can be done by going into File->Import->DirectX(.x). And there you have a very realistic landscape mesh with a lot less work. (Noob Question: I want to use Unity3d game engine to create a game, but i want to use blender to create landscapes. To create massive world landscapes, does anybody have any tips? as Unity limits any mesh to 65000 vertices, which i've already passed with my method without doing half the map.)

-If you are using unity 3d just use it for the terrain. Download the terrain toolbox and just use .raw images. Or simply generate from there and save. 65,000 verts is plenty btw. If you insist on using blender for the terrain then model a high poly terrain fist consisting of around 1 mil+ verts. bake the normal map and ambient occlusion decimate your terrain to around 10k or w/e looks good for the game. Then bam you got 10k terrain that looks like 1mil. But to be honest blender terrain texturing is a pain compared to unity. Anyhow hope that helps.