Using FSRail to generate micro mesh scenery

The scenery that comes with Flight Simulator 2000 originates from a mesh with about one 1 km = 30 arc seconds grid size. While this may be good for the bulk of scenery there are areas were a much higher terrain resolution is required. The consequences of the low resolution are rather small slopes, that makes tunnels very difficult, and narrow steep valleys that just go wrong with the coarse mesh. Look at the Rhine river.

Higher resolution mesh data (typically 5 arc seconds) are available for free only for a small part of the world. The sceneries obtained from them with the Terrain SDK from Microsoft show a clear improvement and show that the new terrain engine is powerful, provided your system is powerful enough and you have enough memory. What to do with the rest of the world?

The approach described here is intended to give very high resolution mesh scenery for small areas of special interest like a valley or the area along a railway line.

High resolution geographical information is available on topographical maps which often can be found a in digital form. For Germany the best suited digital maps (TOP 50) are in the scale 1:50000 where 1 km is 2 cm on the screen. Since typically 50 pixels belong to a cm on screen the resolution of these maps is 20m, which is about 1 arc second. Lines of equal altitude have a 1 or 2 pixel width so the information on these maps is comparable to a 2 arc seconds DEM.

So a way to transport the altitude information from such a map to a DEM is the only missing item to start real world scenery design. A tool that can do such transport of data from a bitmap to scenery design is already in FSRail from the beginning, its called markers. Markers are identified by coordinates and colors. So new FSRail objects were invented called trigonometrical points. Trigonometrical points are identified by their coordinates and altitude. So the bitmap interface got extended to produce optional markers or trigonometrical points. A routine was written that interpolates a DEM from this list of trigonometrical points. The DEM gets written and an INF - file created with the exact information, you start the SDK tools and - bingo - the terrain is were you clicked it to be.

So, how do you use it?

First into the FSRail menu ..\terrain, copy the three programs from the Terrain SDK: resample.exe, tmfcompress.exe, tmf2bgl.exe. Edit the file Terrainmaker.bat to copy the bgl file to your location of FS2000. Note: It seems you always have to leave FS2000 before you can change any terrain file. With self-made terrain files I often found FS2K crashed while reloading scenery.

FSRail 1.15 contains a new menu, called mesh. This has only three items:

With the first, usable in normal and in bitmap mode, you define the altitude of the following trigonometrical points. It also switches the bitmap mode to interpret all following mouse clicks to the map as trigonometrical points until you leave it by cancel or select a marker color, then the program will add markers again. The second, only in normal mode, allows adding single individual trigonometrical points to correct special areas. Trigonometrical points are drawn as small rectangles, the color depends on the altitude.

So after loading the bitmaps start by entering the altitude of the highest mountains and click to them. Then select the altitude of the lines of same height, and follow them by clicking to them. The distance between two clicks should be smaller than the distance to the next line. Follow all lines of one altitude, then switch to the next lower one and follow them. Obviously the more lines you follow, and the more points you use, the more precise the result, but for most purposes it will be sufficient to select the lowest lines, the highest lines and one to three in between. The time the next step takes only depends on the number of clicks, not the framerate you achieve later. After some minutes you've got a long list of trigonometrical points; your screen may look like this after a right click:

Now you start DEM which asks for the DEM size. You can choose between 64x64 and 512x512, then press ok. This may take a while. If you have only a few trigonometrical points defined go and have a cup of coffee. If you have thousands, and 256x256 or even 512x512 selected, then take a good bottle of champagne and drink to my health. After a while, and before the bottle is empty, you will have a dialog that proposes a value for LOD, and two files will have been created:

..\terrain\terrain.dem and ..\terrain\terrain.inf.

Run the command procedure Terrainmaker.bat. If tmf2bgl complains about no DEM data, edit ..\terrain\terrain.inf and increase the value of LOD in steps of one until it succeeds. The meaning of LOD (Level of Detail) can be found in the following table taken from the SDKs manual. I read it as follows: a scenery with LOD=11 must span at least 4892x4892m. On the other hand I found a scenery of 9x6 km wouldn't work with LOD=11 but needed LOD=12. So you maybe just try the best value or try to understand the SDK manual yourself. FSRail creates a value that, to my experience, works, please report.

Now start FS2000 and look at the result. The example above (with exclusion of the default scenery and repaint of the river) now looks like:

To my knowledge there is no way to modify the textures of the ground mesh, so you cannot change the fields to grapes, but did you really expect this to be your major problem today?

The DEM produced by FSRail in this version is 64 x 64 to 512 x 512 point DEM, so its still rather small. Following the above calculations for 256 x 256, it is 4x4 pixel or 80x80m, so approximately 3 arc seconds. If you need a better resolution, this proved to be so memory intensive that is cannot be implemented into a program that is intended to run in parallel with FS2000. A separate program will be available that allows to create DEMs of 2048x2048 points with a fast, memory extense algorithm and can import USGS DEMs as startup for your work.

This is a very new tool and I have to gain experience with it like you all.

Some things I observed:

If a circle of more than four trigpoints of the same height is laid, with nothing in between, there will be a flat plateau - very convenient to build a railway or city. If you want a typical hill shape place one to three higher points into this circle.

The mesh typically does not start to be visible at its boundaries but some seconds inside. To avoid steep changes of terrain when changing from the low resolution scenery to high resolution mesh, place a few trigonometrical points outside the area you want and align them with the default terrain.

This version only creates one DEM and INF file called terrain.dem and terrain.inf. You should save them manually under another name before you start another one. File menus, etc, will be added when more experience with the usage of this tool exist.

If you want to place concave ground polygons - rivers as example - using FSRail, please take care that the terrain at the central point has the correct altitude, otherwise you will get flying or diving plygons. Note that the size of the mesh terrain seems to be smaller than your boundaries, so make it bigger than you want it. At LOD=10 I observed that the boundaries must be 5 minute outside to display everything.

Writing this tool, three wishes appeared:

  1. Make higher resolution DEMs
  2. Import other file formats
  3. Make the computing algorithm faster

It turned out that all three wishes could be satisfied with the expense of many MB of memory only. Such a big program can not run together with FS2000. So a new program was developped called FSMesh.