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

Issues - Converting Vector Data

Messages
81
Country
unitedkingdom
The CVXExtractor by Patrick Germain allows vector data from FSX to be extracted seamlessly into ESRI .shp files which can be imported to SBuilderX and compiled and then converted. It also allows vectors from Flight to be converted as well!

You can get the tool and follow on the development here.

Whilst experimenting, I've ran into a few problems.

I'll use a recompile of Flight's cvx0624.bgl as an example...
  1. I use the CVXExtractor and it successfully extracts the .shp files. The files present in the folder are as follows:
    • FLX0624 - Airport Bounds
    • HGX0624 - GPS Hydro Polys
    • HLX0624 - Shorelines
    • HPX0624 - HydroPloys
    • PKX0624 - Parks
    • RDX0624 - Roads
    • STX0624 - Streams
  2. I then use SBuilder and "Append" the .shp files into my project. Until it looks like this:

    0Xlml9t.png


  3. Hit "BGL Compile" and I get a .bgl file that looks like the following. However the GPS Hydro Poly's did not compile as it is not present in the bgl or the BGL folder.
    Zj4INj0.png
    bl6J2Ix.png
Any suggestions appreciated!
 
Hi Kavinda J.D.

It looks to me as if the main problem is with SBuilderX, rather than with CVXExtractor. When you append a HydroGPS set of polys from shapefile, SBuilderX does not obtain a GUID from the shapefile, but defaults to the last chosen GUID ( even from another session! ). So make sure you choose a valid GUID by clicking on the GUID number in the box, and selecting HydroGPS.

HGX.png


The compiling will produce an FSX BGL. I'm not sure what ContentConverter will do with this BGL. Happy experimenting.

Also there are also mission points and scenery vector objects (extrusions) in the default CVX files. When compiling we can't use -ADDTOCELLS, as this makes the waterpolys go weird, with some not showing or partially showing. This means the BGL converted will override all the info within the affected QMD11 cells.
I don't know if mission points and scenery vector objects are deleted.

Patrick Germain is also experimenting with a replacement for shp2vec to be able to chose between FSX or Flight compilation... so we could eventually compile straight from shapefile to Flight BGL. He's got a working version, but I'm not sure he is ready to release it.

Steve is thinking on the -ADDTOCELLS problem, so hopefully he can get a solution so we don't need to entirely rebuild all QMID11 cells in Flight CVX BGLs.

Also, be aware that translating a default Flight CVX to FSX CVX won't work in FSX because of the limitations of FSX's lclookup and terrain.cfg.

And FSX addons may need a lot of reworking as, for example, the FSX modified terrain.cfg is not represented in Flight's various lclookups (yet). And SBuilderX's Lines.txt and Polys.text need to include the default Flight lies and polys.

If you stick to default FSX lines and polys, you should be able to convert them to Flight.

Dick
 
Last edited:
Great! I just tried it out and the Hydro Poly's are showing!

Thanks for taking the time to explain in much needed detail. The new shp2vec should be very useful. I've tried several custom BGL's with the toolkit but it couldn't read the BGL. Cutting the conversion through the Toolkit would work very well!

Thanks again!
 
I'm thinking of making an lclookup to cover the FSX modified terrain.cfg, as that is represented in the SBuilderX lines and polys selections. It does give me a headache just thinking about it... but it is possible.

Dick
 
I'm getting an error with the Vector file conversion through the Flight Toolkit. I'm trying to convert a regular cvx file (unmodified) and I enter the following on CMD:

Code:
"C:\Program Files (x86)\Flight Tools\Flight Toolkit\ContentConverter.exe" vector /i:"C:\cvx0624.bgl" /o:"C:\Graphics"

But then I get the following error:
Code:
Convert FSX vector data from 'C:\cvx0624.bgl' and outputing to 'C:\Graphics'
Converting FSX bgl 'C:\cvx0624.bgl' to Flight bgls 'C:\Graphics'...
  Loading BGL file: 'C:\cvx0624.bgl'
  Saving BGL file: 'C:\Graphics'
    Error: Failed to open file.
  Error: Failed to save Flight BGL file 'C:\Graphics'

When I switch the output directory to something random, the conversion is a success but the directory nor the file is created.

Is anyone else having this problem?

Thanks
 
This worked into a pre-made folder named "Graphics":

Code:
"C:\Program Files (x86)\Flight Tools\Flight Toolkit\ContentConverter.exe" vector /i:"C:\cvx0624.bgl" /o:"C:\Graphics\0624.bgl"
 
Ahh.. thanks Dick that worked for me. I guess you need to specify the name of the file in the output as well! :)

@stonelance: Alright Steve. Thanks for the info - I always through you needed to convert the vectors. So with the new shp2vec that Patrick is creating - is it necessary? Can't you just use the standard shp2vec that comes with the SDK to compile the vectors from the .shp files and then just drop it into Flight.

Thanks!
 
Patrick's PGShp2Vec program is still in development. Flight contains more than just the lines and polys we're familiar with from FSX. There are also Mission points and object vectors (splines). I would hope Patrick would develop these as well.

Originally, Steve and I thought there might be a problem with the winding of polys in FSX Shp2Vec. Patrick corrected this so polys are wound just like the Flight shp2vec. Since that time, it seems there may be a problem in that Flight will only display polys correctly when compiled without the -ADDTOCELLS flag, and it has less to do with the direction of how polys are drawn.

Dick
 
Back
Top