L3DT users' wiki
Large 3D terrain generator


An introduction to using L3DT to model terrain in ME-DEM

This tutorial was written by Monkschain of the Middle Earth DEM Project, and was originally published on me-dem.ashundar.com.


This article is intended to be an introductory tutorial to illustrate how L3DT can be used for ME-DEM. If you are not familiar with L3DT I recommend (for the Slartibartfasts out there) the 'Designing a fjord' tutorial, which is also supplied with the download as a starter, and is found in start menu at Programs → L3DT → L3DT Tutorial. However, you should be fine with diving straight in here.

The actual process in Phase 2 of ME-DEM will differ in one important regard: you will not be using a blank canvas, but importing a tile of the 'base' dem (heightmap) into L3DT onto which to work. Not so much starting on a blank canvas, more elaborating on a rough sketch if you like. The precise details of that process have not been hammered out yet but we're working on it! Still, the following will help people to get their head around terrain modelling.

How to use this tutorial

You will need the latest L3DT professional beta. If you do not already have a copy, you will need to register to receive it (it's currently free). You may also want the completed map files for this tutorial, which can be downloaded from the ME-DEM site.

You can EITHER

Follow from the beginning ('Setting up a design map', below) and essentially recreate my approach from scratch yourself. This is for the folk who want to cut their teeth and do the design stuff. You will still need to download the Tutorial files from ME-DEM because you will need the topo tile. If you are following this route: Open L3DT → Go to File → New Map. This opens up the L3DT Wizard. Now go to Setting up a design map below.


You can enter at Design Map below by downloading the Tutorial files from ME-DEM, which contain the finished map group file (.mgf) and design map file (.dmf). Open L3DT → Open → Browse to that folder and open the mgf. If you follow this route I still recommend reading Setting up a design map as it contains information relevant to ME-DEM. This route bypasses the design stage and is really an introduction to L3DT's tools as applied to a ready-made, designed map project.

Setting up a design map

We want a blank design map. A blank canvas. Select the Design/ inflate (blank). The design/ inflate refers to the 2 step process by which L3DT lets you create your heightmap (aka heightfield). This option allows you to design from scratch in the design map and then inflate those design pixels to create a more detailed heightmap.

Select > Next

Design map size refers to the number of design map pixels along the x and y axes. For simplicity's sake we'll be using a 16 x 16 grid. Each design map square (pixel), when it is inflated to create the hieghtfield, becomes 64 x 64 pixels. This means that a 16 x 16 design map becomes a (16 x 64) = 1024 x 1024 pixels heightfield. It states this beneath the Heightfield resolution (m) box in the Wizard which is also important to us. The default of 10 (m) means that each heightfield pixel will equal 10 metres on your terrain. If the heightfield is 1024 x 1024 px, that means that your terrain will be 1024 x 10 m = 10 Km (or near as damn it). It indicates this below the box as well. For ME-DEM phase 2 we want to create terrain where each pixel = 20 m, so the first thing to do is to change Heightfield resolution to 20 m. You'll see the 10 Km change to 20 Km to reflect this. This is the size of 1 tile that modellers will upload back to ME-DEM. We'll not be using the other settings for now so press OK.

Design Map

The first thing to notice is the info mode in the status bar at the bottom right. This gives the current x,y coords of your cursor and the altitude that that pixel is set to. We need a tool with which to set the heights for the pixels, so: Tools > DM Paint tool (or click the toolbar Design Map Pencil Tool button). This opens up the 'design map brush' dialog (see official tutorial).

The check boxes down the left hand side make the various tools active. When you click any pixel, the settings for whatever tools are active will be applied to it. You can hold down the mouse and paint as well. Each pixel indicates its height by its colour. The colour scheme can be set from: View > Display Effects > Design map schemes (see official tutorial). There a number of options available from the Options button but I stayed with the default scheme. In this scheme light = high altitude, dark = low.

The topo

We now need to import our topo overlay. The topo tile in this guide was taken from the east side of the Misty Mountains seen below on the left. The I.C.E interpretation of the terrain in this area is as follows:

This majestic range is also known by the Sindarin name Hithaeglir (“Walls of Mist”). It was thrown up fairly late in ther history of the world, possibly at just the time of the Elves' awakening in Cuivienen [see The Silmarilion']. Its effect on the local topography was dramatic: the lands on both sides of the range were lifted and torn by the violence of the event, leading to the creation of broken eroded fells on the western slopes and sheer precipices on the east.” [Arnor: Realm, p221 ICE #2005]

The line leading to the foot of the eastern slopes is the Men-i-Naugrim. It was built as a trade route by the dwarves around the Second Age. The road passes through Mirkwood to the east leading eventually to the Iron Hills. At this point I'm not sure what lies at its terminus at the foot of the mountain. It's either a dwarven mine, an entrance to the road travelling under or over the mountains connecting Moria perhaps and ultimately out and onto the dwarven holds in the Ered Luin, or a village perhaps ?….). This landscape lies roughly 60 Km southwest of The Carrock (see 'The Hobbit' ) on the river Anduin.

