Creating terrain heightmaps

  • Let's do a fast calculation:

    earth circumference divided by arc second:

    40.000.000 meters / 1296000 (360 degrees*60 minutes*60 seconds) ~~ 31 meters/second.

    So 1/3 arc second gives us approximately a 10 meters elevation grid. Right?

    Rodeo

  • great ! thank you qwerty42 !

    I've done a quick test with LIDAR data converted to geotiff but with no success at that time :( .tth files are generated by geoconverter but I don't see any difference in sim...

    Have you an idea of what type of Geotiff are supported by geoconvert: 16 bit or 32 bit Geotiff ? Raster Geotiff ? Elevation Grid Geotiff ?

    here a screen of .png file generated with .ttc files:https://tof.cx/images/2018/03…878c1833d0e.jpg

    Hi vogel69! I'm not sure if there are other formats that geoconvert works with, but I can say that the output of the tutorial demo is a 32-bit linear grayscale tiff file if you open it in Photoshop. Because of this, if you just try to open one of the output tiffs with something like Windows photo viewer, you probably shouldn't be able to see anything in the file.

    All those stripes in your png files, if that really is elevation info, looks a lot like the same issues I was having at first when I was trying to use the "Rendered image" save option in QGIS. This writes out an RGB file instead of the 32bit grayscale file and will give you a huge number of 30,000ft tall spikes in AeroFly.

    Also I'm reading up on the geotiff spec--it looks like with libgeotiff we can embed geotiff tags into any appropriate tiff image that doesn't already have them. For those new to geotiff, they are a special kind of tiff file that are tagged with embedded metadata, which is how geoconvert gets the elevation data out of them.

    If you can point me to your data source, I can try converting them to a working geotiff too and let you know if I find a working method.

  • This would indeed be really nice to have! As you may have seen in my tutorial video, these tiles work like the image tiles in that they will create mask tiles if you're not careful about the coordinate limits (except the 'disable mask' line appears to have no effect for the terrain mesh, it always produces masks if your tmc coordinates only partially cover the aerofly grid cells).

    I'm sure the same issues of mask tiles that we have with the orthophotos applies to the terrain mesh as well, so it's best to again use vogel69's Google Earth tool or my Excel tool to find coordinate boundaries snapped to the aerofly grid, and then use those in the tmc file. I considered covering this in the tutorial, but thought it might over-complicate things for those doing this for the first time. But, it's absolutely best to geoconvert in a way that doesn't give you masked elevation tiles.

  • Let's do a fast calculation:

    earth circumference divided by arc second:

    40.000.000 meters / 1296000 (360 degrees*60 minutes*60 seconds) ~~ 31 meters/second.

    So 1/3 arc second gives us approximately a 10 meters elevation grid. Right?

    Rodeo

    I think that is indeed correct Rodeo. That's the x-y resolution, but then there is also the vertical resolution. Since these geotiff files are 32-bit linear grayscale tiffs, and if we assume a single file contains elevations from sea level to the top of Mt. Everest (0m to ~8500m), that gives us 2^32 steps of resolution over 8500m, which is sub-millimeter vertical precision. Now I really doubt that all 32bits are going into the elevation info, because that kind of resolution is just absurd... but perhaps this really is the elevation resolution that a geotiff could potentially store, assuming it wasn't limited by the measurement source.

    Also, another reason this seems to improve the default AeroFly mesh so much is that the default mesh only goes to level 10, and in many areas that don't have default scenery it only goes to level 7. So adding those extra levels alone helps quite a bit, and is probably where most of the improvement I saw with my mountainous regions came from.

  • Appreciate the leg work! Pulling down some IMGs now.

    Are these screen shots the result of 1/3 or 1/9 arc second meshes?

    Thanx

    Thanks, and good luck with your conversions! All my preview images in the beginning of the post were with the 1/3 arc second meshes, with the one exception of the San Francisco coastline before/after. That was done with the 1/9 arc second data. The default AeroFly mesh already appears to be pretty good right around San Francisco (and maybe other portions of the coast), so you likely won't see drastic improvement there with the 1/3 arc second data.

    There are two reasons why doing this improves the default mesh in AeroFly: the first is that we are potentially using a data source with better resolution (though I can't be sure of that, it's entirely possible the IPACS crew is using this exact same data for the US ;)), but the other big reason is that the default mesh only covers level 7 in most areas and goes to level 10 in some of the more detailed areas. From my testing, it appears that converting the terrain through level 14 adds a significant amount of detail instead of those flat triangular facets we see with levels 7-10.

  • Here's a demo video I made of some of my converted scenery, airports/airstrips, plus the new topo meshes. I somehow messed up and only recorded in 720p and also forgot to enable audio recording -- sorry about that :S But, still gives a good demo of what you can get with high res orthophotos + AC3D + USGS elevation, and also shows how effective the VR hands can be! There's 4 different backcountry airstrips in the video for those who like that sort of thing too.

    Credit to Jet-Pack (IPACS) and his awesome Cessna 172 mod which I fly in most of the video with the windows open :thumbup:

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.


    Just wanted to add... I love this sim and love flying in it! Thanks and great work IPACS team :thumbup:

  • GeoTIFF has all geographic Information inside, so I really wonder why we have to deal with .tfw files. :?:

    It's a good point, and honestly I'm not sure if you do... I can't remember if I tested it without them first actually :D I will look into it. I'm going to feel really dumb if they aren't necessary, but I suspect you might be right!

    Edit: Just tested it, you do indeed need the .tfw files. However, the creation of those is definitely something that could be automated/scripted instead of doing it manually.

    Edited once, last by qwerty42 (March 20, 2018 at 3:57 AM).

  • Yes, it appears so. Geoconvert automatically makes masked elevation tiles if needed. However I would avoid using them for the same reasons I avoid using them for aerial images -- they create gaps (either in imagery or elevation data) if you add adjacent regions, unless you delete the masked files and re-convert them to a full tile.

  • Finally, it took me in a little more time than expected because I had to review my code which was not very well thought for implement support of another type of file.

    So now it should be possible (without bug?) with las t revision. still going in the "Folder Grid" tab. have fun...

  • Thank you again Qwerty42 for your great work and tutorial !

    I followed them more closely and noticed that I did not put my .tth files in the right place so it explain what it did not work ...

    After a few new quick tests on a small area it seems to work perfectly. Superb ! Thank you !

    A small question in passing before embarking on a larger scale, may be have you already answered it before and I was still not giving enough attention to it ;)

    my ask: to avoid height aberrations between mesh, in which height unit should the geotiff be generated? meter or feet. ?

  • Another question: Is it possible to mask Elevation maps the same way as Aerial Images?

    Here's a straight question, if it's allowed: Did you ever think about making an AeroflyFS port of Austria Pro HD? On the one hand, this would be a quite natural project, given the P3D version is photo-based and you have the required assets available already. On the other hand, a lot of AeroflyFS2 users (including me) certainly wouldn't mind.

    Thanks and kind regards, Michael

    Intel i7-6700K 4.0 GHz / Asus MAXIMUS VIII RANGER / Kingston 32 GB DDR4 / Samsung SSD M.2 500 GB + Samsung SSD 1 TB + Intel SSD 500 GB (AeroflyFS2) + WD HD 6 TB / EVGA GTX 1080Ti 11 GB / LG 34UM95 3440 x 1440 / HP Reverb / Win 10/64

  • Thank you again Qwerty42 for your great work and tutorial !

    I followed them more closely and noticed that I did not put my .tth files in the right place so it explain what it did not work ...

    After a few new quick tests on a small area it seems to work perfectly. Superb ! Thank you !

    A small question in passing before embarking on a larger scale, may be have you already answered it before and I was still not giving enough attention to it ;)

    my ask: to avoid height aberrations between mesh, in which height unit should the geotiff be generated? meter or feet. ?

    Yay! Congrats and I'm glad to hear you were successful :) I'm fairly certain the internal geotiff tagging is in meters, but I haven't tried creating one manually to be sure.

    Also, at least between the default Aerofly mesh and the outer edges of your custom mesh, you possibly still will have those short invisible 'walls' I mentioned in an earlier post. I think this is a combination of small mismatch in terrain height & resolution combined with the stitching algorithm Aerofly uses to merge them, which creates artifacts right where they meet.


  • Finally, it took me in a little more time than expected because I had to review my code which was not very well thought for implement support of another type of file.

    So now it should be possible (without bug?) with las t revision. still going in the "Folder Grid" tab. have fun...

    Thank you for this update to your tool vogel69! Much appreciated.

  • I did a quick calculation to get an idea of the link: Level <-> meters / pixel

    Calculation details:

    ! Warning value can vary according to the distance from the equator but it already gives an idea ....

    at around 15 ° latitude a Level 11 cell is about 18.4 km wide (see on a grid generated by AFS2 Grid generator) knowing that in the .png files generated to make .ttc and .tth files are a size of 2048x2048 pixels, I deduce (rounded values):

    Level 7 -> 147.26 m / pixel

    Level 8 -> 73.63 m / pixel

    Level 9 -> 36.8 m / pixel

    Level 10 -> 18.4 m / pixel

    Level 11 -> 9.2m / pixel

    Level 12 -> 4.6 m / pixel

    Level 13 -> 2.3 m / pixel

    Level 14 -> 1.15 m / pixel

    Level 15 -> 0.6 m / pixel

    correct me if im wrong... :)

  • An enormous thanks and a big hug to you qwerty42 and of course IPACS team for this master piece of simulator :D Your tutorial is excellent and the result is amazing !

    My first tests on a French island of the Caribbean: Martinique ... From data of elevations of 1 meter! it's just huge !! a real pleasure for the eyes in VR

    External Content youtu.be
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • An enormous thanks and a big hug to you qwerty42 and of course IPACS team for this master piece of simulator :D Your tutorial is excellent and the result is amazing !

    My first tests on a French island of the Caribbean: Martinique ... From data of elevations of 1 meter! it's just huge !! a real pleasure for the eyes in VR

    Awww, I love hugs! ^^ Thanks my friend. That looks fantastic:!: Well done!

    It is really amazing how much of a difference it makes to the visuals. Something else that I didn't expect is that it actually makes the orthophotos look better too, because when the terrain mesh is inaccurate, it also distorts the mapping of the images over their surfaces. It's definitely a worthwhile enhancement, I think.