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

Decompiling a BGL File

Status
Not open for further replies.
Messages
946
Hi Gary,
I have the problem fixed now. Since I have that out of the way, I need to go back and try out the IS3 again, but I guess I better make a backup of any file I use. I won't be able to try out IS3 using the BHM2008 because I haven't purchased it yet, and it'll only allow me to use it at, for example, Tacoma International or KSEA. Since Jon posted that he hoped I was not modifying the stock airport bgl file, does that mean I shouldn't add exclusions at Tacoma? Or, is it okay as long as I don't mess with the AP915150.bgl, which is the main airport file, I presume. Before I go any farther, I want to make sure I do this right. In the manual, all it says is to point to one of its corners, right-click with the mouse and select Add exclusion rectangle. Then it says move the mouse cursor to the opposite corner, and use the context menu to add the exclusion rectangle to the scenery file. It says "to add the exclusion rectangle to the scenery file." Does that mean it saves the exclusion to the stock airport scenery file? So, tell me if I'm doing this right:

I'm in FS2004 at KSEA and I've selected the TOP DOWN view. I click on the Flight1 menu and click Instant Scenery, and this opens a box with all the object files. Let's say, for example, I want to make an exclusion. Does that mean that I can exclude any thing I'm looking at in FS2004, rather it be a terminal, tower, FBO, or whatever?

Ken.
 
Last edited:
Messages
7,450
Country
us-illinois
Hi Ken:

Simply stated: NEVER EDIT OR OVER-WRITE A DEFAULT MSFS AIRPORT FACILITIES DATA FILE; so... "don't mess with the AP915150.bgl" ! :pushpin:


The idea is to make a replacement single (KBHM) airport BGL using de-compiled BGLComp-XML code copied from such a file and imported into ex: ADE9.

One then 'excludes from display', any un-wanted portions of (or all of) ...the original default airport.


Regarding use of IS3 to make a BGLComp-XML Exclude Rectangle, when you have made the exclude in IS3, and IS3 prompts you for what BGL file to save the exclude into, simply over-strike the file name submitted by IS3 in the name field, and instead enter a name such as "Z_excl_KBHM_Tower.BGL".

Thus you will not be saving the exclusion instructions into the default airport file; rather you will be saving the exclusion instructions into a new BGL. :idea:

And yes, nearly any scenery object placed by BGLComp-XML compiled into a BGL file (and/or placed as autogen via a *an.AGN file in FS9) ...may be excluded by IS3.

Hope this helps ! :)

GaryGB
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,854
Country
unitedkingdom
Hi Gary and Jon,
I've just submitted the Log. I also wanted to let you know that when I go directly to that file, which is C:\FS9\Scenery\Namw\Scenery\AP915150.bgl and open it, ADE says that it failed to decompile. So, it no longer decompiles this airport. I'm not sure if this means anything but I did noticed that the date the file was modified was 6-30-2015, which was yesterday when the problem started. The original date was 05-13-2003. This seems to suggest that I did modify the file but I don't know if that's why I'm having the issue with the ADE compiling the file. I probably could just re-place the file from the FS9 CD but I think I'll wait until I hear about my log first.

Ken.

Can you confirm that the log was sent. I have a number of logs in the queue but cannot identify yours. What user initial are you using?
 
Messages
946
Hi Jon,
My initials are km. If you need me to send it again, let me know. When I click the Send button, am I supposed to get a confirmation that it was sent?

Ken.
 
Messages
946
Hi Ken:

Simply stated: NEVER EDIT OR OVER-WRITE A DEFAULT MSFS AIRPORT FACILITIES DATA FILE; so... "don't mess with the AP915150.bgl" ! :pushpin:


The idea is to make a replacement single (KBHM) airport BGL using de-compiled BGLComp-XML code copied from such a file and imported into ex: ADE9.

One then 'excludes from display', any un-wanted portions (or all of) the original default airport.


Regarding use of IS3 to make a BGLComp-XML Exclude Rectangle, when you have made the exclude in IS3, and IS3 prompts you for what BGL file to save the exclude into, simply over-strike the file name submitted by IS3 in the name field, and instead enter a name such as "Z_excl_KBHM_Tower.BGL".

Thus you will not be saving the exclusion instructions into the default airport file; rather you will be saving the exclusion instructions into a new BGL. :idea:

And yes, nearly any scenery object placed by BGLComp-XML (and placed as autogen in FS9) ...may be excluded by IS3.

Hope this helps ! :)

GaryGB


