• 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.

Custom vector polygons from SBuilderX, QGIS etc. in MSFS

Messages
138
Country
poland
Has anyone yet successfully imported vector polygons from other projects like in QGIS, SBX or others into MSFS? Here's what I gathered so far:

  • The shapefile format seems to be editable in QGIS. Usually seems to need a "3D shape" with Z-values required for the polygon vertices.
  • Attributes from a sample shapefile created in devmode can be copied into new polygons added (except for Uuid, which needs to be individual for each polygon).
Problems:
  • Holes (also called "islands" in polygons do not seem to work)
  • As soon as shapes become a bit more complex, they are just displayed partially or not at all.
See attached sample screenshot where I tried to remove the holes using the "tesselate" function in QGIS. Polygons still seem to be way too complex for MSFS to handle them and with water not creeping up all the way to the corners of the polygons, tesselate isn't a useful idea after all.

1615808232653.png


Sigh... I miss the good old times of SHP2Vec...

Any ideas?
 
Hello:

I have not yet tested use of an external ESRI SHP file editor such as QGIS with MSFS SDK as you describe above, nor have I studied / used QGIS in any detail yet.


However one might wonder whether the "tessellation" issues cited here: :scratchch

https://github.com/qgis/QGIS/issues/36638

https://github.com/qgis/QGIS/commit/d81f498a991e38f360ab051d8d3c0a5500915cf7


...may be resolved by use of a QGIS plugin cited here:

https://www.fsdeveloper.com/forum/threads/sbx-hole-water-polys-become-inverted-on-bgl-export.441991/


Be aware as well, that the ESRI SHP file format exported by some dialog functions in SBuilderX are not recognized by some GIS applications. :alert:


But, if Patrick Germain's CvxExtractor is used to de-compile and output ESRI SHP files from ex: FSX CVX vector BGLs, those are recognized by some GIS applications.


I would also welcome a greater ease of use we had with FSX / P3D "legacy" work-flows allowing use of external GIS / FS Utilities for scenery creation / editing in MSFS. :banghead:

GaryGB
 
Last edited:
I used QGIS for my experiments with EcoRegions https://www.fsdeveloper.com/forum/threads/ecoregions.450706/#post-869896

Holes don't work, as you found out. Simplified convex shapes work best. There might be a minimal vertex distance based on the terrain mesh... just a guess. Keep the polygon types in separate shapefiles... don't mix them.

GPSMapEdit has an easy method to split polygons to eliminate holes, and I think GlobalMapper also has a process. I'm sure ArcGIS does as well. But I found you can slice and overlap polys as well to simulate holes. In FS2004 I think we just placed the solid island on top of the water as a separate poly?
 
GPSMapEdit was the best. They had a free version in their archived downloads somewhere. The The split in SBuilderX didn't always catch the islands.
 
