UDN
Search public documentation:
EditingTerrainLayers
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
Editing the Terrain Layers
Document Summary: An introductory document on editing Terrain Layers. Document Changelog: Last updated by Michiel Hendriks, minor fixes. Previously updated by Jason Lentz (DemiurgeStudios?) to separate into smaller docs. Original author was Lode Vandevenne (UdnStaff).The TerrainInfo
While the Terrain Editing Tools make it extremely easy to make terrain, you should also know the theory behind it and how it works, and the best way to see how it works is to take a look inside the properties of the terrain. And to work with layers, explained in a later section, some things are only possible in the properties of the TerrainInfo. The most important actor for terrain is the TerrainInfo. The TerrainInfo IS the terrain, all the hills and valleys are drawn around it with the TerrainInfo in the center. The Terrain Editing Tools placed a TerrainInfo automatically at the position of your camera in the 3D view when you pressed "New...", but you can also place them yourself, the same way as you placed the ZoneInfo: it's in the Actor Class Browser under Info. A TerrainInfo looks like a small sprite texture with little mountains.


Layer Hierarchy
The Layers use a hierarchy to determine which textures will be drawn above the others. It's somewhat counter-intuitive though as the closer the layer is to the bottom of the contiguous stack, the more towards the top it is drawn on the Terrain. The Layer that is at the top of the stack (Layer [0]) will automatically be given a completely white AlphaMap so that as the base layer it is completely opaque. You can alter the order and appearance of the layers with the buttons on the side of the Terrain Editor when you are in the Layers tab. Here is what each of the following buttons do:-
Use this button to remove the selected layer
-
This button will make an exact copy of the selected layer
-
These buttons will move the selected layer up or down in the layer hierarchy. The more down a layer is in the list, the more on top it will be on the terrain.
-
The Grid Options button will allow you to show or hide a grid on any of the layers


Layers
The terrain you now created has only one layer: Layer[0] with the grass. You can give the terrain up to 32 different layers. Every layer has a Texture and an AlphaMap. The Texture is a tileable pattern for the layer, for example grass, and the AlphaMap is a large alpha channel that determines on what places of the terrain the texture will be present, not present or anything between this. The Texture can be any texture or material, the AlphaMap has to be a RGBA texture. You probably want Layer[0] to have a completely white AlphaMap, otherwise the terrain becomes transparent. Other layers need a white part in the AlphaMap only there where you want their texture to be. For example to create snow tops, use a new layer a snowy Texture, and use an AlphaMap that is black everywhere, except at the places where there are high peaks in your TerrainMap.Creating a New Layer
To make new layers, use the Terrain Editing Tools, go to the Layers tab, select the topmost empty layer in the list and use the

- Package - It's best to place the AlphaMaps in the MyLevel package. This is a package that is stored in the *.ut2 file of level itself and not in an *.utx file you have to save. To place a texture in the MyLevel package, type MyLevel as Package when importing a texture. The reason for this is, when you are going to edit the AlphaMaps later, you are actually changing the texture you used as AlphaMap. If you don't place it in the MyLevel package, you have to save the texture package every time you edited the terrain.
- Group - The Group you assign the HeightMap to is not as crucial and can be named pretty much anything.
- Name - Be sure to use a different AlphaMap for every layer, because if two layers use the same texture and you edit one of them, the other one will be edited too.
- AlphaHeight & AlphaWidth - It is very important to make sure that these values match the dimensions of the texture you are using. Otherwise, the texture may only appear as spots on a regular grid.
- AlphaFill - This determines the transparency of this texture over the layers above it in the Layers stack. The default setting of [0] should work fine (assuming you are using the 2110 build or newer).
- ColorFill - This setting is ignore. In earlier versions of the engine, this could create a color on the Terrain.
- UScale & VScale - These affect the scale of the texture map as it is applied to the Terrain. If you don't get it to look quite right the first time, don't worry. You will be able to easily edit later so that it is an acceptable scale.
Layer Properties

- AlphaMap - From here you can assign a different Terrain that this Layer will be assigned to. First you must select the new Terrain's AlphaMap from the Texture Browser and then you select the "Use" button in this field.
- KFriction - Information to be added later.
- KRestitution - Information to be added later.
- LayerRotation - This allows you to project this Layer onto the Terrain in directions other than just straight down. This is useful for painting Textures onto Terrain that is more vertical (like a cliff or a raised cylinder to create a tree out of Terrain) and it won't stretch like it normally would if projected from directly above.
- Texture - After selecting a Texture for the Texture Browser, you can click here and press the "Use" button to assign your chosen Texture to this layer.
- TextureMapAxis - Much like the LayerRotation field, these settings allow you to pick one Axis to project the layer onto. The LayerRotation field is more useful for applying textures at non-regular angles, while this field is useful for quickly setting the Layer to project from a particular Axis. For a more detailed explanation, see the TextureMapAxis section below.
- TextureRotation - this determines the rotation of the grass, dirt, snow or any other texture you used, expressed in degrees.
- UPan and VPan - the panning of the texture
- UScale and VScale - the size of the texture along the X and the Y-axis. These values will be 0 by default, but you better set them to 1 or another value for the best effect.
TextureMapAxis
For the texture of any layer, you can also determine the axis is used to align the texture. To do this, open the properties of the TerrainInfo, expand TerrainInfo --> Layers and there choose the layer you want. There you can choose your TextureMapAxis for this layer.






Editing the AlphaMaps
Until now you used the Terrain Editing Tools to edit the TerrainMap, so you changed the height of the terrain. You can also use them to edit the AlphaMaps for any layer, so you can manually paint dirt paths in the grass, snow, swamps, etc... To do this, select a layer in the Terrain/Layers part of the Terrain Editing Window. Don't select the first layer in the list, because you probably want to keep the 100% white alpha map for it.
Vertex Editing and Select
These tools will edit the HeightMap of the terrain, even if you have selected a layer in the list. So they do exactly the same as explained in the CreatingTerrain document.Painting
This tool allows you to literally paint on the alpha maps: if you hold CTRL and the left mouse button, and drag over the terrain, you will make the AlphaMap brighter on the spots you touch, so the texture of the selected layer will become more visible. For example you can paint a mud path by editing the layer with the SMud1 texture:





Smoothing
If you hold CTRL and click with any mouse button at the alpha map, everything in the radius of the brush will become smoother.



Noise
With this you can create random patches of the texture inside your brush:
Flatten
These tools will edit the HeightMap of the terrain, even if you have selected a layer in the list. So they do exactly the same as explained in the CreatingTerrain document.Visibility
Because this tool makes all the layers and the terrain itself invisible/non-solid at the same time, this tool does exactly the same if you use it on any of the layers or on the TerrainMap.Tex Pan, Tex Rotate and Tex Scale
These tools don't edit the alpha map, but the alignment of the tiled texture your selected layer uses. The Tex Pan Tool will pan it from left to right if you use CTRL + left mouse, and from up to down if you use CTRL + right mouse button.






Fake DisplacementMaps
The terrain is made to be used for outdoor terrains: mountains, deserts, canyons, etc..., but it can also be used to get the effect of DisplacementMaps on a floor. You can for example make a floor with 3-dimensional tiles. On the screens, the effect is a little bit exaggerated to make it clear.