Hi Gary,
Sorry to be so much a bother but I'm just confused about some things. I understand that I should not overwrite the default airport but I'm confused as to why you're referring to the KBHM large_tower2.bgl and I cannot do that one until I purchased it. KBHM is nearly 2 thousand miles from Tacoma and it's outside the limits of IS3 demo. So, since I can only work around Tacoma, can I do the same thing with IS3 when adding an exclusion at Tacoma as long as I don't overwrite the AP915150.bgl file? In other words, can I overstrike the file name and enter a name such as z_excl_KSEA_----.bgl, just as I would with the KBHM, and it not affect the main airport file? The dashes mean whatever I'm excluding. And let me make sure I understand this correctly. When I run FS2004 and load the default Tacoma airport, would adding a scenery object, moving objects or editing, or adding exclusions inside the simulator overwrite the AP915150.bgl? It doesn't seem to me that it would unless I enter AP915150.bgl into the name field. So, do I have the understanding correct now?

Ken.
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,854
Country
unitedkingdom
OK - I see it now. Do you still have the bgl file that generated this error? If so can you please email it to me - jon AT scruffyduck DOT co DOT uk
 
Messages
777
Country
unitedstates
Ken,

You do not ever want to edit a default file.

AP915150.bgl not only contains SeaTac (Seattle-Tacoma Intl. Airport, which is a lot closer to Seattle than it is Tacoma) it also contains dozens of other airports.

Any attempt to overwrite that file will remove all of those other airports from your sim.

FS builds the world according to the priority of files as set in the Scenery Library, starting at the bottom.

Almost everything we do to customize airports should be done with files that are placed in active scenery folders that are above the default files in the Scenery Library.

If you want to delete a building at SeaTac, your exclusion file wants to be above the default SeaTac in the Scenery Library. FS will sort it out when it builds the airport that the exclusion has higher priority than the default files so it will not present you with that building in the sim.

In fact, behind the scenes every airport that you customize in ADE has code in it to tell FS to delete everything at the airport. Then FS uses the data in the ADE-generated .bgl file to build the airport.

Editing the default files or replacing them with files that you create with the same file name will only cause problems leading to major frustration and an eventual need to reinstall the sim.

To remove the default tower from KSEA, draw an exclusion rectangle around it and save the file in IS with a name that you will recognize 5 years from now.

Place that file in ...\Addon Scenery\scenery and test. If your exclusion rectangle includes the object reference point for the tower, it will be gone when you visit KSEA.

cheers,
Lane
 
Messages
7,450
Country
us-illinois
Indeed, as Lane alluded to above, one can simply:

1.) Start FS9

2.) Go to KSEA and slew nearby to the unwanted tower

3.) Launch IS3 (NOTE: you do NOT need to open ANY BGLs in IS3 for editing / moving / deleting etc. at this time)

4.) In IS3 (using a KSEA Control Tower as an example object to be excluded):

__a.) Right-click the ground (context menu opens)

__b.) In the IS3 context menu, click "Exclusion Rectangles..."

__c.) On the ground at a far corner of the tower base, click-hold-drag to draw an exclusion rectangle around the tower base

__d.) When the exclusion box is drawn closely around only the tower base, right-click the ground (context menu opens)

__e.) Select "Add to another file...", and enter the desired exclude BGL file name (ex: 'Z_KSEA_Tower_Exclude.bgl')

__f.) Save the ex: 'Z_KSEA_Tower_Exclude.bgl' into ex: [FS9 install path]\Addon Scenery\Scenery

5. Exit FS9 completely; now re-start FS9, go to KSEA, then slew to where the unwanted tower was; ...it should now be GONE ! :wizard:


Hope this helps ! :)

GaryGB
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,854
Country
unitedkingdom
Just to close of the issue of the recompiled AP file crashing ADE. There is a section in the bgl file that contains names of things like country, state, city and so on. This had become corrupted. The compiler probably did not care or notice the problem but my decompiler failed on the error.
 
Messages
946
Hi Gary and Lane, Thanks guys for your assistance. I'm not really interested in excluding or moving the objects at KSEA. I just want to try out the IS3 and get an idea of what it will do and what I can do with it before I purchase it. When I finish, I just simply delete the new .bgl and everything is back to the way it was. Yes, I figured that AP915150.bgl would contain several airports in that one file and modifying it would also modify other airports using that file. Now that you've given me better instructions, I was able to exclude some of the objects. When I try to exclude the tower at KSEA, it would not exclude. But I was able to exclude the smaller terminals on each side of the main large terminal. I ran ADE and I came to realize why I probably was not able to delete the tower. In ADE, I noticed the yellow library object, I think it's called, covered a large area, and I got to thinking that the tower must be a part of that library object and it cannot be excluded by itself because it's a part of that model. Am I correct? So, I went and excluded the entire object, and this time, it was gone. So, I assume by this that I cannot exclude the tower in this model. I even tried to exclude a portion of the main terminal, as though that portion was torn down and was to be remodeled as in the case of KBHM, but I was not able to exclude a portion of the terminal. So, would doing this require some other method? I know when I start to do my project for BHM2008, I'll need to remove the round section at the very end of concourse C. It was just the round section that was torn down, not the C concourse.

