Creating terrain heightmaps

  • Thanks Antoine - that's a very useful table.

    It looks as though I may be able to get 10 m and 50 m resolution data from the Norwegian site - but I haven't tried yet. The 10 m data would certainly be good enough for both levels 7 & 9. The 50 m data may not be quite good enough for level 9, though good enough for level 7. Having said that, the default Aerofly resolution is worse than 50 m (not sure?) so maybe it wouldn't be any worse than default?

    As far as I understood, there's no more mesh north of N60? If that's the case, then a 50m mesh (Level 8 may also be compiled) is definitely an improvement.

    I don't know how far north the AFS2 World can be modelled.

    And a good 10m mesh already may provide very satisfaying results.

    Cheers

    Antoine

    Config : i7 6900K - 20MB currently set at 3.20GHz, Cooling Noctua NH-U14S, Motherboard ASUS Rampage V Extreme U3.1, RAM HyperX Savage Black Edition 16GB DDR4 3000 MHz, Graphic Card Gigabyte GeForce GTX 1080 8GB, Power supply Corsair RM Series 850W, Windows 10 64 bit.

  • As far as I understood, there's no more mesh north of N60? If that's the case, then a 50m mesh (Level 8 may also be compiled) is definitely an improvement.

    I don't know how far north the AFS2 World can be modelled.

    And a good 10m mesh already may provide very satisfaying results.

    Cheers

    Antoine

    Last year I tried to add airports in Norway above the 60th parallel and was able to add a few but as I went further North I got a series of weird and distracting vertical lines from the surface to infinity.

    Regards,

    Ray

  • And a good 10m mesh already may provide very satisfaying results.

    Yes of course - I was forgetting - 10 m is actually a very good mesh. It produces excellent results in the USA.

    And yes as far as I'm aware there is no Aerofly mesh north of 60 deg. I certainly can't see any mountains to the north in the distance. I can see them to south because Bergen is only a little north of 60 deg.

    Cheers

    Ian

  • if you used your own data to convert level 7 too instead of using the AeroFly mesh

    Be VERY careful duplicating Aerofly mesh levels.

    I recently experienced a nasty problem that took quite a while to sort out.

    I encountered major "rendering disruptions" that appeared to be repeatable at a specific location (with some variation with altitude and speed). In the ASG29 there was significant warping/rippling of the display for several seconds. In the R22 it was fatal. There were the display ripples plus the cyclic started oscilating wildly ignoring joystick input, resulting in eventual death spiral.

    At first I thought it was some cultivation issue since I was experimenting with dense forest generation.

    Eventually I tracked it down to custom elevation mesh. It turns out there was a tile that for some reason (I blame my evil twin) had level 9,10 and 11 TTH as well as 12, 13 and 14

    Removing the duplicate TTH files eliminated the disruption. It may be that the revised scenery load algorithm worked harder to resolve and render the duplicate mesh. The R22 flight model is more sensitive than the ASG29 so the negative side effects may be amplified.

    In any case duplicating TTH files seems to be a bad idea

    /Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Are you sure it wasn't this issue I warned about on the first page of this thread? Creating terrain heightmaps

    AFAIK any tiles with the same name in your custom folders replace the ones that are part of the default install at load-time, the same way the orthophoto tiles do. I don't think a duplicate mesh is possible for that reason.

    It's also possible there was some bad value or spikes or something in your data you used to make the mesh. Not really sure, but I can say I have many areas converted from levels 9 and higher and I've only ever encountered issues at the outside boundaries where my custom mesh meets the default mesh.

  • This was well inside the area with custom mesh. The TIFF data looks clean (no spikes or walls).

    It was quite reproducible .

    Duplicate 9-11 mesh => problem.

    No duplicate mesh => no problem.

    If nobody else encounters this problem then good.

    I just did not want anyone else to spend a day or two chasing down the same issue.

    /Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Currently I am putting my elevation (TTH) tiles here .....

    C:\Users\ian\Documents\Aerofly FS 2\scenery\elevation

    Is there any reason why I shouldn't put them here .....

    D:\SteamLibrary\steamapps\common\Aerofly FS 2 Flight Simulator\scenery\elevation ?

    Obviously I would put them in a separate folder so that I could move them if necessary. The reason I ask is that my C-drive is rather small in capacity. The D-drive would be a much better place for them.

    Another question ..... I created a base layer of level 7-9 TTH tiles for a level 7 area north of 60 deg in Norway using 10 m data from Høydedata. Initially I put them in the C-drive location above and found that they didn't show at all in Aerofly. The terrain was completely flat - i.e. it was the default terrain at that latitude. It was only when I transferred them to the D-drive location that I saw the terrain as it should be. I noticed that the default terrain tiles on the D-drive are levels 7-10 only. I assume therefore that levels 7-10 have to be on the D-drive anyway to show up. Obviously it would make sense for me to put all levels (7-14) on the D-drive.

  • i want to try and do a 5m dem of anchorage but i discovered it is not in .img format do you know how to do it ?

    It needs to be a geotiff file, which is a specially encoded tiff, if you're following the youtube tutorial I made. Depending on the format, it might be possible to convert it, but I haven't attempted anything like that. Others may have, but in order to help you they'll need to know what format your files are.

    You can specify an additional path for custom scenery, aircraft, terrain etc. in your main.mcf file located in C:\Users\<username>\Documents\Aerofly FS 2\. There is a placeholder for it in the .mcf file already. You just need to put your folder path there. For example, in mine I have this line:

    <[string8][extra_user_folder][V:\aerofly_aux_folder]>

    I have subfolders in that extra user folder which match the structure of the default user folder (C:\Users\<username>\Documents\Aerofly FS 2\). Almost all of my custom stuff is stored there, but the main AeroFly install is on my C drive.

    I'm not sure what the issue with tiles 7-9 would be... I have some converted at that level up through level 14, but maybe it's not actually loading the 7-9 tiles. Given the coarse terrain resolution at that scale, it might not be noticeable whether or not it loads them, unless it's an area that doesn't already have any terrain mesh at all. If I get some time soon I'll see if I can reproduce your issue with mine.

  • Thanks for your reply qwerty42. I was aware that I could specify an additional folder for scenery - I wasn't sure that I could do the same for mesh tiles. However since I would probably put them on the D-drive anyway I was thinking that I might as well put them with the default ones that come with the Aerofly installation.

    Like you I have levels 7-14 in the USA and, as you say, there's no easy way of telling whether the lower ones are showing up in that case. However in Norway (> 60 deg) it's very obvious because the default terrain is flat and at sea level.

    Edited once, last by Ian C (January 27, 2019 at 12:13 PM).

  • I've beeen experimenting with different locations for my elevation (TTH) tiles, and I've found that if I put my level 7-10 tiles here .....

    D:\SteamLibrary\steamapps\common\Aerofly FS 2 Flight Simulator\scenery\elevation

    or here .....

    D:\aerofly_aux_folder\scenery\elevation

    ..... Aerofly takes ages to load and eventually crashes. (Actually, to be more precise, I can put a few level 7-10 tlies in those locations but when I add more I get a crash.)

    If I put the level 7-10 tiles here .....

    C:\Users\ian\Documents\Aerofly FS 2\scenery\elevation

    everything seems OK (almost), The problem I reported in a previous post seems to be just for one one particular set of level 7-10 files that don't show up in Aerofly when I place them on the C-drive. Those particular tiles only show up on the D-drive. Another set do show up on the C-drive. I can't explain that.

    As for the level 11-14 tiles .... they don't cause a crash in any location and do always show up.

    In summary: I've partially solved my storage problem because I can keep my level 11-14 tiles on my D-drive, but it seems I have to have my level 7-10 tiles on my C-drive.

  • Weeeeird... I have no clue why it would behave that way. Have you tried having steam do an integrity check on your base AeroFly install? I wonder if something is corrupted with one of the default tiles... :/

    Edit: Just had a thought... do you have any extra 3rd party DLC? Like ORBX stuff? I wonder if the load priorities on those are dealt with in a different way and could be conflicting?

  • Weeeeird... I have no clue why it would behave that way. Have you tried having steam do an integrity check on your base AeroFly install? I wonder if something is corrupted with one of the default tiles... :/

    Edit: Just had a thought... do you have any extra 3rd party DLC? Like ORBX stuff? I wonder if the load priorities on those are dealt with in a different way and could be conflicting?

    I'll try the integrity check thing - thanks for the tip.

    I do have ORBX True Earth Netherlands - so I guess that could be causing the problem. Also I moved the Netherlands scenery tiles - I don't know whether that's of any significance. I never touched the Netherlands TTH files however.

    What does deleting the "main.mcf" do? I have it at the back of my mind that it's a cure for some types of problem - but I can't remember which!

    Cheers

    Ian

  • I'll try the integrity check thing - thanks for the tip.

    I do have ORBX True Earth Netherlands - so I guess that could be causing the problem. Also I moved the Netherlands scenery tiles - I don't know whether that's of any significance. I never touched the Netherlands TTH files however.

    What does deleting the "main.mcf" do? I have it at the back of my mind that it's a cure for some types of problem - but I can't remember which!

    Cheers

    Ian

    It stores certain preferences and configuration settings, and if it's gone I think AeroFly generates a new one when it starts. I can't remember if joystick mappings are stored in there, so if you try it you might want to back up your old one. Also you'll have to manually re-enter your auxiliary folder location back into it if you regenerate it. I doubt it will make a difference to what you're seeing, but it's so fast to check it's worth a try.

  • It stores certain preferences and configuration settings, and if it's gone I think AeroFly generates a new one when it starts. I can't remember if joystick mappings are stored in there, so if you try it you might want to back up your old one. Also you'll have to manually re-enter your auxiliary folder location back into it if you regenerate it. I doubt it will make a difference to what you're seeing, but it's so fast to check it's worth a try.

    OK thanks - I might give it a go.

    Edited 3 times, last by Ian C (January 29, 2019 at 8:48 PM).

  • i have forgotten how to do height maps for Australia con someone please link me to the instructions?

    thank you

    coxo2436

    As per Kloot's post on page 2 the site for Australian height map downloads is http://elevation.fsdf.org.au

    Using this site, I draw a box around the area I need better height maps for and then select the box next to the "1 Second Digital Elevation Model" to then download it*. It emails you a ZIP file that contains the ready-made GeoTiff file and also contains the co-ordinates that you need to use when editing the .TFW and .TMC files. Refer Qwerty42's good video instructions contained in his post for how best to edit and then relocate these files ready for processing into heightmaps by the Aerofly FS2 Geoconvert tool.

    *I found that while 1 metre Digital Elevations Models available on the http://elevation.fsdf.org.au site are higher quality and much larger files, the resulting GeoTIFF file often has missing large sections of data in your selected area. Missing data results in big visual corruptions in the converted tiles within Aerofly FS2 so you need consistent coverage. I find 1 Second files generally cover the entire drawn area selected and work a lot better within Aerofly FS2 as the height map tiles are complete and consistent. So give 1 Metre models a go to obtain best quality, but if the TIFF file you load is only partially complete, go with the 1 Second models, which are less detailed but generally deliver a more consistent result.

    As suggestions, these new user-generated height maps really improve mountainous areas like the Glass House Mountains in Queensland, Blue Mountains in Katoomba, Uluru, and the whole Illawarra escarpment. I've now posted some screenshots using my user-made Australian height maps in Aerofly FS2 in the gallery.

    Edited 5 times, last by AmateurPilot (February 3, 2019 at 4:05 AM).

  • USING ELEVATION DATA FOR GREAT BRITAIN - A TUTORIAL

    I'd like to start by thanking qwerty42, crispy136 and TomSimMuc for their tutorials on the USA, Australia and Norway respectively. I'd never have been able to come up with this stuff on my own without having previously studied their methods.


    WHAT YOU WILL NEED BEFORE YOU START

    • Aerofly SDK tools (inc Geoconvert)
    • QGIS version 2.14.21 (Essen) - available here. [I can't figure out how to make it work with the latest version.]
    • The mesh_conv.tmc & mesh_conv.bat files - as for any other region. (qwerty provided these in his tutorial package.)
    • Some means of knowing where the Aerofly tiles are in terms of latitude and longitude. I use my own spreadsheet (with formulae courtesy of rodeo) but I believe there is another tool available for download on this forum? AeroScenery is also helpful for this purpose.


    DOWNLOADING THE DATA

    Broadly speaking there are 2 different types of free data available for GB. I'll say a little about them and explain how to download them. The data is usually organised by Ordnance Survey 100 x 100 km grid squares, which have 2-letter name such as SU, TQ, NY etc and are further subdivided using numbers. There's an explanatory map here. Both types of data are in the same format (.asc files) so the PROCESSING THE DATA section which follows is the same for both.


    1. Ordnance Survey 50 m data "OS Terrain 50" This data is complete for the whole of England, Wales and Scotland and can be downloaded all in one go.

    • Go to: Ordnance Survey: OS Terrain 50.
    • Select ASCII grid and GML (grid) in the supply format menu.
    • Tick download, then scroll to the bottom of the page and click continue.
    • Fill in the form and you will be sent an email with a download link.
    • Download and unzip. The unzipped folder contains the .asc files grouped according to OS squares.
    • You may not be particularly interested in this data since higher resolutions are available, but it is actually a considerable improvement on the default mesh and can be used to cover large areas very quickly. [UPDATE: I'm getting occasional faults (deep trenches) which I think are caused by this data. This is surprising since it comes from the Ordnance Survey. I've corrected the faults by deleting the odd level 11 TTH tile here and there.]

    2. High res data from various sources (2 m, 1 m, 50 cm and 25 cm) This type of data tends to have a lot of "holes" in it and coverage may be far from complete. There are full details below on how to download the English data plus links to the Scottish and Welsh data.

    • For the English data go to: DEFRA Data Download
    • Zoom in on the map until you see the squares and click the down arrow at the top right so that you get the Download your data panel.
    • Select an area using the freehand drawing tool. You really want a square or squares but the only way of selecting them seems to be to draw a rough circle around them to begin with. The squares are 5x5 km, so a level 9 sized area is roughly 100 squares. However the site won't allow you to select that many in one go.
    • Click get available tiles. There are 3 drop down menus here with a variety of choices, so feel free to experiment. In the end I chose LIDAR composite DTM from the top menu and DTM 1M from the bottom menu. The DTM 2M data has slightly better coverage - but there's not a lot of difference. The DSM options are probably best avoided - they just seem to give random lumpiness in built up areas.
    • Click your square(s) on the list, download and unzip.
    • This data is excellent where it exists but you'll need to avoid geoconverting the "holes" otherwise you'll get flat areas at sea level in your landscape, which is not a good look.
    • Scotland: (1) Scottish Govt: Remote Sensing Data (GeoTIFF format - ie different but simple enough to process - coverage rather sparse) (2) More Scottish data (.asc format - sparse coverage)
    • Wales: Lle Geo-Portal for Wales (.asc format - similar coverage to the English data)

    Ordnance Survey 5 m data OS Terrain 5 looks promising since it is complete for the whole of Great Britain. However, when I made enquiries about obtaining a free "Data Exploration Licence" Ordnance Survey told me that the licence was only intended for commercial users who might eventually become paying customers.

    News is that ORBX are working on GB scenery. However the mesh creation I describe isn't really wasted effort because you will be able to combine the 1 metre etc mesh with ORBX's mesh (which will probably be either 5 or 10 metre.)


    PROCESSING THE DATA

    Whichever of the above data sources you use, you will end up with a large number of .asc files - so from here onwards the procedure is similar for all the data types. The first step in the procedure is "merging" them. You need to do this so that they form a big enough heightmap to be worth geoconverting. QGIS won't let you merge more than about 100 .asc files at a time, but you can always merge them in batches and then merge the resulting TIFs if you want a bigger area. If you find that the .asc files are in multiple folders you can use Windows search (for example) to find them all, copy them and put them all in one place. (Search for "asc".) This makes life easier when you do the merging.

    • Open up QGIS and select Raster > Miscellaneous > Merge.
    • Click the input files select button, navigate to the folder where you have your .asc files and select all the ones you want to merge. You also have the option here to choose input directory instead of files and to check recurse subdirectories. Like "search", this is also useful if the .asc files are in multiple folders.
    • Click the output file select button, give your file a name and choose somewhere to save it.
    • Click OK and wait. The Coordinate Reference System Selector box should appear after a short while. When it does appear, choose OSGB 1936 / British National Grid EPSG:27700 from the long list of CRS's in the 3rd panel and click OK in that box. [You can use the filter to search for it. After you have used the CRS once it will subsequently always appear in the 2nd panel from the top.] The merging should then go ahead to completion. You should see a heightmap in the main QGIS canvas when you've closed all the boxes obscuring it (OK, OK and close). [If you are using 1m data etc this is the point where you'll be able to spot the "holes". They show up as completely black areas in the heightmap.]
    • Right click on the bold, underlined title of your merged file in the bottom left panel of QGIS, and select save as. In the save as box you should have: output mode = raw data and format = GTiff - but you need to change the CRS now to Default CRS (EPSG:4326 - WGS 84). You should now see latitude and longitude values in the extent panel below, and resolution values in the panel below that. Use Browse to enter a name for your merged file and choose a place to save it. Click OK to save.
    • 1 metre etc data only: The 1 m data has lots of black (no data) areas in it, so you need to crop rectangles of good data from a TIF of level 9 size or larger, avoiding all the "no data" areas. (1) In QGIS: select layer > add layer > add raster layer. (2) Select the merged TIF that you saved as ESPG:4326. (3) Select raster > extraction > clipper. Select a destination for your output file and give it a name. Clipping mode = extent. Select a good rectangle from your Geotiff. Click OK and wait for the processing to finish. (4) Repeat 3 until you have selected all the good bits of your geotiff. You may end up with dozens of cropped bits of geotiff. (5) Select raster > conversion > translate, Check batch mode. The input directory is where you have your multiple cropped geotiffs. Output directory = input_aerial_images. Check creation options, click "+" and type "tfw" under name and "yes" under value. (6) Click OK and you should end up with all your cropped TIFs and corresponding TFW files in the input_aerial_images folder ready for geoconversion.
    • 50 metre data only: Follow steps (5) and (6) above, except that you only have one TIF (probably) and only want to produce one TFW file.
    • Edit your mesh_conv.tmc in the usual way. I assume people have some knowledge of this, but if you don't I can point you in the right direction. If you are doing a whole level 9 or 10 tile then you can use your preferred method of snapping to that tile area. I actually use Aeroscenery to get the level 9 tile co-ordinates for the .tmc file. I tick generate AID/TMC files and then copy and past the 2 lines of code that contain the coordinates from the Aeroscenery TMC into the mesh_conv.tmc. I also go to settings > geoconvert in Aeroscenery and change shrink TMC grid square by from 0.01 to 0.005 degrees. (I find that with 0.01 I sometimes have missing tiles.) The default mesh already has level 7-10 elevation (TTH) tiles. My current thinking is to use the 50 m data to create level 11 tiles for the whole terrain, and the 1 m data (where it exists) to create levels 12, 13 & 14. (Obviously many of these latter files will be masked because they come from lots of cropped geotiffs.) Anyway, the principle is to use separate levels for different resolutions.
    • Finally double click your mesh_conv.bat to run Geoconvert, and your TTH files should appear in the scenery\images folder as usual.
    • You can put the TTH files here: C:\Users\yourname\Documents\Aerofly FS 2\scenery\elevation - or you may have some alternative place for them. (I personally have them on the D-drive now.)

    Edited 72 times, last by Ian C (March 8, 2019 at 12:18 AM).

  • As promised, these are the comparison screenshots. They show the Seven Sisters - vertical chalk cliffs on the SE coast of England. The first shot is with the default mesh. The cliffs look like little more than a sloping white beach. The second shot - with the 1 metre mesh - shows them as they really are.

    Edited once, last by Ian C (February 25, 2019 at 5:53 PM).