• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS20 Cracking DEM Creation for MSFS

Messages
1,025
Country
us-florida
Hi guys,

This is a preliminary post as I’m still investigating a few aspects and getting up to speed but Dick aka Rhumbaflappy put me on the right course to figure out the system and structure for generating elevation mesh CGL’s and it appears to be stupidly simple.

The MSFS SDK reads in the elevation data as simple “Arc ASCII Grid” DEM files, from examples I’ve seen I think I may know the projection but am still investigating that but working on some sample data I was able to convert the XML file back into an Arc ASCII Grid .arc file and load it into global mapper.

Once I’m able to run some of my own custom data through the system we should be able to solve or get a long way ahead on being able to generate elevation data for MSFS way more easily than python scripts and other tools. In fact once fully figured out, it might be something scenproc could potentially handle in terms of pulling in geotiff or other elevation data formats, converting them to Arc ASCII Grid, clip files with shp file vector data and generate the XML code but would need Arno’s input on that.

I have to read through a couple of threads to figure out why the dem was upside down and rotated 180 degrees but once that is sorted it really should be a very easy process to create elevation CGL’s for MSFS. I’m very surprised how simple it looks.

I am hoping it is as simple as it appears to be and there’s no blocking issues that pop up. It seems it may actually be a lot easier than FSX/P3D. :)

19A29A4E-EABE-4B08-9F6C-A69E2E85144D.jpeg
 
Definitely interested in an idiot's guide to this.

I'm sure many people love their python et al. That's all a bit beyond me.

I was using the Nool Aerosystems tool but the results, either because the DEM data was bad or the MSFS rectangle elevation system is too crude, always required many more hours of work if an acceptable result ever arrived at all.

All the best elevations I've seen seem to be CGL based. I wouldn't really have much of a clue where to begin.
 
Okay, I've kind of figured out the CGL stuff, mostly, do need python to flip the dem horizontally, although I could probably figure out how to do that in Global Mapper and then there's learning how to calculate the elevation data with egm-2008 (earth gravitational model 2008).

Asobo really has gone all out with MSFS, the deeper we dive into things the more incredible what they've done becomes.

Really wanting to push some test data through MSFS Toolkit for a small test area just to see what happens with 1m dem, unfortunately I'm late to the party and Paavo has pulled it offline for now. Hoping he replies to my email. The other option is I can see if someone can crunch the data for a tiny test area.

EDIT - As I was driving to the computer store I had a brainwave, why do I need to use Python to flip the DEM horizontally when I can just bring the geotiff into Adobe Photoshop and flip it inside of it, being sure of course to have saved both the .tfw and .prj header data out as files on export, sure enough it worked perfectly.

Picture below is flipped horizontally and overlaid over the master, this was done in photoshop.

flipped.jpg


So in terms of prepping the elevation data, it can all be done via Global Mapper, ArcGIS or QGIS. I'm mostly familiar with Global Mapper so that's what I'll focus on for a tutorial. Basically all that's left is to plug in the egm-2008 data into the geotiff model to correct elevations according to the gravity model and then it should be a simple matter of compiling the data in sim (which I'm currently re-installing for the 5th time, well it's updating).

EDIT:

So I did further research as using python to figure out the geoid shift for the egm-2008 data I looked up some geotiff grids and https://www.agisoft.com/downloads/geoids/ has both 1 arc minute and 2.5 arc minute data which can be used as a basis for adding the elevation offsets to the local dem data. I'll have to figure out how to automate that process in global mapper.

EDIT 2:

So it looks like python is the way to go at adding the elevation to the data it would seem, I may do a rough test in just over a week, I may be able to live with a RMSE +/- 1m, but I'm still trying to understand how egm-2008 is used in MSFS because if I add the base gem2008 data to the file, it sets the elevation to over 50m, now if that's coded into the sim as being sea level, all good. Will have to find out soon.
 
Last edited:
I finally got around to trying adding more detailed terrain for a city I grew up in, found the DEM data, and then realized the Nool tool everyone was apparently using got pulled. Is there really no alternative and no tutorial for this stuff without using that Nool tool? This was the ONLY way everyone was doing terrain meshes the whole time? Even if I just want to do a small square area am I totally out of luck until that tool comes back on Github? I have a TIFF file for the terrain, I have QGIS, and apparently I need to generate some elevation data this tool was needed for?

If there exists an alternate tool with a tutorial, could someone point me to it? Thanks.
 
Most of the pros use CGLs for DEMs and were doing so long before the Nool tool turned up. That wasn't itself possible until Asobo introduced proper terraforming rectangles which weren't there at launch.

There is basically zero straightforward info on how to do it with CGLs. The few nuggets that are thrown around are basically incomprehensible to me.

Maybe I'm not paying enough attention.
 
Last edited:
I’m away from home on a film shoot preproduction for a few days. I will be able to confirm the processes which should be a lot easier than CGL Tools and not need programming or python.

I was very close to running the test but ran out of time. Just have to test it and if all is good then record a tutorial. I’m using global mapper but it could be adapted to qgis, I’d just have to look up the method to the same things in QGIS.

It’s actually quite a simple process, I just have to confirm how the world gravitational model stuff works, Basically it sets the height of MSL around the world and from what I understand from other threads you just add the local gravity mean sea level elevation as an offset to the dem but my location is +50m at sea level so it’ll be interesting to see what happens.
 
I’m away from home on a film shoot preproduction for a few days. I will be able to confirm the processes which should be a lot easier than CGL Tools and not need programming or python.

I was very close to running the test but ran out of time. Just have to test it and if all is good then record a tutorial. I’m using global mapper but it could be adapted to qgis, I’d just have to look up the method to the same things in QGIS.

It’s actually quite a simple process, I just have to confirm how the world gravitational model stuff works, Basically it sets the height of MSL around the world and from what I understand from other threads you just add the local gravity mean sea level elevation as an offset to the dem but my location is +50m at sea level so it’ll be interesting to see what happens.
Hi, I am really excited to find out more about your discoveries! Are there any news on the project?
Cheers
 
@=Hollywood= any updates on this? I am curious what recipe you came up with! I didn't have any luck with the CGL Tools.

I have the solution formed in my head, just in the middle of moving back USA side from Australia so i'll pop back up once I'm feet dry :D. Pretty simple to implement but I just have to go generate the code.
 
Back
Top