Making the terrain
We're going to set our scene on an icy wasteland, with cold blue skies and a glaring sun. In a traditional cop-out, we'll have a range of mountains around the edge of our terrain to limit player movement. We'll aim for a bit of realism with the tops of the mountains getting snowier and icier, and some perspective from having mountains set behind other mountains. There'll be a large, mostly flat patch where our castle and towers can sit.
1. The Workspace
- Open up a new project.
- Make a cube, dimensions 8192 8192 8192.
- Pick a neutral texture, I suggest Engine -> Border. Subtract your brush.
- Go to the Actor Class Browser and grab an Actor -> Info -> Zoneinfo. Add it in the middle of your workspace.
- In the ZoneInfo Properties, set ZoneInfo -> bTerrainZone to True and ZoneLight -> AmbientBrightness to 128 - we'll take out the brightness later, it's just so we can see what we're doing for now.
- Select all the surfaces of your cube, go to Surface Properties and check 'Fake backdrop'.
2. The Terrain Editor
We're just going to set up our terrain for editing here, nothing exciting yet I'm afraid.
- Open the Terrain Editor. Pick new, and assign X and Y values of 128. A higher value should give less repeating textures, but this doesn't appear to work in the demo version of Unreal. A pity, as we end up with a lot of small repeats which look quite bad over distance.
- In the below, you'll be picking a texture from the texture browser, then in the the Layers tab of the Terrain Editor choose an undefined layer and clicking 'new' - setting AlphaHeight and AlphaWidth to 512. Make 5 layers with the following textures:
- Texture: RockyFloor.
- Texture: CanyonWall
- Texture: SnowyMountain
- Texture: IcyMountain
- Texture: GlacialCracking
3. The Terrain
Ok, now we're ready to build our terrain. Remember, the middle should stay fairly flat and solid, the outer edges should be crowded with mountains.
- In the Terrain Editor, highlight the Heightmap - this is a bit glitchy, so really be sure it's selected.
- In 3D View move the camera so it's above the workspace, and right off to one side. Tilt the camera down so you can see the whole terrain. You might need to 'build all' before the terrain appears.
- This bit's really up to you, it's hard to be very imperative and direct about making terrain. Select and raise the edges of your floor to create a mountain range all the way around (using the Painting tool). We don't want particularly soft mountains, so dim down the inner radius of the brush at bit at times. We also don't want even mountains, so change around the inner and outer radius, as well as strength settings. Put some mountains in front of other mountains, and leave some space around the edges in a couple of places (so the mountains are slightly inwards from the edge of the terrain. In these gaps, set your inner-radius to 1 on the paint tool, and the outer radius to about 100 to build up sheer crags.
- Tip: If you find you want a lot more space to play around with, pop into the TerrainInfo Properties and up the TerrainInfo -> TerrainScale values.
- Now we need to paint the terrain. To paint, select a layer, and then use the 'painting' brush. The 'noise' brush also helps in transitions. Texture the bottoms of the mountains with 'snowymountain', the higher parts with 'icymountain' and the topmost parts with 'glacialcrack'. Take your time, and do things from the 'players' point of view (by moving the camera so it's flat against the ground and fairly central. Texture the mountains from all angles. When you're done, throw a start point on the floor, run around and check you can't escape any of the edges. (In my map, you actually can run off a couple of the edges - that's just a little bonus so you can see the bottoms of the lovely skybox - I wouldn't recommend allowing this for any maps that will actually be played though).
Here's the kind of thing you can expect by now. It's not too pretty - but don't worry, a backdrop, some lighting and a player's perspective viewpoint are very forgiving and will make it look quite nice:
4. The Skybox
A skybox will give a lovely backdrop to our terrain, and something to replace that black sky. These are notoriously fiddly in this version of Unreal, but hopefully the below method should present you with no problems. Or seams at the edges.
- Switch to camera mode.
- Make a cube, dimensions 1022 1022 1022 - 2 units less than our textures, to avoid seams.
- In front view, centre the active brush in your workspace. Raise the brush to be about 2048 pixels above the very top of your workspace. Subtract.
- Select all the surfaces of your skybox except the bottom one, and go to Surface Properties. Hit the 'unlit' checkbox.
- In the Actor Class Browser fetch an Actor -> Info -> ZoneInfo -> SkyZoneInfo. Add it and in 3D view make sure the entirety of the SkyZoneInfo actor is fully within the skybox on all axis - dead centre is ideal.
- Texture the sides with the glacier package (glacier_south, glacier_east, glacier_north, glacier_west, glacier_up). Note that the textures don't follow the points of the compass exactly, 'east' is where you'd expect 'west' to be and vice versa.
- Rotate the top texture (glacier_up) 180*.
- Things should be fine here. But, make sure you're not going to get any seams. In 3D view walk the camera right up to the edges between the faces of the skybox and check things line up perfectly - make tiny panning adjustments if you need to. Below is a perfectly lined up edge:
5. Adding Sunlight
We're going to have some strong, but cold and slightly blue-tinted sunlight coming right at the player. We'll have the sunlight lined up with the sun drawn on the skybox, which gives a very nice effect. This will be the only lighting for the terrain, and should cast some nice shadows from our mountains (and eventually, our buildings).
- Go the the Actor Class Browser and grab an Actor -> Light -> Sunlight. Add it somewhere.
- In the Properties window for the sunlight, go to LightColor and pick a bright and blue tinted colour. I had values of Brightness: 199, Hue 174 and Saturation: 87.
- In front view align the sunlight so it's just inside the ceiling of our workspace. In 3D and top views get your bearings and work out where the sun picure is in relation to the workspace. Then, move the sunlight so it's just within that wall of the workspace.
Here we see our sun texture, and below the skybox way into the distance that small yellow dot is the sunlight actor - nicely lined up for a realistic effect.
- In front view rotate the sunlight so it's pointing at about a 45* angle down towards the terrain. In top view rotate it to be pointing directly at our world. Seems obvious, but it's easy to forget, and wonder why you're seeing nothing...
- Finally, get the original ZoneInfo actor you placed in the terrain, and set ZoneLight -> AmbientBrightness: 5. This helps to remove some of the harsh 'black' areas, whilst still letting the sunlight do nearly all of the work.
Below is a nice bright sunlight, at an artistic angle and without the ambientbrightness. It looks lovely, but the map's not too playable like this unfortunately.
A lot more useful is this brighter, though less artistic scene accomplished with the directions given above:
6. Finally...
We're done! Pop down a player start point if you haven't already, and give it a whirl.