 |



|
|
Terrain part Three
In this final part of the tutorial we will discuss texturing our terrain and adding deco layers. Let's go!
Terrain Texturing
By now you should have your terrain built and ready to be textured. Let's take a look at our totally awesome layout.
Right now it looks incredibly boring, besides the obvious fact that it's just one hill. Since this is supposed to be a snowy mountain, let's add a rock texture to our terrain. Click on the Terrain Editor and open the Layers tab.
To add a new layer, open the texture browser and find a good rock texture. The one I will be using is AlleriaTerrain >> Rock01AL.
Select the texture then go back to our Layers tab. Click on the Undefined box below our first layer, then click New. The new layer dialogue box will show up again. Set the package to mylevel, and name it something different, like terrain1rock. For this layer, we want it to start out invisible, so choose a completely black color for the AlphaFill this time. Remember to leave the Alpha Height and Width values the same as the terrain.
Press Ok, and our layer is created. To paint with our new texture, click on that layer and switch to the Paint tool. The texture is painted in the Inner Radius with the full Strength setting, and it fades out to the Outer Radius. The lower the Strength setting, the slower the texture is painted on. Holding Ctrl and the left mouse button paints the texture, while the right mouse button erases it.
If you look at the texture, it might seem too small to you, or you might want to rotate it. Let's take a look at a few options we can use to change that. Click on the Terrains tab, then double click on the TerrainInfo listed in the box to bring up its properties. Expand the TerrainInfo box and click open the Layers tab. You will see both of our layers listed along with empty boxes for future layers. Click open our second layer for the rock, and let's take a look at the properties in there.
Texture - If you change your mind about the texture for a layer there are several ways to change it. One way is through here, by selecting a texture in the texture browser and hitting 'Use' in this line. Another way is to select the texture and open up the Layers tab in the Terrain Editor. Right click on the layer you want to change and click Set Texture From Current. A more extreme way would be to delete the layer and remake it, but you will lose any texturing you have already done with that layer.
TextureMapAxis - Changes the axis that the layer is applied to. For example, take a look at this steep slope and you can see the stretching of the texture on the sides:
This is because the texture is being applied on the XY axis (floor/ceiling). Changing the TextureAxisMap changes the axis that the layer is applied to. To get the most out of this, some layers should be duplicated for a total of three, with each one applied on a different axis. This makes it so you can apply the texture on every surface possible without any stretching. In these pics I have left the XY texture applied to the top, and have made a new layer set to the XZ axis and applied that texture to the wall:
TextureRotation - This is used to manually set the texture's rotation. Another way to do this is to use the TexRotate tool in the Terrain Editor.
U/V Pan - This is used to move the texture around on its axis. Another way to do this would be to use the TexPan tool in the Terrain Editor.
U/V Scale - If you did not change the texture's scale when you made the layer, you can do that here (negative values can be used to flip it). You can also change it with the TexScale tool in the Terrain Editor. Note that when you squeeze it all the way down it will flip the texture and start expanding in the other direction, which has the same effect as using a negative number in the scaling boxes.
Terrain Texturing Tips
One thing about painting textures on terrain is that the texture will always go by the grid of the terrain. For instance, if you have an extremely steep slope where the vertices are far apart, the texture will be applied all the way up the wall to the next vertex, as in the following picture, where I have applied the rock texture to the bottom vertices of the cliff:
One way to avoid this is to make the slope less steep by having sets of vertices at certain points along the wall. This lets you have better control over cliff face texturing.
Another problem that comes with the grid texturing is that sometimes you will get sharp edges in the texture, which doesn't look natural. The way to avoid this is to lower the Strength of the Painting tool and lightly click on the edges to apply a small amount of the texture to the next grid point, which will get rid of the sharp line:
Deco Layers
Deco Layers are used to place static meshes on your terrain, such as grass. The meshes can be painted on like textures, and have their properties adjusted in the TerrainInfo actor. Being static meshes however, they will decrease performance in your level, so don't go overboard with them. In most cases it would be best to place static meshes yourself, but this way can potentially be faster and better in some cases. Deco layers are always non-solid.
To start making our Deco Layer, open the Terrain Editor and click over to the Decorations tab, then hit New. A line will show up with three red X's.
There are a few things we need to do to get our deco layer to show up. First we need to give our layer an alpha texture to use, so open up the package where we have stored our terrain layers (in the case of this tutorial, mylevel) and find the layer we used as our first texture. Right click on it and hit Duplicate.
In the Duplicate Texture dialogue that comes up, leave the package name the same as the other terrain textures, and give it a unique name, in this case I will use terrain1deco1. Once this is entered hit Ok.
Select our newly duplicated texture and go back to the Decorations tab in the Terrain Editor. Right click on our deco layer and hit Set Density Texture From Current. The texture should now appear in thee first of the three boxes.
Next, open the static mesh browser and find the static mesh you want to use as the deco layer. For this example I will be using the ArboreaHardware >> ArbGrassA static mesh, which is a simple 15 triangle grass mesh. With that selected, go back into the Terrain Editor and the Decorations tab. Right click on our deco layer and click Set Static Mesh From Current (this can be used to change it later as well). The name of our static mesh should now appear in the box.
One thing left to do before our deco layer will show up. Click back over to the Terrain tab and double click on our TerrainInfo to open up its properties. Click down to TerrainInfo >> DecoLayers >> [0] >> FadeoutRadius. These values work like the inner and outer radius of our Terrain Editing tools. All of the decos within the Min value will show up completely, and fade out to invisible at the Max value. Enter some appropriate values, to start with I used 2000 for min and 3000 for max. Once that is done, our deco layer will show in the editor.
Now that our deco layer is showing, let's take a look at the properties we can change for them.
DecoLayerOffset - Adjusts the height of the deco layer, in case it is too low or too high.
AlignToTerrain - If set to 0, the static meshes will be vertical. If set to 1, the meshes will follow the slope of the terrain.
DensityMultiplier - Adjusts the density of the static meshes across the terrain. Higher numbers make more static meshes appear, lower numbers make them more scarce.
DisregardTerrainLighting - If set to 0, static meshes use the lighting of the terrain, if set to 1, they appear at full brightness.
DrawOrder - Sets the rendering order of the deco layers. In some cases the blending will not look right and this will need to be adjusted.
FadeOutRadius - Already discussed.
LitDirectional - If set to 1, the static meshes will use Sunlight for their lighting. In cases like the grass mesh I use in this example, it will make shadows appear on the mesh that look unrealistic.
MaxPerQuad - This is the maximum number of meshes that will appear in one grid unit of the terrain.
RandomYaw - If left at 0, all the meshes will have the same orientation. If set to 1, the meshes will be randomly rotated.
ScaleMap - A map texture (similar to the ones used for terrain layers) can be set here to adjust the scale of meshes in different parts of the terrain.
ScaleMultiplier - Use these values to adjust the scale of the static meshes as you would use the Drawscale3d boxes at the bottom of UEd.
Seed - Set a number here to make different random patterns in the mesh placement.
ShowOnInvisibleTerrain - Self Explanatory.
ShowOnTerrain - If set to 0, the deco layer will not be displayed.
StaticMesh - Here is another place you can change the static mesh used for the deco layer.
Deco layers can be painted on just as a texture layer. You can use the Paint tool just as you would with textures, and the Noise tool to make random changes in the deco layer.
That's it for this tutorial, have fun making terrain! Good luck!
Back To Tutorials
|
|
|