Ken.
 
Messages
7,450
Country
us-illinois
Hi Ken:

By now we have all expended a vast amount of time and effort typing text on a keyboard; a picture is worth a thousand words (or more !) ;)

Please load up any and all of the scenery files you want to use in your customized version of KBHM, grab a screenie, and use a graphics program to edit the image, being sure to label each object- or object(s)- you want to "exclude", and attach it to a post in this thread. :pushpin:

Then I'm confident one or more of us will be much better able to assist you with finishing up this scenery project to your satisfaction. :)

GaryGB
 
Messages
777
Country
unitedstates
When I try to exclude the tower at KSEA, it would not exclude... I ran ADE and I came to realize why I probably was not able to delete the tower. In ADE, I noticed the yellow library object, I think it's called, covered a large area, and I got to thinking that the tower must be a part of that library object and it cannot be excluded by itself because it's a part of that model. Am I correct?
This is what the FS9 KSEA control tower scenery object looks like in MCX...
Capture-2.JPG


Everything you see in that pic is part of the model.

To exclude it with IS you would need to draw an exclusion rectangle around at least the object reference point, where the red, yellow, and green grid lines meet in that pic. That exclude would remove the entire model. not just the tower itself.

I even tried to exclude a portion of the main terminal, as though that portion was torn down and was to be remodeled as in the case of KBHM, but I was not able to exclude a portion of the terminal. So, would doing this require some other method?
This is the FS9 KSEA main terminal scenery object (the satellite terminals are separate objects)...
Capture.JPG


Excluding this object is an all or nothing proposition. To remove only a part of the model is beyond the capabilities of IS.

Modifying the model requires extracting it from the library and editing it in a modeling program, not to mention probably violating your EULA. For your own use that would not be a problem, only if you wanted to distribute the work.

cheers,
Lane
 
Messages
7,450
Country
us-illinois
I know when I start to do my project for BHM2008, I'll need to remove the round section at the very end of concourse C. It was just the round section that was torn down, not the C concourse.
Hi Ken:

Your OP makes it clear that you were given permission by the author of the BHM2008 add-on scenery package to modify the areas you described above.

To better pre-visualize what the actual shape of the 3D model is for the KBHM terminal concourse B+C inside BHM2008\Scenery\bhm_bc.BGL, that file can be opened in Arno's ModelConverterX (aka "MCX") ...which Lane has used in his latter posts above.

http://www.fsdeveloper.com/forum/forums/modelconverterx.87/


MCX also can export a copy of that MDL file in a file format that can be imported for editing in a 3D modeling application such as GMAX, Sketchup etc.

Hope this helps with the next phase of work with your project. :)

GaryGB
 
Last edited:
Messages
946
Hi Ken:

By now we have all expended a vast amount of time and effort typing text on a keyboard; a picture is worth a thousand words (or more !) ;)

Please load up any and all of the scenery files you want to use in your customized version of KBHM, grab a screenie, and use a graphics program to edit the image, being sure to label each object- or object(s)- you want to "exclude", and attach it to a post in this thread. :pushpin:

Then I'm confident one or more of us will be much better able to assist you with finishing up this scenery project to your satisfaction. :)

GaryGB


Hi Gary,
What I really like to do is to use a current satellite image to update the KBHM Scenery. But I'll need to learn how to use, either Gmax, or Scetchup, to create the brand new terminal. I guess Scetchup would be better for me to start off with. When I get ready to start that project, I'll attach photos of the new terminal. I never done this before and I hope I can learn how to do it and make it realistic.

Ken.
 
Messages
946
This is what the FS9 KSEA control tower scenery object looks like in MCX...

Everything you see in that pic is part of the model.

To exclude it with IS you would need to draw an exclusion rectangle around at least the object reference point, where the red, yellow, and green grid lines meet in that pic. That exclude would remove the entire model. not just the tower itself.

This is the FS9 KSEA main terminal scenery object (the satellite terminals are separate objects)...

Excluding this object is an all or nothing proposition. To remove only a part of the model is beyond the capabilities of IS.

Modifying the model requires extracting it from the library and editing it in a modeling program, not to mention probably violating your EULA. For your own use that would not be a problem, only if you wanted to distribute the work.

cheers,
Lane


Hi Lane,
I tried to import the KSEA control tower scenery and the main terminal scenery using MCX but I cannot find them. I only found one file named Seattle.bgl but that one is just the smaller terminal on each side of the main terminal. Where are these scenery files located for the KSEA stock airport?

Ken.
 
Messages
777
Country
unitedstates
Hi Lane,
I tried to import the KSEA control tower scenery and the main terminal scenery using MCX but I cannot find them. I only found one file named Seattle.bgl but that one is just the smaller terminal on each side of the main terminal. Where are these scenery files located for the KSEA stock airport?

Ken.

...\FS9\Scenery\NAMW\scenery\Seattle.bgl

My copy has 65 objects in it.

The tower is Seattle11 and the main terminal is Seattle63.

Capture.JPG


cheers,
Lane
 
Messages
946
Hi Lane,
Thanks. My has the same. I don't know why I forgot to click the objects editor list. I noticed you posted that tower, item 11, in the above post. The tower I was trying to exclude in my post above is in item 63 on top of the main terminal. But as you said, IS3 is beyond that capability. What's a good modeling program?

Ken.
 
Messages
7,450
Country
us-illinois
Hi Ken:

This procedure may answer many of your questions (...if you would be willing to try it at this point in time). :idea:

Start Arno's ModelConverterX (aka "MCX")

In MCX:

MCX Menu > click "Import" (browse dialog opens)

In MCX "Import" browse dialog, locate and select "[BHM2008 install path]\Scenery\bhm_bc.BGL"; click Open)

The KBHM terminal MDL for concourse B+C should now be displayed in the MCX workspace. :wizard:


At this point you could export a copy of the terminal MDL for concourse B+C into a 3D file format which can be imported and edited in ex: Sketchup. :pushpin:


Sketchup has a built-in utility feature which allows multiple precisely geo-rectified (aka "Geo-located") tiles of Google Maps / Google Earth aerial imagery (and even a lower resolution terrain mesh, if desired) ...to be imported into position in ones project onto the "ground" for planning / building / modding etc.

Sketchup models can then be exported in either of several file formats which can be re-imported into MCX, processed as desired, then exported for use in MSFS.

But that is an additional subject for future posts... when you are ready for it. :coffee:



NOTE: Because AFAIK all the objects for the BHM2008 add-on scenery package are each in their own single-object scenery library object-type BGL file without any placement information, they are regarded as NOT being "Geo-locked".

This means they may be normally accessed and opened by IS3 for viewing and placement etc. anywhere ...even when out on the tarmac at KSEA.


So, to confirm this (and to get another 3D preview of the KGHM terminal object you are seeking to modify:

In FS9, create a flight ex: out on the tarmac at KSEA, then launch IS3


In IS3's Main dialog
(...which displays the 'currently opened library pick-list' and a pick-list for the objects it 'contains'):

IS3 Icon Bar > click the "Options" button which has an an icon of a "check-box" (Options dialog opens)


In the IS3 "Options" dialog > [Instant Scenery Tab]:

Within the {Use Following Libraries} sub-section at top-left > check all those check-boxes, including "Libraries not available in this area"; click OK.

Exit IS3, then fully Exit FS9

Restart FS9, create a flight ex: out on the tarmac at KSEA, then launch IS3


In IS3's Main dialog:

Within the "opened library pick-list", find and select the library named: "bhm_bc.BGL", and then select the (only) object in the pick-list for the objects it contains

When you move the mouse cursor out of the pick list, the KBHM terminal MDL for concourse B+C should now be displayed in the FS9 / IS3 workspace < ...and yes, it will be BIG ! >


To scale the terminal object to a smaller size for inspection, in IS3, right-click the ground and, in the context menu pop-up, select "Object Properties"

In IS3 "Object Properties" for the selected / displayed terminal object, move the scale slider to the left so the terminal is at a more manageable size.

Once scaled as desired in IS3, left-click on the ground, and in the context menu pop-up, select "Add to file..." and enter a (fictional) file name in an existing 'active' scenery folder such as [FS9 install path]\Addon Scenery\Scenery ...to save the resulting (temporary) 'placement' BGL for that object.


You should now have your 3D terminal object displayed in FS9 (near KSEA), so you can evaluate it and plan your next steps for modifying the BHM2008 add-on scenery package. ;)

Hope this helps a bit more ! :)

GaryGB
 
Last edited:
Messages
946
Hi all,
I have a question about Sketchup. I've been watching tutorials on sketchup but they are all on subjects that have nothing to do with airport designing. The tutorials are on topics like building a table, a birdhouse, or a house, but I haven't found one that discusses airport design. It seems to me out of all of those tutorials, some of them would cover this topic. Are there any Sketchup video tutorials that cover airport designing? There should be lots of video tutorials on airport designing using Sketchup. I'm trying to learn as much about Sketchup as I can so that, hopefully, I can design the new KBHM terminal for 2015.

Ken.
 
Last edited:
Status
Not open for further replies.
Top