Click, View → Image overlay. Use the Browse button to select your topo tile. Set the overlay opacity to a figure which suits you (I prefer 0.2-0.4). Click OK. You should now see something like the map on the right: (if you're using the ready-made design map the green will be various shades).


Designing the map

The method I used in this map was to use the Alt(m) or altitude tool with the relative check box checked. The choice of 'relative' height means that any height input will be added to the current pixel height with each pass over it. With a negative input, height is subtracted. This allows you to build up your terrain incrementally. I used increments of 200 m almost exclusively throughout to keep things simple. Below you can see the topo and the design map.

To find my bearings I tended to rely on the altitude in the info mode, and the colour scheme for the location of the primary features such as peaks and valleys. For me, the most important tool is the contour map created when you inflate your design map and produce your heightmap in step 2. You will find your own way of working which suits you best. I found that I began by relying on the design map altitude feedback, but as my map progressed towards more minor refinements, the heightmap contours became indispensible. The way I would advise approaching building a terrain tile is through thinking of it in terms of a simple schematic representation of the main features. Peaks, ridges, valleys as indicated in red. It helps to know in advance what the highest and lowest points are. During Phase 2 modellers will have access to this kind of info in the base DEM and reference materials on the ftp. Guidance will be available but often it will be your choice.


The numbers indicate peaks, red lines, ridges, and letters are other features (A= flat, almost geometric face, B= steeper drop to a bowl depression, C=plateau, D= deep valley).

The first thing you will notice is that the design map does not correspond exactly to the topo. For example, if you drew a straight east-west line from peak 1 on the topo map to peak 1 on the design map, it doesn't line up. First off, don't worry about this. This is because you have to re-project the topo onto the design map.

To explain: the camera position looking at the topo is not directly above the terrain, but looking at an angle to it in mid air. The design map on the other hand is looking directly from above (birds-eye view at a 90 degree angle to it). This from-above view is called Orthographic (Orthographic projection) and is used in all modern maps. The topo is drawn using an archaic map style (just as Tolkien did). That process of flattening the 3D topo view into the 2D design view is called a re-projection. It sounds technical but it's not difficult once you have a go yourself. Two things to remember: consider the positions of key features as far as you can judge, and don't worry if you can't get it exactly 'right'- it's your interpretation that matters.

Why have I moved peak 1 so far south in the design map ? Because if I didn't, the base of that mountain would go off the map at the north edge of the design map. This clearly would be innacurate as the topo has a plain along the north edge of the terrain (directly north of the peak 1). This kind of indisputable innacurracy is something to try and avoid. At the end of the day, it's what your terrain looks like in 3D that matters and your best way in L3DT (at the moment) for determining this are the contours of the heightfield map.

So lets generate our heightfield from the design map. Operations > Heightfield > Generate map. (Note: the following section is included to give a basic demonstration of the erosion tools in L3DT and procedural erosion more generally. It is not a walkthrough of how I made the terrain). The 3D interactive view on the right (below) is not currently available in L3DT though it is on the developer's plan and you can use L3DTvi2 for some nice visuals of your terrain (see closing images). I used Leveller in this case.

The heightfield generation gives you something like this:


Hmm…you can see the basic shapes are all in the right place but the terrain looks more like hills than majestic mountains. This is a good start, but what we need is a more craggy look with ridges and clefts; more detail. What we need is fractal noise and erosion !


Note: see the Update in Creating a texture below.

The following erosion settings are similar to those used in the fjord tutorial.

Erosion is one of the 'mask' layers in the design map, which you can view directly. First make sure: View > Show map > Design map is activated. As you did before do: View > Display effects > Design map schemes and choose 'Erosion' from the drop down list. With no erosion applied, this scheme will show a greyscale version of the Design map altitude layer.

There are two ways to apply erosion. The first is 'Apply to all' (using the button in the bottom left corner of the Design map pencil dialog). This applies your settings to all the DM pixels. We'll try that next.

We'll open up our Design map to show the Roughness scheme: View > Display effects > Design map schemes > Roughness. Again, this at present is a greyscale of the altitude (main) Design map.

A common approach to a terrain is to first apply a global 'roughening-up' of the ground to give the terrain more of that small-scale uneveness found in nature. The noise is essentially random, or more precisely arbitrary 'fractal noise'. We want to roughen, so activate both the Peak and Fractal in the Roughness group and set the sliders to around 60%. Press 'Apply to all'.

The Roughness scheme turns various shades of brown.

To apply that to the heightfield you must first generate the heightfield (again). Operations > Heightfield > Generate map:


The effect is subtle but you can see it. The terrain surface in the 3D view looks more like a stone texture and the contours have more small variations in them. Technically, the roughness group of tools do not apply erosion, since erosion only wears down terrain. Roughening can bump up the terrain. Hence you don't see any change in the Erosion layer of the design map.

Now lets try adding some terracing to that roughness.

First deactivate the Roughness tools. Activate Terraces and set it to 50%. Apply to all. Generate the heightmap:


A terrain effect I'm sure you'll immediately recognise from the 3D preview above. It would be very useful for some kinds of terrain but not for ours. A little bit (say 10-20%) could be useful, (experiment!). If you like, you can check the Terracing/ cliffs scheme to view any changes in the Design map schemes in the same way you viewed Roughness previously.

Undo the terracing by setting it to 0% and Apply to all. Undo the Roughness by deactivating terracing, re-activating the Roughness tools (Peak and Fractal), setting them to 0%, then Apply to all. Generate the heightmap. We should be back to just the design map.

Let's save a little time. Enable both the Peak, Fractal options (if they're not already active), and set the sliders to about 30%. Apply to all. Generate the map. We should be back to something similar to what we had before our lil desert detour.