Ok, spending a few looooong days on this one now. Here's what I gathered:
  • As previously stated by Dick there are NO holes/islands possible within shapefile polygons! However it is also NOT possible to create more complex polygons around the island, even if they are convex (btw. Manifold GIS seemed to be the only tool around that can reliably split more complex polygons into convex polygons, also tried full versions of Global Mapper, GPSMapedit and QGIS with less than satisfactory results).
  • To make matters worse, existing default MSFS scenery islands cannot just be excluded like that. It seems like all smaller islands (everything that falls within a certain QMID size) have been placed as separate water exclusion polygons ON TOP of the water polygons. The only way around that is for exsample to place TYPE=LAKE on ocean that successfully suppressed those islands. Some submerged artifacts and a faintly visible coastline along the mainland however still remain (the latter can hopefully be covered with aerial imagery).
  • If you want smaller islands, you need to place them with a higher priority on top of that as a TYPE=LAKE exclude. Still if those islands are just rocks of a few square meters they may not be worth considering as they cause triangulation artifacts around them that are much bigger than those islands themselves.
    1615988942924.png


  • Even worse are the QMID edge lines in water that are also mentioned here. There's no way to control them. I haven't been able to find out in days why they appear at one tile location but not at another.
    1615988855478.png

    It helps to slice the waterbodies to QMID=15. But some edge seams still remain after that.
    You could place the same waterbodies again on top in a non-sliced version. Fspackagetool still tries to slice them to some degree but if you're lucky, all seams are gone. If not... ah well... still working on that...
    • Note that for the latter on top the polygons NEED to have a different type again (e.g. TYPE=3 for ocean) because otherwise there will be a wild mix of land and water polygons (MSFS can't handle the same type overlapping each other it seems). And if you have islands, you need to create another set with the same type in addition again on top.
Sigh... all very complicated and not really straightforward...

Dick, it was very useful to know that TMFViewer is still working on the new BGL files, which makes bug tracing much easier. Thank you!
 
In QGIS you can replace the holes by Convert Geometry Type to lines, then use it again to convert those lines to polys. Now all the holes are polygons, and you can assign water or exclude-water types to the polygons in the attributes.
That still leaves the problem of complex shapes, and large polys showing lines in the sim. Somehow, I think those lines are caused by the aerial imagery tiles or underlying mesh divisions, and Sasa's work-around might be a solution we just need to accept. The SDK states we can use convex or concave shapes, so that shouldn't be the problem.
 
Does anyone here have a sample project for creating water masks for msfs? I have all the data I need but need to interpret the fields at the moment as I have no reference as to what a lot of them do.
 
Ok, spending a few looooong days on this one now. Here's what I gathered:
  • As previously stated by Dick there are NO holes/islands possible within shapefile polygons! However it is also NOT possible to create more complex polygons around the island, even if they are convex (btw. Manifold GIS seemed to be the only tool around that can reliably split more complex polygons into convex polygons, also tried full versions of Global Mapper, GPSMapedit and QGIS with less than satisfactory results).
  • To make matters worse, existing default MSFS scenery islands cannot just be excluded like that. It seems like all smaller islands (everything that falls within a certain QMID size) have been placed as separate water exclusion polygons ON TOP of the water polygons. The only way around that is for exsample to place TYPE=LAKE on ocean that successfully suppressed those islands. Some submerged artifacts and a faintly visible coastline along the mainland however still remain (the latter can hopefully be covered with aerial imagery).
  • If you want smaller islands, you need to place them with a higher priority on top of that as a TYPE=LAKE exclude. Still if those islands are just rocks of a few square meters they may not be worth considering as they cause triangulation artifacts around them that are much bigger than those islands themselves.
    View attachment 70659

  • Even worse are the QMID edge lines in water that are also mentioned here. There's no way to control them. I haven't been able to find out in days why they appear at one tile location but not at another.
    View attachment 70658
    It helps to slice the waterbodies to QMID=15. But some edge seams still remain after that.
    You could place the same waterbodies again on top in a non-sliced version. Fspackagetool still tries to slice them to some degree but if you're lucky, all seams are gone. If not... ah well... still working on that...
    • Note that for the latter on top the polygons NEED to have a different type again (e.g. TYPE=3 for ocean) because otherwise there will be a wild mix of land and water polygons (MSFS can't handle the same type overlapping each other it seems). And if you have islands, you need to create another set with the same type in addition again on top.
Sigh... all very complicated and not really straightforward...

Dick, it was very useful to know that TMFViewer is still working on the new BGL files, which makes bug tracing much easier. Thank you!
Hello my friend,

I'm seeking help with water masking for a project of mine. Would you happen to have any pointers or some sort of work-process you could share for the shapefile preparation?
 
I wish... Working on this for another project now and it's still an nerve wrecking experience. Seems that shapefiles manually drawn in MSFS seem to work best although I never could find a real difference between them and what you do in GIS tools like QGIS. MSFS seems to have some kind of proprietary format for shapefiles that renders everything created with external tools almost useless.
 
Back
Top