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

How to Use the Exclude In ADE

Messages
946
Hi,

There have been topics about using the Exclude to remove ADE objects, such as library objects, rather than deleting them. I've tried using the Exclude on several occasions but every time I would run the sim, that object I thought I excluded was still there. I would click on the yellow exclude tool at the top and draw a polygon around the object I wanted to remove, and then compile it to a bgl. Then I would put that bgl in my scenery folder. Could someone provide a tutorial on how to do this because I apparently am not doing something right.

Ken.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,853
Country
unitedkingdom
My first thought is why use an exclusion rectangle in ADE rather than just deleting the objects? You mention drawing a polygon - it is always a rectangle so I assume you are using the correct tool?

The preferred method in ADE is to delete objects in the display. This is particularly true if you are working from a stock airport. To understand how this works you need to know that when you load a stock airport into ADE (or Load Stock Data - see below) then ADE will generate a micro exclusion rectangle for each object such as a library object or generic building. This has the effect of excluding the stock object from the stock airport so that will not display. At the same time ADE creates its own copy of that object which is what you see in the ADE display and the one that appears in the sim. So the actions carried out for you are
  • Exclude the stock object so it will not be shown in sim
  • Replace it with a copy which is what shows in the sim
Now if you delete the object you can see in ADE (the copy) then it will no longer appear in the sim and neither will the original in the stock file. This is a much safer and cleaner method than placing a large exclusion rectangle over an area of the airport since that can cover objects that you don't want removed. Adding your own exclusion rectangle would remove the ADE copy and not the original which is already excluded.

The second point is that exclusion rectangles that overlap one another are known to cancel out so that the object actually re-appears.

ADE creates very small exclusion rectangles which only cover the reference point (placement coordinates) of an object. This tries to make sure that no unintended objects are also excludes.

Some users who load an ADE created bgl file will then see the micro excludes as small yellow rectangles. Not knowing what they are users have sometimes deleted them. This of course will allow the stock object to be displayed.

So unless you have a very good reason for using your own exclusion rectangle you should not. You should also never work from the bgl file but from the project file.

Those reasons could be that the airport was created by a third party and it contains object placements from the developer. Generally if an object won't get excluded then you need to understand why. It might be coming from a bgl file that loads after yours and so your exclusion rectangles will always be useless since they load after the exclude which is designed to remove them. Exclusion rectangles only work on objects in bgl files that FS loaded before it loaded the bgl file containing the exclusion(s). FS has a strict loading priority: https://scruffyduck.screenstepslive.com/s/help_docs/m/20268/l/199760-priority-matters

Now if you are working on a third party or other bgl file that contains stock objects which are not being excluded then you can use the option to Load Stock Data into the project:

1548753741251.png


You can then select which type of items you want to load:

1548753803615.png


This should bring objects back in that are missing and also create excludes. So now you can delete the objects you don't want and let the ADE micro excludes do their job.

Sometimes it can be helpful to start clean with stock objects in which case you can use the Remove Stock Data function followed by the Load Stock Data function.

It is always wise to make a copy of the project file before carrying out this work in case it doesn't works as expected.

So back to my original question - why do you need to use your own exclusion rectangles?
 
Messages
657
Country
austria
You should also never work from the bgl file but from the project file.

Those reasons could be that the airport was created by a third party and it contains object placements from the developer. Generally if an object won't get excluded then you need to understand why. It might be coming from a bgl file that loads after yours and so your exclusion rectangles will always be useless since they load after the exclude which is designed to remove them. Exclusion rectangles only work on objects in bgl files that FS loaded before it loaded the bgl file containing the exclusion(s). FS has a strict loading priority: https://scruffyduck.screenstepslive.com/s/help_docs/m/20268/l/199760-priority-matters

Now if you are working on a third party or other bgl file that contains stock objects which are not being excluded then you can use the option to Load Stock Data into the project:

View attachment 47486

You can then select which type of items you want to load:

View attachment 47487

This should bring objects back in that are missing and also create excludes. So now you can delete the objects you don't want and let the ADE micro excludes do their job.

Sometimes it can be helpful to start clean with stock objects in which case you can use the Remove Stock Data function followed by the Load Stock Data function.

It is always wise to make a copy of the project file before carrying out this work in case it doesn't works as expected.

So back to my original question - why do you need to use your own exclusion rectangles?

