Howto:Create custom terrain
| Work in progress|
This article or section will be worked on in the upcoming hours or days.
See for the latest developments.
Look here an example of the achievable result.
Let's take a look at the Finistère in Brittany, Western France: if you click , you will quickly see and understand how the Finistère county is know of FlightGear. Some towns/city (red), a few forests (green), etc. Overall, it is not a very good resolution: a lot of angles, the detail level is not that good, some towns are missing. If you want a better definition on ground, there is some work to be done! The goal being to obtain something like this:
You will immediately notice the improvement to the ground. When flying, the difference is huge. Moreover, this enables the autogeneration of cities, trees, farmland, and so on.
Downloading the Landsat pictures
- Click Map Search.
- Tick the ETM+ box (left column).
- Click on Update Map on the right bottom of the map.
- Click on the Place tab on the upper side of the map, in order to do a search by place, or you can do a search by latitude/longitude.
- In the Place field, type Amsterdam, Netherlands for instance.
- Now click the button with the mouse and the small + sign. This will allow you to select image tiles. Select all images that cover your area of interest, in our example this is just one image.
- Click on Preview and download. This bring you to a selection page were you can choose what image you want to download. It is likely that there are pictures available from different dates for your area. Picking the most recent one is best, for known reasons.
- Clicking the ID will not bring you directly to the download page, first you have to click the Download button.
- Download the _nn80.tif.gz file (if this is not available, try an older image).
- Uncompress the .tif.gz files in the directory of your choice.
Working with QGIS
Using a GIS software gives you the opportunity to realize a full range of interesting operations: modification of VMAP data, updates on the ground classification, etc...
- If you run GNU/Linux, you can install QGIS with your usual package repositery manager; see here. The process is easy and not described here, but it is one the QGIS website.
- If you are running Windows, download QGIS from here (Windows - Standalone).
- Launch QGIS.
- Click on Layer > Add a Raster layer.
- Modify the filter to search for *.tif files.
- Add the TIFF file you have just downloaded.
- Click on Layer > Add a new vector layer or on the corresponding icon. A dialog should pop up.
- Make sure the file type is an ESRI Shapefile.
- Make sure the vector type is set to polygon.
- You need to create a data column for this layer. Create a column called 'class'. Make sure it is a string column. Add it to the attribute list by selecting the Add Values Manually button. The 'OK' button should now be available for you to select. Select 'OK'.
- There should be a dialog box prompting you to save your vector layer. Save it in your scenery directory with your GeoTIFF. (This is not required but significantly helps organization.)
- A projection box should pop up. Select 'WGS 1984'. After all, that is the globe model used in FlightGear.
- Your vector layer should appear in the left-hand toolbar. You are ready to begin digitizing.
- Select the newly created layer in the layer list, toggle editing (Layer > Toggle Editing) and finally select Capture Polygon from the same menu/toolbar.
- With your mouse, left-click on a point at the southwestern edge of the small island.
- We now want to trace the outline of the island. Move your mouse to another point below the first point and click it again. Your mouse should show a red line. The points should not be redundant - for instance, as long as the line between two points is straight, there is no need for another point in between the two.
- You will want to digitize features in a circular manner to avoid problems. You can always go back and add points later. With this in mind, move your mouse to a third point on the island. A small triangle should form, representing the polygon which would result if you decided you were done with the polygon.
- Continue outlining the island by clicking along its shoreline. When you are on your last point, instead of left-clicking, right-click. QGIS will finish the polygon.
- A dialog box will pop up, asking you to type in the value for 'class'. Since this is a shoal, existing of just sand, type in Sand. This step is important - it is how you know what each polygon should be mapped to in our finished scenery. A list of "allowed" materials (and thus classes) is available here.
We have been working with UTM coordinates so far. To generate scenery that can be used in FlightGear we need to convert the shapefiles to the latitude/longitude format.
- Download fGIS and install it as described.
- Open an empty project and visit Utilities > Shapefile Projection Utility.
- Look up your projects UTM coordinate through this image. For Texel this is 31U, so we choose UTM31 in fGIS. If your project is located south of the equator, you tick the S box.
- Set the Output Shapefile Project to Lat./Lon..
- Now click the Input Shapefile button to load the shapefile that we exported from qGIS.
- Using the Output Shapefile button we decide where we want to store the lat/lon shapefile. This has to be a non-exisiting file, so remove before updating.
- Click the Convert button.
Please continue with TerraGear to generate the landclass into useable scenery.