Home Tutorials Downloads Forums Links FAQ
Welcome, Guest. Please login or register.

Adding Terrain Basics

By: arramus
CTF Game Modes
Back To Menu
Low Gravity and Friction
We will now:
1. Prepare an area for terrain
2. Create a basic terrain (with a note about Tex Scale)
3. Use the terrain generator


4. Play the map
1. Open Unreal Editor and go to the textures. I have selected LowerKashyyyk_Textures > General > Texture Grass. Now subtract a cube with the following dimensions. Height: 1984 Width: 1984 Breadth: 1984. The cube will subtract with the grass texture applied as below.

Why did I select a cube with dimensions of 1984?
When adding terrain to a map (subtracted cube) we need to consider that there is a default scale. The default scale for a terrain is 64 in all axes. Therefore the terrain generation system will use the following equation to calculate the size of the terrain/height map (the terrain mesh we add that we apply elevation and contour to):

Width: (number) * 64 - 64 = terrain width size
Breadth: (number) * 64 - 64 = terrain breadth size

I want to keep my map very small and will use a height map of 32 (we'll look at this in more detail soon but it's basically for the size of the 'mesh' you add height to). Based on this formula I must subtract a cube with a width and breadth of 1984 to make the height map and the subtracted box exactly the same size.

32 * 64 - 64 = 1984

As long as the terrain is exactly the same size or bigger than your subtracted box then you'll be fine. If it's smaller then you'll be falling into the abyss. lol Now open the Actor Classes > Info > ZoneInfo and add to your map in the TOP view window somewhere near the centre.

Once added go to Properties > ZoneInfo > set bTerrainZone to True.
ZoneLight > AmbientBrightness > set to 150.

Now Build All and Save. We have made a map with a zone that  is ready for terrain rendering.

2. Let's create a basic terrain now and add it to our map. First open the terrain icon on the left toolbar. The icon has the appearance of two mountains with snow covered peaks.

In the terrain editing menu select New...

and the New Terrain window will pop-up. I change the Xsize and Ysize to 32 in order to fit snugly into my subtracted cube.

Now click OK and you will see the TerrainInfo0 added to Terrain Infos: at 32x32.

If it's set to 64 or 128 you should make a cube sized to match the equation or the new terrain will spill into space. Unreal Touament uses vehicles and recommends a map size of H: 4096 W: 8128 B: 8128. This accommodates X/Y size of 128. 128 * 64 - 64 = 8128.
As we'll be on foot in RC and I want you to clearly see the effects on the surface when you go in the map I scaled down accordingly. In a normal map I'll go with 64 or 128.

Let's do a Build All and Save. If we select wire frame view the result is this.

My height map did not sit neatly inside the cube and I had to manually align it by first clicking on the TerrainInfo Actor > holding shift > and dragging just as we do for boxes. I also used the Properties and movement tool for fine tuning as I was reaching the last stage of alignment. The result is a height map sitting flush inside a structured box. The X and Y coordinates are both 32 (that will save you time messing about). Everything is going to be built and added on top of this height map and the area undeeath will no longer be used unless you want to lower the height map instead of raising it or add underground sections to the map. It's also possible to move the height map up and down if you don't need so much playing height or if you want more. You can do this by moving the TerrainInfo Actor up and down and the height map will follow. We have a box for our map and a terrain height map that we can edit. We now need to apply a surface texture to the terrain height map so we can see it. Without a texture the height map remains invisible. In Dynamic Light Mode I can see the TerrainInfo Actor but not the terrain height map.

Let's add a texture to the height map. In the texture browser select the grass we applied to the subtracted box then in the terrain browser make sure TerrainInfo0 is selected and then click on the Layers tab.

Select the first undefined slot and you will see a small highlight appear around it.

Click the New... button. The grass texture is 256 so I won't change anything here. I will give this New Layer a name and call it floortexture. Click OK.

And here we are. A height map in a subtracted box with a texture applied to its surface. It's now ready for terrain editing using the terrain editing tools.

Please note. The texture applied to the height map surface is repeated over and over again and gives the map a 'tiled' appearance. This does not look natural and feels artificial. To give the terrain a more realistic look it's important to tweak the texture settings. There are a number of ways to do this but here's one good for this beginner's tutorial. Go to the Layers  menu and highlight your grass texture. Select Tex Scale.

In the 3D window hold the Tex Scale icon over the height map, hold Control (Ctrl) and click and hold the left mouse button and move the mouse left and right to stretch or shrink the texture over the X axis. Hold Control (Ctrl) and click and hold the right mouse button and move up and down to stretch or shrink the texture over the Y axis. Here's a picture of a map I'm working on that demonstrates the effect of this. The tiled version is on the right and the stretched version on the left. It's clear that good using the Tex Scaling tool while in Layers can make your terrain look much better. Back to the tutorial.

I change the texture on the side walls to improve contrast. Notice the editing tool for Vertex Editing on the height map ready and waiting.

In tools I stay in vertex editing and set the strength to 20%. This sets how strongly you want actions to perform. If it's to high you'll be pulling the height map through the roof of the map :) You'll have to find a level that suits you. I then click on the height map and the grey balls appear. Select an area you want to edit and hold the Control button down and then hold down BOTH left and right mouse button and move the mouse up and down. The height map for this selected area will rise and fall. :)

3. I won't write a tutorial for every tool as it's something you can easily lea through trial and error. I'm also hoping the community will create their own terrain tutorials as well because this is a big topic and there's a lot to master. If you find you're having real difficulty with the tools then why not let the terrain editor generate a terrain for you. Click on the Select tool under Tools and then the Misc tab at the top of the window. Check the Use Entire Height Map? box. Steps sets the number of 'bumpy' areas and strength sets how strongly the action performs. I'll use 4 steps and a strength of 8. Then hit Build. If you don't like what you see then just hit Build again.

Fun, fun, fun. Add a player start. Build All and Save. I'll be adding a false back to the sides and ceiling for a skybox. I'll also be raising the edges so you can't get to the edge and look at the bottom of the sky box. lol.

This is a more complicated tutorial so if you have problems post for help onforums.

4. Play the map.

CTF Game Modes
Back To Menu
Low Gravity and Friction
This page has been viewed times this month, and times overall.
sandcrawler.net is not endorsed by Lucasfilm, LTD. Please read our disclaimer.
Original Content © 2006-2011 Sandcrawler.net