Thank you for this very interesting instruction! I often try to modify freewaresceneries and seldom there is a projectfile. Would it be better to save the loaded scenery immediatly to a project file and after to load this file? So I could safe modify the scenery.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,853
Country
unitedkingdom
Christian, It is an absolute rule when modifying a third party bgl file to do as you suggest. Load it into ADE and save it at once as a Project (.ad4) file. Then put the source bgl file in a safe place so it cannot be accidentally modified. Since you can immediately recreate it by compiling the project you can take it out of the sim. Compile your new bgl into the same location and the original to ensure it reacts in the same way with any other bgl files associated with the original. It is then worth checking carefully whether there are stock micro excludes in the project - there may well be if the bgl was created by ADE. Make sure that View > Exclusions is turned on:

1548855071290.png


If you find any small exclusion then leave them alone. Don't attempt to delete or move them. If you compile the project without modification then you can check in the sim that you have exactly what you had with the original bgl file from the third party developer (provided you moved it out of the sim and into safe place.)

Once you are satisfied that your copy behaves exactly as the original then you can start to make your changes in the project. Always work from the project file after the first load of the source bgl file. Never load and save from the bgl file after that.
 
Messages
7,450
Country
us-illinois
IMHO, it merits mentioning here that Jon has also created a particularly brilliant tool available via the ADE menu: File Priority Analyzer. :wizard:

ADE Menu > Tools > File Priority Analyzer


BTW: Jon has posted some very helpful information related to the process of using that tool to sort out file priority issues ...here:

https://www.fsdeveloper.com/forum/threads/stock-buildings-keep-showing-up.439486/page-2

https://scruffyduck.screenstepslive.com/s/help_docs/m/20268/l/589350-file-priority-analyzer-1-70


PS: An incidental benefit of using that tool is the potential for 'discovering' other files which affect rendering of objects at a specified airport.

This can also sometimes prove to be a reminder about prior "test" versions of an airport file that we "forgot" in a \Scenery sub-folder that is located within (1) or more Area layers still set 'active' in the FS Scenery Library GUI (aka in the active "Scenery.Cfg" file). :idea:

This can also help identify when we may have a forgotten file that 'might' contain a 'duplicated' a SDK BGLComp-compiled Exclusion Rectangle or SDK SHP2VEC-compiled Exclude Polygon ...that has the impact of cancelling other excludes that cover the same area or object type. :coffee:


Many thanks are due to Jon (aka "Scruffyduck") for his ongoing efforts to document how airport scenery rendering works, and for implementing tools to sort out potential complications with file priority. :)

GaryGB
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,853
Country
unitedkingdom
Thanks Gary. The File Priority Analyzer can indeed be useful in sorting out which file is taking priority over another. I am aware of a couple of bugs in it and that it does not work very well with P3D v4. I have a job on my list to fix the bugs and other issues with it.
 
Messages
946
My first thought is why use an exclusion rectangle in ADE rather than just deleting the objects?

Hi Jon,

Sorry it took me a while to reply. Well, let me explain what I'm doing. My project is the KHSV, Huntsville International Airport. The sim I'm using is P3D version 4.4. I wanted to update the default stock airport file as well as replacing the default terminal, buildings, and parking deck with my new custom terminal, buildings and parking deck using Sketchup. So, I open the default stock KHSV airport file using ADE. In this file are generic buildings and the main terminal is a library object. I want to get rid of them and replaced them with mines.


The preferred method in ADE is to delete objects in the display. This is particularly true if you are working from a stock airport.

Now I'm confused. I thought that you were not supposed to delete library objects in ADE but instead use the Exclude to remove them. It seems that I'm getting 2 different stories on this.


You mention drawing a polygon - it is always a rectangle so I assume you are using the correct tool?

Yes, you're correct. I didn't say it correctly.


To understand how this works you need to know that when you load a stock airport into ADE (or Load Stock Data - see below) then ADE will generate a micro exclusion rectangle for each object such as a library object or generic building. This has the effect of excluding the stock object from the stock airport so that will not display. At the same time ADE creates its own copy of that object which is what you see in the ADE display and the one that appears in the sim. So the actions carried out for you are
  • Exclude the stock object so it will not be shown in sim
  • Replace it with a copy which is what shows in the sim
Now, this is interesting to me. You show a different method than I've been using. You use "Tools" and "Load Stock Data." But you did say that working with 3rd parties which contain stock objects would be loaded this way. When I open a stock airport, I go to "File" "Open Stock Airport." This is the method I've been using to open a stock airport when I "first" start my project. So, is the method you've shown below only apply to when I'm working with a 3rd party bgl, or should I use the same method I've been using when loading a default stock airport file?


Now if you delete the object you can see in ADE (the copy) then it will no longer appear in the sim and neither will the original in the stock file. This is a much safer and cleaner method than placing a large exclusion rectangle over an area of the airport since that can cover objects that you don't want removed. Adding your own exclusion rectangle would remove the ADE copy and not the original which is already excluded.

Okay, I think I understand it now, and the next time I start a project, I'll use the method you show below.