OK, so far no changes have occured to the Erosion layer of the design map. Let's do some actual erosion. In a similar approach to how we approached Roughness, lets first apply a little erosion to the whole map. Deactivate any tools that might be active. Activate Erosion and set to 20%. Apply to all.

First take a look at the Heightmap by generating it:


Now we're starting to get somewhere ! Let's take a look at the Erosion layer: View > Show map > Design map, selecting 'Erosion' in the design map schemes.


As you can see we now have information. The result of our last operation is the map above on the left. The pixels are brown and E2 indicates the erosion applied to that pixel. In our case: all at 20%.

Now lets paint some erosion to specific areas. Adding to what we have just done. This depends a lot on the effect you want and the topo, but here it's enough to say that just the mountainous areas need it. As erosion is already activated all we need to do is move the slider to say 50% and paint over the relevant pixels using the Design map pencil. Use the design map pixels as your guide here because they more accurately reflect where your mountains are. If you find the pencil a little unresponsive, Clear overlay from the image overlay settings dialog. This produces something like the erosion map above on the right.

Now lets have at look at the heightmap. Again generate the heightmap. Turn off the image overlay to get a better look if you still have it: View > Image overlay > opacity = 0. Note: clearing the overlay gives a clearer view but removes it from the project - though you can always reload it.


As I said above in the Designing the map section, the contour map is a better reflection of what you intend (the schematic design) than the topo is. To illustrate this, compare the two maps below:


