L3DT users' wiki
Large 3D terrain generator

Making the heightfield and texture for Spring

Getting started

There are many ways to make a map in L3DT, but I shan't cover all of them in this guide. In fact, I'm only going to cover the “well-travelled path” of using L3DT's Design/Inflate algorithm. If you'd like to experiment with other ways to make your map, you may find the following reading useful:

  1. The official userguide for making new maps.
  2. The official userguide for importing heightfields or design maps.
  3. My tutorial on designing a fjord-esque map (see here).
  4. Forboding's tutorial on making a map using an heightmap image drawn in Photoshop (see here).
  5. Monk's tutorial on making a map from a topographic map of Middle Earth (see here).

Anyway, back to making the map. First, click on the 'New map' button on the toolbar. This will open the algorithms wizard (below), where you get to choose how L3DT will make your map.

:tutorials:ta_spring:aaron:wizard_algorithms.png

As you can see, there are five algorithms listed in the wizard. The first is the one we're going to use, so click 'next' to proceed.

The heightfield and design map

The next pane in the wizard is the heightfield map size pane (below).

:tutorials:ta_spring:aaron:wizard_hf_size.png

As you should already know, Spring's map sizes are quoted in units that are 1/64th the size of the heightfield. Thus, a 1024×1024 pixel heightmap will produce a map that is 16×16 in Spring units (1024 / 64 = 16). The table below lists some common Spring map sizes along with the heightfield sizes required to make them:

Spring map size L3DT heightmap size
2×2 128×128
4×4 256×256
6×6 384×384
8×8 512×512
12×12 768×768
16×16 1024×1024
24×24 1536×1536
32×32 2048×2048
48×48 3072×3072
64×64 4096×4096
128×128 8192×8192

The default size is 1024×1024 pixels (16×16, in Spring units), which is a good size for the purposes of this tutorial. Let's click 'next' to continue.

The next pane is the design map size wizard. The design map is a low-resolution map that is used as the template to produce your high-resolution heightfield. This wizard allows you to choose the resolution of the design map. The default setting is 1/64th the size of the heightfield, which is a good size. Click next to continue.

:tutorials:ta_spring:aaron:wizardpane_dm_size.png

The next pane is design map parameters, where you can set the general shape of your map using some “high level” controls (flat/steep, sea/land, etc). The only setting I'm going to change here is the climate. The climate ultimately determines whether your map will look like a desert or a jungle (or otherwise), and L3DT includes a number of climates to suit different occasions. Forboding Angel has created, and generously donated, a collection of climates that are suitable for Spring maps, and these are included with the installer. In this guide, I'm going to choose the 'Spring Greenworld' climate, as shown below:

:tutorials:ta_spring:aaron:wizardpane_dm_params.png

Following the design map parameters wizard is the calculation queue. In this pane you can queue-up several calculations to run back-to-back. Here I suggest you enable both the design map and heightfield calculations:

:tutorials:ta_spring:aaron:wizard_autocalc1.png

After some flashy eye-candy, we should arrive at the heightfield, which will look something like that shown below.

:tutorials:ta_spring:aaron:map_hf.png

The red contour line is sea-level, the green contour is +100m, the blue is -100m, the like grey contours are every 100m, and the dark grey are every 20m. If you don't want contours, you can disable them using the 'View→Display effects→show contour lines' menu option.

To visualise the terrain in 3D, you can click on the '3D' toolbar button to open the Sapphire 3D renderer plugin. At this stage, Sapphire will present you with a scene such as that below, consisting of the heightfield rendered in green. Later, once we've completed the texture, we'll come back to Sapphire to see what the complete map looks like.

:tutorials:ta_spring:aaron:hf_3d.jpg

To move around in Sapphire, press the W/A/S/D keys to move forwards/left/backwards/right, and E/R for up/down. Also, you can edit the heightfield using brush tools by pressing the 'h' key (see user guide).

The water, attributes, normals, light and texture maps

To make the texture map, we'll first need to make some other maps, including:

  • The water map.
  • The attributes map (the 'mask' used to generate the texture map).
  • The normals map (used for lighting).
  • The light map.

Fortunately, we can make all these maps in one go using the calculation queue wizard. To open the calculation queue, click on the 'Calc »' toolbar button. In the calculation queue, enable the options show below:

:tutorials:ta_spring:aaron:wizard_autocalc2.png

When you click next, you will be taken to the water map wizard pane. On this pane, enable the 'flood water-plane' option, disable the auto-flood seas/lakes options, and enable the 'flood water table' option, like so:

:tutorials:ta_spring:aaron:wizard_wflood.png

Once you click next, you will go through to the water table wizard. You shouldn't need to change any settings here, so click next.

:tutorials:ta_spring:aaron:wizard_wtable.png

Now we're at the attributes map wizard. As I mentioned before, the attributes map is the 'mask' used for the texture blending. Because we'll want to make a high-resolution texture, we'll also want to make a high-resolution attributes map mask. Thus, we'll enable the 'make high-res attributes map' option, and set the AM/TX ratio to 4. You can also enable the 'Use disk-drive paging' option if you want to reduce the amount of RAM needed for the calculation.

:tutorials:ta_spring:aaron:wizard_am.png

Clicking 'Next »' will bring you to the normals map wizard. Here, enable 'Apply bump mapping', enable 'Make high-res terrain normals', set 'TN/HF ratio' to 8, and enable 'Use disk-drive paging', like so:

:tutorials:ta_spring:aaron:wizard_tn.png

Next is the light map wizard, where you can change the lighting direction and colours. If you would like to tinker with the settings, please consult the light mapping wizard guide. In this tutorial I'm going to leave everything as default and click 'Next »'.

:tutorials:ta_spring:aaron:wizard_lm.png

The second pane of the light mapping wizard is where you set some of the lighting effects. In this wizard, disable 'water effects' and 'apply bump mapping', then enable 'make high-res light map', set 'LM/HF ratio' to 8, and enable 'split light map into mosaic'. Finally, click 'next »' to proceed.

:tutorials:ta_spring:aaron:wizard_lm2.png

The last pane in the wizard is the texture wizard, Here we'll enable anti-aliasing and set it to to 4x (or 8x, if you prefer), enable 'make high-res texture map' and set it to 8, and finally enable 'split texture into tiles', like so:

:tutorials:ta_spring:aaron:wizard_tx.png

After you click OK, L3DT will go away and make all the maps requested. When done, the map will look something like this:

:tutorials:ta_spring:aaron:map_tx.jpg

Don't worry about the white dotted lines; they indicate the size of the tiles into which L3DT has chopped the texture map. The white lines are only for display purposes in L3DT, and won't be on the final texture when exported to Spring.

At this point, it is a Very Good Idea™ to save the map project using the 'save' button on the toolbar.

Okay, let's return to the main tutorial page to continue with the task of exporting the map to Spring's SD7 format.

 
tutorials/ta_spring/aaron/hf_and_tx.txt · Last modified: 2017/08/31 04:33 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki