Flight Unlimited III high resolution terrain processing workshop

noncommercial FU3 support page - just to keep FU3 flying !

Using the GeoTilesViewer tool


The GeoTilesViewer Version 2.0, 23.Jan.2002:
In the final state this program will work like Gideon's ResourceViewer, but for geotiles.tag files only. Actually you can view, import and export classification maps and new in this version also import the elevation of the terrain from a .RAS input file created with methods used also for Fly! / Fly!2k in the terrascene project.

The GeoTilesViewer Version 2.1, 8.Apr.2002:
Importation of elevation using .RAS files has been stopped, to complicated handling and difficult to modify small parts of elevation inside of maps. From now still using NIMAMUSE Raster Importer 2.1.3 at www.nima.mil using lat / long for a specific group of megatiles (6x5) but usable just 5x4 inside a border of 0.5 megatile. conversion is stored as ascii float grid generating 2 files 1 header 6x5z20.hdr and the ASCIIfloatGrid data 6x5z20.fil. this files are imported when no node is selected and both files exists in the same working folder. output is then 6x5z20.tga. With a paint tool cut 257x257 squares from them to get the import targa files for each megatile.
6x5z20 stands for 6x5 tiles with zoom 20 for fractal 2.2 interpolation.
In the NIMAMUSE distribution is a fusion.exe program to display elevation maps saved in the MUSE format. just to compare results.
6x5z20.tga
The GeoTilesViewer Version 2.2, 16.Jun.2002:
Elevation error of version 2.1 is corrected in this version 2.2. At the generation of the 6x5z20.tga you can define a minimum terrain level to be set to 0. When you load a coastline from NIMAMUSE Raster Importer the sea is not 0 but something between 20ft and -10ft. Adjustment of the coastline is the near impossible. Setting a value (16 ft) in the sea level field before exporting the terrain elevation, will set all values below 16 to 0 making a better coastline. You can choose another value. This temporary sea level is not stored ! the reference sea level is still 0.
elevation with sea level=0     elevation with sea level=16
When cutting the 257x257 single e0xxxx.tga for each megatile remember that the top row is the first row of the next to the north megatile and the rightmost column is the first column from the left of the megatile next to the east. so each megatile of 256x256 elevation pixels must have a overlap top line and rightmost column. For the fine tuning start cutting anywhere in the half megatile border.

Using Genquadrant for the terrain texture maps and GeoTilesViewer for the generation of your own GeoTiles.tag file the creation of new high resolution region for FU3 becomes as easy as making airports with FLED.

The "making of a new region" tutorial is on the way.

GeoTileViewer is a tool to view and modify the large geotiles.tag file located at FU3dir/Regions/seattle/geos/ and FU3dir/Regions/sanfran/geos/ or in a new region folder or in any other place.

You can download GeoTilesViewer v2.2 95KB right here. You are using this freeware tool at your own responsibility !

GeoTileViewer 2.2 tool
    view of level 5 elevation for the current selected apao megatile of the UK London region

Backup your geotiles.tag files before use of GeoTilesViewer !!

GeoTilesViewer will modify the GeoTiles.tag file during import, delete and add functions. there is no save/cancel or undo functionality. After each change the files must be reopen again by clicking in the tree-window showing a single folder. Functions are activated after file open only.

Unzip GeoTileViewer.exe and move this file to your

...Flight3\Regions\Seattle\Geos\ or ...Flight3\Regions\Sanfran\Geos\ folder.

Start by doubleklick GeoTilesViewer.exe from this location. The geotiles.tag file must reside in the same folder.

A safer way for tests is:

create a test folder with the copy of the geotiles.tag file and the GeoTilesViewer.exe and work totaly outside of FU3.


Just view:
Open the file if still closed (click in the tree area), click on the tree nodes to open it, select the desired level l0xxxx, l2xxxx, l5xxxx. The map is displayed in the right gray part, depending on the view elevation checkbox as class or elevation map. After checkbox check/uncheck first change your selection to another level and back to the current level to force display change.
The Sea level Field:
A virtual Sea level is defined in the region.cfg file for each region ( Seattle = 109, Sanfran = 100). In the original FU3 GeoTiles.tag file this Sealevel is not registered, but in my new version it is inserted in a free space of the blank.geo file, just after the name. This Sealevel is show in this field. A change of this value will can be used for a single import, but normally don't use it. Define the Sea level of a new region using the reset function.
Blank Tile:
Reset is for the settings of the blank megatile base of a region. The blank megatile is used inside a region as substitution for missing megatiles.

Create a new region with a new geotiles.tag file always using this BlankGeoTiles.tag file(44KB) and add the new tiles as needed. To use this file in FU3 rename it to GeoTiles.tag and place it in the /geos folder of the region.


Terrain Elevation: new elevation import/export as Targa picture in version 2.1
For the import of a megatile node (as example for node aaaj) 1 e0aaaj.tga file must exist:
e0aaaj.tga is a targa 24bit picture showing the elevation.
Changes in elevation are possible using a paint tool. Choose wanted elevation using the colorpicker tool. the elevation code is in feet as follows:

hc is height from heigtfield in ft -> colorvalue 00bbggrr = hc + hc * 16384

color is 24Bit value bb gg rr ( 3 Bytes for blue, green and red ), gg and rr are the height value. Storage order is inversed, so the value gg is for 0 to 255 and rr ist for the upper value part. rrgg covers heights from 0 to 16384 ft, bb is a overflow area used to enhanced color for better visibility of the graphic. At import just the rrgg part is used. The factor for the color enhancement is not important.

CAUTION:
by exporting and reimporting of original megatiles from Sanfran and Seattle you will loose Elevation quality ! There are still unsolved calculation inside geos as bounding box parameters and the orientation of the triangel used in elevation. If you just want flatten the airport area then use the classification method below. For Switzerland and UK region reimporting of tiles are harmless, the region was build that way.


Import is for existing nodes, so first create a node with the Add Tile function. Enter a new node name between aaaa and azaz and the height of this megatile. The height is used to generate a flat megatile first. After reopening of the GeoTiles.tag file select the new generated node and then import the elevation. This will modify all heights fields and quads of the megatile for the levels 0, 2 and 5. After import of the elevation, all fields have the land-class 0 (green). during the import computation of the height fields are
height field value = ( height + Sea level ) * 4 ( units are ft, not meters)
The multiplication by 4 is the 2 bit space shift for the classification.
during flight in FU3 terrain height in ft = ( height field value / 4 ) - Sea level. The values are in ft.
Import of the classification is always the last step.
repeat for each megatile of the region. exact descriptions and examples are on the way...
The Del Tile function will delete the selected tile with all levels.
For export of the terrain height just select the level5 map node and click on Terrain Elevation Export. you get a e0xxxx.tga file inside the working folder, where xxxx is the selected node name.
This targa file is directly usable for import.

Seattle Tile aaaj Seattle tile agaa

Terrain Classification:
In the classification functions at the top right there is no change except that during import of classification maps a Airport level entry dialog will appears to solve one of the main problem for the placement of an airport with the runway models, the need of a totally flat zone. The new classification maps has now a additional class with the color 3 of the tga palette - yellow - to define an airport area. This terrain class is activated in this tool only. after import the same area becomes urban class. During the import as soon the first yellow pixel is processed a dialog appears requiring the level of the airport in ft. Any yellow point in the classification map will be modified to these height. If you need 2 or more airport areas with individual heights in one megatile, then make 2 copies of the classification maps for this megatile and define 1 airport in each of them. Import this classification maps for the same megatile node in any sequence. Use this example classification map as template for your maps.
classification example with airport area(5KB)
Annemasse airport as example 

The exported classification maps are placed in this folder and named:

tlc0.tga Level 0 terrain classification 40x40 Seattle or 40x44 Sanfran
tlc2.tga Level 2 terrain classification 320x320 Seattle or 320x352 Sanfran
tlc5.tga Level 5 terrain classification 2560x2560 Seattle or 2560x2816 Sanfran

exporting maps needs a lot of time, depending on the power of your pc. About 3 minutes on a Pentium III 800MHz.

Exported single megatile maps are placed in this folder and named for megatile aaaj : cl5aaaj.tga

You can now modify this 257x257 Targa picture with a picture editor. Do not change colorpalette and use red,green,blue and yellow only.

0 land non urban (green), 1 water (blue), 2 urban (red), 3 flatened airport zone (yellow)

do not use other palette colors than 0,1,2 or 3 ! take the colorpicker tool for colorselection from the map. Do not change the size of the map (257x257). The top row is the border row of the next to the north megatile. The top right column is the first column of the next to the east megatile. The remaining 256x256 square is the current megatile.

So 1 classification pixel covers a texture area of 16x16 pixels, thats 64mx64m in real world. This area can be a mix of land, water and urbanisation but there ist 1 class only for each 16x16 terrain area. This as explanation why the border of a lake is never exact when you navigate on it.

to export a single megatile map select the level5 map and click on "export current map" Export is for level 5 only, the levels 2 and 0 are generated internaly using level 5 maps.

to import a single megatile map and replacing the current classification of the megatile.

1. have a map cl5xxxx.tga , with xxxx as the megatile name in the same working folder.
2. open GeoTilesViewer.exe
3. open geotiles.tag
4. select inside the tree the megatile with the same name xxxx
    but do not select a level, just the megatile node with size: 0, watch the current selection !
    The filename must match your selection, the file must exist in this folder.
5. click on "import current map" this will generate level 0,2 and 5 for this megatile.
6. now choose a level and take a look on your new classification map

~tempGeotiles.tag and ~tempNewGeotiles.tag are just temporary workfiles.

Version 2.0 is now prepared for larger regions like Switzerland going from aaaa to azaz

You can generate classification maps using your map pictures and GenQuadrant.


The full level 0 classification map for the Seattle region and Sanfran region as exported with GeoTilesViewer.

Seattle classification map level 0  Sanfran classification map level 0

    Level 0 of geotiles are used with level 6 and 7 of the texture maps


and here the reduced picture of the level 5 maps (about 6MB), there is no download for this maps, use GeoTilesViewer (65KB) to create it.

Seattle classification map level 5  Sanfran classification map level 5

    Level 5 of geotiles are used with level 0, 1 and 2 of the texture maps


new December 2001

The GeoTiles.Tag is a very large file of about 40MB. Here is the smallest version that will work BlankGeotiles.tag This is the smallest possible GeoTiles.tag file for FU3. There are just the blank megatile definition in this minimum set.

This will help when you start building a new high resolution region and want first check your region without elevation. With a later version of GeoTilesViewer you will start building a region using this minimal file and appending new megatiles with elevation and classification.

FU3 will substitute all missing megatiles with the blank-megatile. Your terrain is then very flat, but not mathematically flat. Avoid absolute uniform highs then this will generate strange views by the FU3 terrain-engine

so better use this one ;-).download BlankGeoTiles.zip 44KB

This BlankGeoTiles.tag file is also the start base for any new region project.

flatcrash.jpg

under construction


Information: André Meystre
back to FU3 Terrain Workshop      next to Fixing the Coupeville Nolf ground problem