As you can see the map on the right correlates more closely. The reason is that the generation of the heightmap from the design map does not involve the re-projection that you had to do to get from the topo to the design map.

If you are in any doubt, the heightmap is how your terrain will look in 3D. Ultimately, apart from aesthetic considerations (you may prefer the olde-worlde, archaic map style that Tolkien used and I would agree that his adopted style better suits the context of their presentation), the software has the ability to create more convincing terrain than our source topos can depict. The topo is the starting point. The goal of ME-DEM is to move things on and take these beautiful map sources to the 'next level'.

Creating a texture. More about L3DT.

I'll gloss over this section as it is covered elsewhere in the official documentation. L3DT has a lot more features than those we've covered here. So far we have really been flitting between the design map (both height and erosion) and the heightmap (if you did the design yourself you'll probably have done that a lot). If you're like me, you may have exported your heightmaps throughout the project into a 3D preview (Leveller, etc). If you don't have access to Leveller you can get update views of your terrain in L3DTVi's 3D view.

To do this you need to follow the L3DT process at least once of creating all the 6 or 7 maps, giving you the texture map as the final step. Once you have these maps, you can go back and make changes to your heightmap (you must re-generate the heightmap and Save group as OVER the previous mgf -ie the one containing the texture). The mgf should open up in L3DTVi2 but the texture will not be accurate to the terrain. This might not matter that much, depending on the disparity between the two mgfs. If you have Leveller (I think I am right in saying that the unregistered version will allow this), make sure your heightmap is generated and active in the current view: File > Export > Active map. Use Terragen for File Format, browse and save. To open in Leveller first resize the grid to 1024 (your L3DT heightmap size) by: Edit > Resize Grid > 1024, then File > Import > Terragen > Browse. If it suits, keep Leveller open in the background and just File > Import -it should overwrite the last terrain. So that's as clear as mud !

Two upcoming features to L3DT will help. Firstly, the ability to apply the last generated contour map to the design map as an overlay. Secondly, a 3D preview or interaction is also on the development plan. A 3D view will radically change the way users work in L3DT (especially having an impact for ME-DEM) and will bypass much of the time consuming process I used to create the final output of the terrain below.


L3DT rev 2.3d Pro now has a Preview Heightmap feature which allows you to preview the heightmap before generating it, using Operations > Heightfield > Generate preview. The preview is at a decreased resolution but is still sufficiently clear and is much speedier. This allows you to flit between the Design Map and Heightmap more swiftly. It speeds this stage of the process by 30-50%.

So we have a design map and a heightmap. If you look in the Operations menu you will see the possibility of a few more maps, potentially 7; 6 if you don't have any sea on your map. For more detialed information on these refer to the L3DT Tutorial Table of Contents > Reference info > Map types. Press the Next button on the toolbar to create the next map and keep repeating this process until you have all of your maps generated. Enjoy the ride ! The end result is a nifty texture map which you can use in your final 3D render. Save your project: File > Save > Save group as. To open your finished terrain in L3DTVi2, use File > Open and navigate to your .mgf (map group file).

Lets wrap up and finally compare the two. The following images were produced in L3DTVi2 with different erosion settings.





Not too bad ! The climate needs to be more chill but that will come later and is really tied to the final presentation anyway and not our focus here. You might try experimenting with the amount and placement of erosion applied at the paint erosion step. To redo that, simply repaint those pixels with a different erosion setting in that design map. If you alter the terrain in any way, always re-generate the heightmap and be sure to complete the L3DT map process with the Next button. That way your texture is made-to-measure. As you can see in the images above, the differences are anywhere from subtle to significant. The sharpness of ridges and steepness of slopes are the most obvious differences. The snow deposits are a good indicator of changes in slope. Even the characters of the mountains change: from sheer malevolent to more mellow. I'm thinking back to Tolkien's personification of Caradhras here when the Fellowship battle with the will of the mountain only to be driven back. I hope you enjoyed this and found it useful. I hope to look into some of L3DT's other features in Part 2, so bye for now !


tutorials/me-dem/intro1.txt · Last modified: 2017/08/31 05:48 (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