Terrain Editor
Overview
The Terrain Editor is a tool in your world server that gives you control over the 3d landscape on your world. You’ll find it in the Tools menu of your world server. The Terrain Editor lets you create a landscape using a fractal landscape generator; it lets you create a landscape using a heightmap image; it lets you smooth your landscape; and it lets you set sea levels too.
The first part of this section explains the main features of the Terrain Editor. If you’re familiar with the concept of heightmaps this is probably all you’ll need to read. The last part of this section explains what heightmaps are and has some advice on how to create your own.
Terrain Editor – the main features explained
The screenshot shows the main Terrain Editor screen. The numbers in red correspond to the explanations that follow…
(1) – Save Terrain Settings
This nice big button is really important: when you click it, it applies all of the settings in the Terrain Editor to your world. Whenever you make changes to Terrain Editor settings, you need to click this button to see the results in the game. When you click it, you’ll see a box telling you the terrain parameters were updated. Click “ok” to proceed.
(2) – the ‘Height Map’ settings
If you want to use a specific heightmap file, here’s where you tell your world server what it’s called. All heightmap files live in your server’s /maps folder. Type in the name of your heightmap file, or click the “…” button to browse your /maps folder.
At the moment a heightmap in The Universal has to be a 256x256 greyscale bitmap image. If you leave the name field blank, the server will assume you want to use the fractal generator instead of a bitmap to generate the landscape.
Before you move on to the fractal generator stuff below, please note... the Bulge Type, Bulge Range, Bulge Min and Smoothing settings also affect a heightmap based on a bitmap file. To make sure they don't, set all the smoothing settings to 0, set bulge range to 0, and set bulge type and bulge min to 255.
(3) – Fractal Generator settings
This is where you enter numeric values (whole numbers only) that the server will use to generate a landscape automatically, if you wish:
- Seed Value: the fractal generator uses this number to set up the landscape. You can type any value in here – different numbers will produce totally different landscapes.
- Height Seed: this number determines the height of the first point on the landscape created by the fractal generator, which means it basically controls the average height of the whole thing. Because the 'Smoothing' settings (see below) are also based on the height of the landscape, changing this number can have a radical effect on how your landscape looks.
- Bulge Type: the 'Bulge' system automatically lowers the land around the outsides of the map, making it easier to form a more rounded looking landscape with the appearance of a natural island or continent (ie, one that bulges upwards as you move inland). You have a few options here, all of which will give your landscape a subtly different appearance. It’s best just to try them and see which one you prefer. Enter numbers as follows:
0 - Geometric
1 - Linear
2 - Parametric
3 - Is a special mode that makes the island completely flat
If you enter any other value here, the bulge system will not be used at all.
- Bulge Min: this setting is only applied when the Bulge system is active (see above). It determines how far from the center of the island the bulge system will start to round off your island. Enter a number from 0 to 128, corresponding to the distance from the centre of the island (128) to the edge (0).
- Bulge Range: this setting is only applied when the Bulge system is active (see above). It determines the 'steepness' of the falloff beyond the 'Bulge Min' setting. For instance, if the Bulge Min was 128, and the Range 10, then the landscape height will be 0 at every point more than 138 units away from the island center.
- Smoothing: smoothing is important if you want a landscape that flows naturally from high points to low points. Without any smoothing, you’ll probably find that your landscape looks very pointy and jagged. You can set up four different levels of smoothing, and have different amounts of smoothing for each level. The levels correspond to heights on your landscape, on a scale of 0 (lowest point) to 255 (highest point).
For example, let’s say you want a landscape where the highest points tend to be a bit jagged (rocky mountains), and the lowest points very smooth (perhaps it’s seafloor and beaches); the bits in the middle get gradually less smooth as you get higher. So your smoothing settings might look like this:
Level 1 – 50 Amount – 10 (the lowest points on the landscape, up to a height of 50, will be smoothed ten times)
Level 2 – 100 Amount – 4 (from a height of 50 to 100, there’s moderate smoothing)
Level 3 – 150 Amount – 2 (from a height of 100 to 150, there’s much less smoothing)
Level 4 – 200 Amount – 1 (from a height of 150 to 200, there’s hardly any smoothing at all; and at heights above this, there is no smoothing whatsoever)
Getting your smoothing settings right is mostly a case of trial and error. Run your game client in a window and the server in another; try something, click the “Save Terrain Settings” button, and make a note of the settings if you like them; try something else, see if you like it better…
At the moment there are only two settings here you can change:
- Min Sea Level: This is a numeric value from 0-255 that determines the minimum sea level on your landscape. For example, if this is 10, then all points on the landscape at a height of 10 or below will always be covered by sea.
- Max Sea Level: This is a numeric value from 0-255 that determines the maximum sea level on your landscape. For example, if this is 100, then no point on your landscape above a height of 100 will be covered by sea.
If you set Max Sea Level to 0 you shouldn’t get sea anywhere on your landscape.
Most of the control you have over the landscape is provided by the tools explained above. However, there are two in-game settings that also affect the look of your world:
- Landscape scale: this setting (*settings/Landscape Settings) determines the size of tiles on your world. All worlds are made up of a 256x256 grid of tiles, but the size of the tiles can change the look of a world dramatically. If you switch from a large landscape scale to a small landscape scale, it will have a “squashing” effect on your landscape, and it will look higher and more pointy overall; if you dramatically increase the landscape scale, it will have a “stretching” effect, and your world will look flatter overall.
- Height scale: this setting (*settings/Landscape Settings) has a similar effect to the landscape scale setting, except it changes the overall “highness” of your world. Again, if you make a dramatic change to this setting, you can expect a corresponding change in the overall flatness or pointyness of your landscape.
Heightmaps explained
All worlds in The Universal generate their 3d landscape from a black and white bitmap image - a ‘heightmap’. The game uses the different shades in the image to generate landscape that’s low (dark shades) and high (light shades).
Here’s an example of a heightmap: it’s a world with flat, dusty plains (the black areas), some mountain ranges (the brightest areas) and some smaller raised plateaus (medium grey areas).
The next image shows the view, in-game, across one of the flat plains to the mountains in the distance.
Heightmaps in The Universal are 256 pixels long by 256 pixels wide. And each world is divided into a 256x256 grid for the purposes of positioning buildings and laying down textures and so on. There’s a reason for that correspondence in size: each pixel on the heightmap corresponds to a tile on your world. So position 0,0 on your world (the most northwesterly point) is represented by the top left pixel in the heightmap. Position 255,255 on your world (the most southeasterly point) is the bottom right pixel.
At the moment, a heightmap in The Universal has to be a 256x256 greyscale bitmap image (a .bmp file) - that is, a black & white image that uses 256 shades of grey, from black to white. So, as you'd imagine, with 256 shades of grey, you have a total of 256 different height levels on your world. Heightmaps should be saved in your world server’s /maps folder.
Making a heightmap for your world
There are a few ways to make a heightmap for your world.
- Create your own: you can use a paint program to create your own 256x256 greyscale bitmap file. This gives you the most control, but is also the most fiddly and time-consuming way of doing it. If you want to make a natural looking landscape you’ll need a paint program that gives you good control over blending, smoothing, blurring and brushes – you’ll struggle if you’re just using MS Paint or something. But you can also make something that looks totally unnatural just using simple geometric shapes – it’s up to you :)
If you want to create a natural-looking world, the main thing you’ll spend your time doing is smoothing the boundaries between light and dark areas. If you have a light pixel next to a dark pixel, you’ll get a very rapid height change in the game: maybe that’s ok for cliffs, but it’ll make it difficult for players to move about easily if you have this everywhere, and it won’t look especially natural. The trick is to create smooth flowing shapes that look like real landscape does, with contours and curves; and use smoothing tools to make sure there’s a nice transition from one height to another (unless you really want a cliff or something).
- Use the fractal landscape generator: if you can't be bothered with all of that painting, you can use the built-in fractal landscape generator in your world server. This is very useful if you want to create natural-looking landscapes quickly and easily – but the results are hard to predict, and you won’t have control over the exact look you end up with. However, this is definitely the easiest way to create a good-looking landscape that’s totally unique to your world.
Read through the settings explanations above to get a feel for the stuff you’ll need to deal with. Probably the first thing to do is to play with the Seed Value and the Height Seed, and check out the results in your world (if you hit F7 to bring up the map, you’ll get a quick view of the whole landscape). If you like a setting, stick with it, and then start playing with the smoothing settings to sort out any jaggedness (or smoothness) you don’t like. When you’re happy with that, you might want to consider Bulge and use those settings to finish the landscape off.
- Use photos and images: Finally, you can find a lot of heightmaps on the Internet, in various forms. Many other games use heightmaps to generate 3d landscapes, although you may need to resize them to fit The Universal’s format. You can even use colour photos of real places, satellite imagery, map data… as long as it ends up as a 256x256 greyscale bitmap file, in your server’s /maps folder, it should work (you’ll almost certainly need a paint program and a bit of knowledge to make that happen, but it’s really not that difficult). Please respect other people’s copyright if you download images for this purpose.