So unless you have a very good reason for using your own exclusion rectangle you should not. You should also never work from the bgl file but from the project file.

Yes, that's how I've been doing, saving my Project file as a ad4 file and working from that.

Generally if an object won't get excluded then you need to understand why. It might be coming from a bgl file that loads after yours and so your exclusion rectangles will always be useless since they load after the exclude which is designed to remove them.

I think I understand. Does this mean that these bgl files are separate from the main stock airport file?


Thanks, Ken.



View attachment 47486

View attachment 47487
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,853
Country
unitedkingdom
Absolutely delete any library object, generic building, taxi sign or jet way in ADE if you have loaded a stock airport. This will leave behind the micro exclude (which you will not see in the project file) to exclude the stock item. Then add your own work. I have no idea at all where the advice not to delete library objects in ADE comes from. If they are stock objects then delete them in ADE. If they are not stock objects but placed by a developer then you may need an exclude which will work providing your modified bgl file loads after the one you modified. If third party bgl files are involved then follow my advice above (repeated here)
  • Create a project file from the third party bgl file,
  • remove the third party bgl file from the sim to a safe place,
  • compile your new project file into the same location as the original, check that you are seeing what you saw with the original,
  • now work only from your project file and make the changes you want,
If you are working from a stock airport file then don't use Load Stock Data. This is done automatically when you load the stock airport, Loading stock data is used where there is a third party bgl file you want to modify and you find that stock objects appear with your modified work.

I need to be clear that it is easy to say what to do when starting with a stock airport, Open it, use delete to remove things you don't want. There should be absolutely no need to use your own exclusion rectangles - in fact using them may well cause a lot of problems

If you are starting with someone else's bgl file then it get more complex and impossible to cover all the different scenarios in a tutorial. However the process is as far as possible described in the points above. Beyond that some developers split their airport over several bgl files, have object libraries and so on. Each case needs to be worked specifically. The File Priority Analyzer in ADE will help you to see what bgl files are involved in a particular airport.
 
Messages
657
Country
austria
To complement the problematic nature of third party airports. Sometimes there are not only airport.bgl files but also cvx,bgl files. I often had problems if I tried to delete such cvx-files, because the airport altitude or some scenerydetails don't show. So I deleted only the airport bgl-file and not the cvx.bgl. Sometimes I had to correct the airport altitude.
 

tgibson

Resource contributor
Messages
11,324
Country
us-california
Hi,

You are correct, you should not delete library objects, only exclude them. But read on.

Here is your confusion. To emphasize what Jon has said - when you "delete" an object in ADE you are NOT deleting it in FS - ADE instead automatically creates an invisible exclusion rectangle which will exclude it in FS. So the result will be the same as if you created your own exclusion rectangle.

So if you are editing a default airport and the default buildings are already displayed on the ADE screen, just delete the ones you do not want.

If you are editing an addon airport and the default buildings are not visible, follow Jon's advice above.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,853
Country
unitedkingdom
Christian, that is a very good point. CVX files contain terrain data and should not be deleted or moved. Sometimes the developer will generate separate airport and objects bgl files. In this case it gets more complicated because to recreate the project (.ad4) file you need to load the airport and then import the OBJ bgl file into it. At that point you hopefully created a proper copy of the original project file. If you are only interested in modifying airport facilities such as parking then you can probably leave the OBJ file alone and just replace the airport bgl file. As I said earlier it is not easy in some cases and may require experimentation. The important thing is never to actually delete or overwrite any of the original third party bgl files. Just move them somewhere safe while you try to recreate a faithful copy of the project file. If it all goes wrong then you can, at least, revert to the originals with no harm done.
 
Messages
657
Country
austria
@Tom Gibson: I never delete(d) stock airport objects changing third party bgl files. Editing an addon airport I seldom need default buildings. If they are undesirable visible I exclude them.
@Jon: If I will change an addon airport my way is to save the airport to an project file (AD4). Then I change the bgl fom the (original)addon airport file to OFF and compile the airport. The cvx file I let untouched. But sometimes then I have to correct the altitude of the airport. (Last case was MYXI at the Bahamas, where my AI landed about 10 ft deeper! because they used the stockairport altitude.)
 
Messages
946
Absolutely delete any library object, generic building, taxi sign or jet way in ADE if you have loaded a stock airport. This will leave behind the micro exclude (which you will not see in the project file) to exclude the stock item. Then add your own work.

I think I got it. So the way I understand it is that I open the default stock airport file, and if I want to remove any object, rather it be a library object, generic, or whatever, I high light it and press the delete key. But I understand that doing this DOES NOT actually delete the object but creates a micro-exclude so that the object doesn't show up in the sim. I remember seeing these little yellow excludes when I would open from a compiled bgl file. I would always ask myself how did those excludes get there or where did they come from because I knew I had not used the Exclude tool. But if my understanding is correct, ADE excluded those objects when I pressed the Delete key in my project.


I have no idea at all where the advice not to delete library objects in ADE comes from.

Well, an example is what Tom stated, you should not delete library objects, but only exclude them. But he did emphasize on what you were saying. If I can use the "Delete" key to remove the objects I don't want, then why bring up that one should not delete an object in the first place? That is where the confusion comes in. So, I started using the Exclude Tool. But I think I understand everything now.

If they are stock objects then delete them in ADE. If they are not stock objects but placed by a developer then you may need an exclude which will work providing your modified bgl file loads after the one you modified. If third party bgl files are involved then follow my advice above (repeated here)
  • Create a project file from the third party bgl file,
  • remove the third party bgl file from the sim to a safe place,
  • compile your new project file into the same location as the original, check that you are seeing what you saw with the original,
  • now work only from your project file and make the changes you want
Thanks. I will place these instructions so that I can refer back on them.


I need to be clear that it is easy to say what to do when starting with a stock airport, Open it, use delete to remove things you don't want. There should be absolutely no need to use your own exclusion rectangles - in fact using them may well cause a lot of problems

If you are starting with someone else's bgl file then it get more complex and impossible to cover all the different scenarios in a tutorial. However the process is as far as possible described in the points above. Beyond that some developers split their airport over several bgl files, have object libraries and so on. Each case needs to be worked specifically. The File Priority Analyzer in ADE will help you to see what bgl files are involved in a particular airport.

Got it.

Thanks, Ken.
 
Last edited:
Messages
946
Hi,

To emphasize what Jon has said - when you "delete" an object in ADE you are NOT deleting it in FS

I already knew that it doesn't delete the object in the FS. I just didn't understand that when I delete the object in ADE, it creates an exclude that removes the object in the sim. Jon says that I would delete the objects, and there's no reason to use the exclude tool, and I assume he means that I would high light the object and use the Delete key to remove it. If my understanding is still wrong, then y'all let me know.

Thanks guys for these tutorials and bringing this to my attention.

Ken.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,853
Country
unitedkingdom
@Tom Gibson: I never delete(d) stock airport objects changing third party bgl files. Editing an addon airport I seldom need default buildings. If they are undesirable visible I exclude them.
@Jon: If I will change an addon airport my way is to save the airport to an project file (AD4). Then I change the bgl fom the (original)addon airport file to OFF and compile the airport. The cvx file I let untouched. But sometimes then I have to correct the altitude of the airport. (Last case was MYXI at the Bahamas, where my AI landed about 10 ft deeper! because they used the stockairport altitude.)

That's a good way to do it Christian and probably better than moving the bgl file out of the sim to another folder.
 
Messages
226
Country
maldives
Now if you are working on a third party or other bgl file that contains stock objects which are not being excluded then you can use the option to Load Stock Data into the project:
This is a very interesting feature that was discussed here earlier:
I correctly understood, that this should help hide the default objects(duplicates) in third-party scenary?
 

tgibson

Resource contributor
Messages
11,324
Country
us-california
If they are indeed objects originally in the default airport (i.e. not added by the 3rd party scenery) then this will help hide them.
 
Messages
946
Hi, Jon

I've mentioned above that I usually work from my project file, but that was later on in my project. When I first start my project, I would open the stock airport that I wanted to modify, and delete all the objects, including generic buildings and library objects, and start from scratch. When I want to come back and work on it later, I would save it as a ad4 file and always work from it, but I had already deleted or made some modifications. When I went back and reviewed these posts again, there was one thing that you've mentioned that I did not take in. From what I gather now, when you open a stock airport, always save that as an ad4 file project file BEFORE you make any modifications, and I haven't been doing that. When I first open the stock airport, I would delete objects, then save the project as ad4 file then always work from it when I go back and work on it again. But the deletions, or modifications I made to the stock file was never lost or changed. From what I understand, I should delete objects, including library objects, or whatever objects I don't want, rather than using excludes as I did at one time. The reason I used the excludes is because I had the understanding that you were never supposed to delete library objects from a stock airport but to exclude them. From what I gather here, deleting the object excludes it. You also mentioned about the small exclude squares but I don't see any of those small squares, unless they only appear AFTER the object has been deleted. I remember those small squares and if I recall, it was after I deleted an object before these small squares appeared.

So, from now on when I make modifications to an airport, rather it be stock or 3rd party, always "save as," and work from that file BEFORE I delete or make any modifications. Do I have that correct now?

Ken.
 
Top