Opening Airport from Project File or BGL

I have seen many times, especially from Jon and other knowledgeable people, that you should always avoid opening an airport directly from the .bgl file. Yet another thread suggests this is a good way to lose ground polys and lights.

The recommended "source" is the ADE project file. Here's the catch, though. If I open another author's work with ADE, it has to be with through .bgl file because the only one who has the project file is...the project author.

Case in point, I am using some photoreal mesh scenery and the mesh creator has modified the airfields within the area of the mesh to match the terrain. We've all seen airports sitting on plateaus or sunk into pits because the default airport is at a different elevation than the mesh.

Despite the excellent work he has done in matching airfields to terrain, I want to make improvements to these modified airfields by adding objects and taxisigns, etc. My only recourse is to open it with the .bgl because I don't have a project file, the author does. Am I "damaging" the field when I do this?

Also, when we open a stock airport, say KORD, to bring it up to 2017 appearances aren't we opening the .bgl file that contains KORD. We won't have a project file until we open the stock .bgl and modify it and save it.

Kinda begs the question of the chicken or the egg. Can't have an egg without a chicken, but you can't have a chicken without the egg.

Randy
 

=rk=

Resource contributor
Your solution is semantic. The operative word you chose is "avoid." It is very accurate. If you are unable to avoid opening from .bgl, well, it's unavoidable. Save to ad4, open from ad4 and avoid opening from the .bgl again.

It does not beg the chicken/egg question at all. You are considering the situation in terms of absolutes (yes/no, first/second) and not in terms of maybes, might's and shouldn't-but-its-probably-ok-this-time's.
 

tgibson

Resource contributor
As Rick states, if you can only open from a BGL file that's what you have to do.

When you open an airport from a BGL file, you lose two categories of things vs if you open an AD4 file. First, any terrain features are lost (those are found in the CVX BGL file, if any), and any ADE-specific objects (or their categorization) is lost (things like crosswind runways, orphaned ILSs, etc.). The first because ADE cannot currently read terrain features from a BGL file, and the second because they aren't present in the BGL file. For the first you can preserve any existing CVX BGL file by renaming it (if needed), and for the second you can use Tools/Load Stock Data to get back many things that an AD4 file has. Those will get you close to opening a stock airport and starting with that, but not quite all the way.

Hope this helps,
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Rick and Tom have answered this. If all you have is a bgl file then you need to start with that and load it. However once you have done that you save what you have as an ADE project file. You may then want to import some other information such as scenery objects into the project file.

Once you have the project file then that is what you should always work with. Unlike AFCAD and AFX which use the bgl format as a way of saving the work. As already mentioned the project file can contain information that can't be stored in the bgl airport format such as terrain. Also things like background images. The bgl format is limited. AFX fudged ways of creating flattens using objects as I recall

Finally repeated loading and saving of bgl files can result in loss of precision in things like coordinates.

So it is perfectly right to open from bgl if you have no ADE project file and of course that is the only way to do things when loading a stock airport. But what you may not know is that when you load a stock airport in ADE the program also searches other bgl files for things that can be stored outside the airport bgl file such as scenery objects, navigational aids and even sometimes taxi signs.
 
Thanks for your replies gentlemen. If I have a project file I always open it to work with my airports, but after reading all the warnings about "never" opening a .bgl file with ADE to work with I was afraid I had completely ruined others' work that I tried to improve...although it never appeared so.

So now I'm wondering and now specifically referring to those airports that have been adjusted to match Ultimate Terrain, FSGenesis, BlueSky, or Megascenery Earth. Such airports have an obvious CVX BGL file included with the compiled airport .bgl file. Yet when you download them from a site like AVSIM there is no ad4 file included, just the airport and cvx bgl files.

What is the "safest" way to work with such downloads if I want to improve the way the field looks; i.e., add objects (usually custom ones I have made with GMAX), change taxi signage, add ground polys for runway markings, etc?

If I open the .bgl file to work with the airport (which I have to do since there is no ad4 file) I lose, according to Tom, the terrain element (the cvx element, right)? Yet when I go to compile any work I've done I get asked by the ADE compiler if I want to "keep" the terrain element. How can that be if I "lost it" when I opened it with ADE using the .bgl file and not an ad4 file. Is it because the original XXXX_ADEX_XYZ_CVX.bgl file is still present in the active scenery folder?

So, option 1...

Open the Airport.bgl
Save airport immediately
Open saved ad4
Do my work
Save again
Compile
Open with ad4 for any rework I have to do

Option 2... (which is what I have been doing)

Open .bgl
Do my work
Save airport
Compile (keeping the terrain element)
Open with ad4 for any rework

Or does it matter at all?

Randy
 
Hello:

While it seems 'most' of the concepts of how to further customize an airport in the context of it already having been modified by another 3rd party have been alluded to in this thread thus far, I would be compelled to offer an additional and even more emphatic assertion:

DO NOT OPEN AND THEN 'SAVE' CHANGES INTO 'ORIGINAL' 3RD PARTY AIRPORT BGLs !!!

It is almost always not necessary, and is inherently an invitation to trouble. :alert:


The good news is that one can copy the airport BGL to a backup version, then open ONLY that copied file ...with an intent to allow ADE to extract out of it what is needed to create a new *.AD4 project file.

Any CVX vector content BGLs can be separately accessed, if needed, via a de-compilation process using CVXExtractor; but even this may not be necessary, as one typically would instead wish to follow the cardinal rule of FS scenery building:

LEAVE THE ORIGINAL BGL FILES INTACT, THEN EXCLUDE AND REPLACE SCENERY CONTENT.


From that *.AD4 project file, one can customize the airport as desired, and use of proper exclude file types can allow one to relace any part of an airport, or to replace it entirely, if necessary. ;)

GaryGB
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
If ADE finds a CVX bgl file that matches the airport file then it will offer to keep it for you. The issue - and this has come up before - is when to save a CVX file. If a user creates some terrain scenery in a project and compiles it then a CVX file is created. If the user now decides to remove the terrain elements ADE must remove the CVX file otherwise the users current intentions will not be met. If a third party airport is loaded from a bgl file then no terrain elements are in the project which is displayed. This is partly because they are not in the airport bgl file and also because ADE can't read the compiled CVX file which may have come with the airport. It is possible now to decompile CVX files but that has not been included so far in ADE and is not likely in the near future. So the workaround is to allow the user who opens the airport to retain the original CVX elements by keeping the CVX bgl file.

There is no foolproof and automatic way to deal with this situation so users who go this route need to be careful. Also if your intent is to modify the airport elements like parking and so on then you probably would not want to mess with the terrain part of things.

I don't see much difference in option 1 and 2 other than saving the project as soon as possible is probably best practice in case anything goes wrong and you might forget to save it later. ADE does not like folks to forget to save so it is quite insistent if the information in ADE is changed.
 
Top