MSFS

SDK

SDK

Fixing lake-elevation data with OSM and heightmaps

Prerequisites

For Norway: hoydedata.no with the following settings:

image-1598862848822.png

Preparations

Preparing project structure

image-1598863444031.png

image-1598863640204.png

image-1598864156433.png

image-1598864373219.png

Creating the scenery

Add and filter geodata

Preparing heightmaps
Automatic method

After you have imported and merged your heightmap, I have developed a method to do all the manual steps found below automatically using a QGIS Model.

First download this model file: https://docs.takset.net/attachments/4

To use it, open Processing > Graphical Modeler. Open image-1599688079685.png the file you downloaded. When it is open you can click the Runimage-1599688118546.png button. Select the merged heightmap and click Run again. It will run through all the steps for you. Unless you changed it's name in the parameters window (the window where you selected your heightmap), the layer to export (see Export scenery sources) will be called msfs-scenery.

Manual method

Preparing OSM water-polygons

image-1598865933522.png

raster_value('layername',1,make_point(x($geometry),y($geometry))) = 0

image-1598866826285.png

Adding height data

image-1598867589377.png

raster_value('layername',1,make_point(x($geometry),y($geometry)))

Adding MSFS SDK Data

image-1598870658110.png

Field Expression Comment
version '0.2.5'  
Uuid uuid() Generates an unique Uuid for all features.
Guid '{00000000-0000-0000-0000-000000000000}' Not sure what this does. Seems redundant, but might be left in for compatibility purposes.
falloff 200 This is the amount of smoothing MSFS will do around the flattening. 200 is the default and it is a good-value, but you can experiment with this.
flatten 1 This tells MSFS SDK to flatten the terrain inside the polygon. This is what ultimately does the terraforming.
DBuilding 0  
OBuilding 0  
MSBuilding 0  
vegetation -1  
LCRemap 0  
Material '{00000000-0000-0000-0000-000000000000}'  
ExcludeTIN 0  
BuildTIN 0  
Detected 0  
VegDensity -1  
Layer 0  
VegFalloff 0  
IsWater 0  
WaterExcl 0  
WaterType 5  
AirprtSize 0  
EcoRegion -1  
NaturalVeg -1  
Intrntionl 0  
Artificial 0  
Brightness 127  

Exporting the scenery sources

Verifying that it works

Building the scenery