User Tools

Site Tools


world_setup:appearance:terrain

Terrain

There are a few different options currently available to how your landscape (assuming you have one) is rendered, ranging from the quick-and-easy to the deeper options which require you to do some proper tech-art to achieve something approaching the almost-acceptable.

If you world doesn't need a naturalistic landscape, you can simply make the landscape flat (or turn it off completely in settings) and fill it out with walls, buildings, objects and textures as you see fit.

Providing or generating the heightmap

If you are aiming for a world that looks like a realistic-ish planet, you need to start with how the landscape geometry is generated. The game provides two methods for this:

  1. Generate a landscape programatically, with a few options to control smoothing and rounding of the land so an island shape is produced.
  2. Use a heightmap image to directly specify the arrangement of the landscape grid.

A heightmap image might look like:

FIXME Include image :)

.. and fairly simply relates each pixel in the image to the height of a tile on the landscape. Bright white in the image means the point on the landscape is high, dark areas mean that point on the landscape is low. There are tools available publicly for generating heightmap images, and you can find lots by googling. If you've got a decent paint program you can use lightening/darkening and smoothing tools (etc) to generate images that produce realistic landscapes that you can craft to fit your game needs.

Texturing the terrain

So here's where it starts getting a bit tricky.. Making nice looking landscapes takes some effort..

Basic tiled landscape textures

The simplest option for texturing is just to put a little grass texture over every tile.. the world looks a bit bland but its nice n easy. This is usually the default setup.

If you wish, you can then add other textures (like roads, beaches, muddy areas) by creating textures and 'painting' them on your map using 'texmaps' (where a texture is stretched over a number of tiles across the map) and 'tiled surfaces' (where a texture is used repeatedly over a number of tiles). To do this you probably need to spend a fair bit of time in the map editor drawing out shapes, and it'd help if you have a good 2d image manipulation program to make some decent textures, but without a lot of effort and skill this method is always going to look a little 'primitive'.

Landscape texture generation

Next option, if you don't want to spend all that time making textures and laying them out nicely on your world, is to let the game engine generate your textures based on the landscape. The principle here is that you specify a range of textures (usually 4) that are applied and blended at each tile based on its height position. Standard method here is you say, for instance, anything over height 200 gets the snow texture, anything over height 150 gets rock, anything over 50 gets grass and everything else gets sand. The game renderer uses these 4 textures and the rules about height to blend textures together and generate a landscape that looks pretty realistic without much effort. The downside to this technique is that you have no control of what the landscape looks like other than the height. (You can, theoretically, combine this method with tiled surfaces and texmaps but its difficult to avoid creating joins which look out of place. Having alpha channels in your texmaps to blend into the landscape is possible but .. tricky).

Activate landscape texture generation by switching *settingsLandscapeAuto Texture Generation Mode to 1.

For more details on how to control the auto-generation system, see the Landscape Autogen Reference.

Landscape texture generation + 'Pattern Maps'

The most recent (and most powerful) option, as used on the recent worlds I've run for A tractor, is to combine the heightmap based generation of landscape with a secondary global image (referred to as a 'Pattern Map') which specifies areas of the landscape that use a different texture than would normally be used. (As an aside, Lovelace also utilises an extra, custom method that means areas around each town use a more fine-grained texture to lay out roads, grass verges and sandy areas. Configuring this differently for your own world will probably require some 'Technical Discussion').

This secondary 'pattern map' image works by using each colour channel of the image to weight the use of texture at each point - so (for instance) a full-red pixel in the image means the corresponding tile is mostly 'texture 1', a green pixel in the image means the corresponding tile is mostly 'texture 2', and a blue pixel in the image is mostly 'texture 3'. A white pixel (i.e. one combining full red, green and blue) is an equal blend of all 3 textures, and all the shades in between allow you to blend between areas of the different textures as you see fit.

FIXME Insert lovelace 'Pattern Map' here

There is a serious techno-art-gamedev skill to be developed in the creation of these assets and I've personally found it quite interesting working out how to make them. You may find better methods and I wouldn't be surprised if there isn't already tools to make it magically brilliant :]

Activate pattern map texture generation system by switching *settingsLandscapeAuto Texture Generation Mode to 5 and set the pattern map texture you want to use in the server dialog, Tools Menu → Terrain Editor (Then click 'Save Terrain Settings'). You may need to relog once after activating this system for distant parts of the landscape to appear correctly.
world_setup/appearance/terrain.txt · Last modified: 2020/02/02 06:17 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki