Create mesh using Global Mapper
In this tutorial you will learn how to use Global Mapper to create a BGL which includes terrain data information (called mesh) for FS2004 and FSX/P3D.
Requirements for this lesson
In order to follow this wiki article you need at least:
- an installed Global Mapper from Blue Marble Geographics.
- one (or more) elevation data files. You can get them for example via USGS's EarthExplorer. For this example we use the SRTM 1 Arc-Second Global data for the country Luxembourg
- around 15-30 minutes of time (depending on how fast you get through this tutorial and how fast your PC is).
- depending on your needs either the FS2004 and/or FSX and/or P3D SDK.
After downloading the files from USGS's Earth Explorer, I have these four files: n49_e005_1arc_v3.tif, n49_e006_1arc_v3.tif, n50_e005_1arc_v3.tif and n50_e006_1arc_v3.tif. First thing to do is to put all these four files into a new folder which we will call "Test". In this folder we create a new folder called "Backup". Into this "Backup" folder we put a copy of the original files, in order to have them saved when something does not work as expected. Your folder will look now like this:
...\Test\n49_e005_1arc_v3.tif ...\Test\n49_e006_1arc_v3.tif ...\Test\n50_e005_1arc_v3.tif ...\Test\n50_e006_1arc_v3.tif ...\Test\Backup\n49_e005_1arc_v3.tif ...\Test\Backup\n49_e006_1arc_v3.tif ...\Test\Backup\n50_e005_1arc_v3.tif ...\Test\Backup\n50_e006_1arc_v3.tif
With this step done, let's start Global Mapper.
Inside Global Mapper
After Global Mapper successfully started, click on File and then on Open Data File(s).... Select now the four files which are in the "Test" folder. In my case I selected the following files: n49_e005_1arc_v3.tif, n49_e006_1arc_v3.tif, n50_e005_1arc_v3.tif and n50_e006_1arc_v3.tif. After clicking on Open you will be asked which type the files are. Either you click four times Yes or once Yes to all. The files will now be loaded into Global Mapper and Global Mapper will also render the loaded pictures. This may take a little while. When the loading and rendering process is done, click again on File and then on Batch Convert/Reproject.... A new window appears and you need to select the file type to convert from. In that window select GeoTIFF (Imagery, Raster Maps, and Terrain) and then click OK. After this, a second window appears asking you the file type to convert to. Here we need to divide between FS2004 and FSX/P3D:
-> If you are creating mesh for FS2004 you need to select BIL (16-bit Elevation Samples).
-> If you are creating mesh for FSX/P3D you need to select GeoTIFF (16-bit Elevation Grid).
After selecting your correct file type to convert to, click OK. An additional window will show up and here you need to pay attention since missing one part of what we do next may mean you work is worth nothing. We go through the window from left to right and from top to bottom. So let's start.
In that big white window on the left are listed all our source files which are converted according to the settings we choosed and which we choose soon. In order to let Global Mapper know what our source files are, we just need to click on Add Loaded Files and Global Mapper uses the files which we previously opened. If we did not loaded the files as previosuly described into Global Mapper, we would simply click on Add Files... and select the corresponding files. Moving along to the right side of the window we can now select the output directory. It is highly recommended to do this since it allows people to distinguish between the raw original files and the converted files. So we specify an output directory. To do so, we either click on Specify output directory or on the button Change... Both do the same. Select a subfolder and click on OK. The file names can be changed but I do not do it since we do not really need this. Due to this we can leave the settings under File Names as they are. The settings under Projection should also be left like this. The two following buttons Set up Gridding (i.e. Tiling)... and Set up Sample Spacing... can be left like this. The Horz Datum should be changed to WGS84. The Vertical Units should be Source Units. In the box under the Vertical Units settings we need to check that the following settings are thicked:
- Force Square Pixels in Output
- Fill Small Gaps in Data
- Show Batch Conversion Progress
The last setting is not really needed but it is quite interesting to see the conversion progress. After doing all these steps, we can finally click on the upper right part of the window on OK. It may be that Global Mapper now asks again what filetype the loaded files are. You can either click four times Yes or once Yes to all. Now Global Mapper converts the files we selected according to the settings we selected. After the converting process is done, 4 new files have been created. In my case they are named:
The files are now ready to be used with resample.exe.
Making our elevation data ready for the flight simulator
As I want to use my eleveation data in FSX, I need to use the resample.exe with the FSX SDK. If you want to use the elevation data in FS2004, follow the FS2004 Terrain SDK rules stated in the Creating Terrain.doc-file. The instructions for P3D should be the same as for FSX.
In order to compile our BGL for FSX, we need first of all to create the Elevation_Data_Brest.inf, so that resample.exe knows what it has to do and how. Following the SDK documentation, the Elevation_Data_Brest.inf should look like this:
[Source] Type = MultiSource NumberOfSources = 4 [Source1] Type = GeoTIFF Layer = Elevation SourceDir = "SourceData" SourceFile = "n49_e005_1arc_v3.tif" [Source2] Type = GeoTIFF Layer = Elevation SourceDir = "SourceData" SourceFile = "n49_e006_1arc_v3.tif" [Source3] Type = GeoTIFF Layer = Elevation SourceDir = "SourceData" SourceFile = "n50_e005_1arc_v3.tif" [Source4] Type = GeoTIFF Layer = Elevation SourceDir = "SourceData" SourceFile = "n50_e006_1arc_v3.tif" [Destination] DestDir = "Output" DestBaseFileName = "Elevation_Data_Luxembourg" DestFileType = BGL LOD = 4,11 FractionBits = 2
To compile now the BGL with the elevation data, simply drop the Elevation_Data_Luxembourg.inf on resample.exe. Resample.exe is starting to compile the Elevation_Data_Luxembourg.bgl. This may take up some time according to your computer specifications. When the compiling process is done a file called Elevation_Data_Luxembourg.bgl can be found in the Output folder.
That's it! You now have successfully created a BGL which includes elevation information for FS2004, FSX and/or P3D.
If you need any further assistance or if you have any suggestions, feel free to post it in this discussion thread
To close this little tutorial I want to thank everyone who posted corrections, tips, hints,... in the discussion thread in order to perfectionate this tutorial.