Sign in to follow this  
Gridley

FSX BglComp ExclusionRectangle - Help needed

Recommended Posts

Hi,I've tried to exclude all objects in a small area with the following xml code (I've omitted the FSData tag and xml prolog).It doesn't remove the default FSX autogen objects. Has the behaviour of exclusions changed in FSX? I've placed the exclusion bgl file with a lower priority than my custom scenery folder, but with higher priority (above) all other scenery entries.It might be the coordinates that are faulty. I've manually converted the FSX coordinates, for example: "N55 45.20" to decimal "N55.75333", which is 55 degrees plus 45.20 / 60.Any help will be appreciated :-)EDITED: Sorry for this post - I found the answer in other posts. Autogen must be disabled with Shp2Vec.exe.Ulf B

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi again,After looking into the SDK on the tool Shp2Vec.exe, I must say that it seems to be a pretty complex task to exclude autogen objects for a small area. This feels like a giant step backwards compared to FS2004, at least for an amateur like me.Ulf B :-(

Share this post


Link to post
Share on other sites

So how do you do it?I am creating y local airfield that does not exist in FSX and have got it working perfectly (runways anyway) except that FSX keeps putting trees in the middle of the runways.I have the deluxe version so do have the tools but cant see how to exclude the area.

Share this post


Link to post
Share on other sites

Yikes! Ulf, it seems that BGLComp excludes no longer remove FS X autogen. Only Shp2Vec excludes can do that. I haven't tried excluding with BGLComp yet, but from what I have read, this is the new behavior.This is a shame because it is much easier and quicker to use BGLComp and most people are already familiar with it.Well, too bad. But, I shall put together a quick tutorial on excluding using Shp2Vec and put it in this forum, probably this week-end for anybody who is interested.Best regards.Luis

Share this post


Link to post
Share on other sites

Resampled photoscenery seems to kill autogen too. Wonder if an invisible photo would to the job? :)

Share this post


Link to post
Share on other sites

Luis,A tutorial would be wonderful and save me a lot of time. For now I'm giving my scenery building a rest. Thanks a lot for all help and comments. This is a good community :-)Ulf B

Share this post


Link to post
Share on other sites

>> I shall put together a quick tutorial on excluding using Shp2Vec.I'm sure many people will be happy to hear this. It has taken me about a week to master the method. Might I add another small point. Exclusion polygons exclude normal autogen but not annotated photographic scenery (.agn files).George

Share this post


Link to post
Share on other sites

>>> I shall put together a quick tutorial on excluding using>Shp2Vec.>>I'm sure many people will be happy to hear this. It has taken>me about a week to master the method. >>Might I add another small point. Exclusion polygons exclude>normal autogen but not annotated photographic scenery (.agn>files).>>George>Autogen annotated onto photographic scenery should be excluded by the same mechanism as normal autogen. Unfortunately, due to an unintended side-effect of an optimization, this is currently broken. We are looking into it.-Doug

Share this post


Link to post
Share on other sites

I feel for you, George. It took me a long time to understand it all, and I still have my doubts!I guess the only way to remove annotations for the moment is through the Annotator - open the file and delete! Ouch!Best regards.Luis

Share this post


Link to post
Share on other sites

Up till now, I had not had a chance to make any excludes using BGLComp.I received a message from Edgar Knobloch gently urging me to look more closely at this. Thank you, Edgar, for your tact.I had read some comment, I believe it was by Doug Matthews on another forum, confirming that autogen could only be removed by a Shp2vec file, an FLX (Airport Background) but that doesn't flatten, only removes autogen. But, I am probably wrong and it was most likely just a misunderstanding.There is some interesting behavior concerning XML excludes created with BGLComp.Here is a simple exclude: It seems to follow the example given in the S.D.K. and yet an error was generated:INTERNAL COMPILER ERROR: #C2628: Exclusion contains extra flags. The option 'excludeAllObjects' cannot be combined with other flags.INTERNAL COMPILER ERROR: #C2031: Failed element parse INTERNAL COMPILER ERROR: #C2032: XML Parse Error! Element tree follows:Very interesting, since the S.D.K. explicitly states: excludeAllObjects -- Boolean indicating whether all objects are excluded. If this is set to TRUE, then all the following exceptions are ignored, and need not be entered into the xml file.It does not mention that the other keys should not be entered.But, this is not the problem, just a misunderstanding. After removing those keys, the bgl compiled fine.What was the result?http://forums.avsim.net/user_files/161031.jpgEverything seems to be gone. Except for some objects in a higher layer in the scenery library.Removing the exclude brought trees and houses back.http://forums.avsim.net/user_files/161032.jpgToo many houses. This is really just the sparsely habited countryside, but the new ground textures have so much more autogen than before that it looks crowded! I shall have to change the land class.So, XML excludes seems to work just fine.It came to me, though, that I have the xml autogen file turned off. I do not know how the new autogen works, and do not recall any explanation on this from the FS Team. Yet, in spite of having the xml autogen turned off, I still get autogen buildings, and plenty of trees on the forest land class (that normally did not have an annotation in FS 9).So, I turned on the xml autogen and saw something strange, to say the least.http://forums.avsim.net/user_files/161033.jpgThe exclude seems to work, but not on those trees at the top that appear in the area of the exclude.Fine, time for the big guns. I turned on all the autogen, xml and non-xml, and pushed the slider to Extremely Dense and saw this:http://forums.avsim.net/user_files/161034.jpgThe exclude seems to work up to about a longitude of -70.0924. Great, except that I specified -70.10 in the xml file. All those trees and buildings should not be there at all.So, I slewed around the exclude area and found: - North limit of exclude is N18.4899 instead of N18.50 - East limit of exclude is W70.0049 instead of W70.00 - could not measure the Southern limit of exclude, as I miscalculated and placed it in the Caribbean, but I imagine it is the sameWhy does the exclude work well, except towards the edge? No idea. But, it certainly removes everything, except objects on a higher scenery layer.http://forums.avsim.net/user_files/161035.jpgDid the excludes made in the previous version show the same behavior? I never noticed, in any case.Anyway, the moral of the story seems to be: don't believe everything you hear, test, test, test. And thank you, Edgar, for pointing out that this does in fact work.Now, why does Ulf, or anybody else, have problems with xml excludes? Would they please post the xml code so that we can take a look?Thank you.Best regards.Luis

Share this post


Link to post
Share on other sites

Hi Luis,This is my code, that doesn't work.<?xml version="1.0" encoding="ISO-8859-1"?> The rectangle is a pretty small area on the Swedish coast, where I want to clear all autogen before placing other buildings there.Ulf B

Share this post


Link to post
Share on other sites

Hi again,Funny thing. If I make the exclusion rectangle larger it works! This needs some further testing.Ulf B

Share this post


Link to post
Share on other sites

Hi Luis.It almost looks as if a whole LOD13 must be within the exclude, or it doesn't work. But even that is not precise. Perhaps some autogen overlaps those bounds with some sort of refpoint that is still within the adjacent LOD13 area?Dick

Share this post


Link to post
Share on other sites

Could be, Ulf. But, I have not had problems with the size of an exclude and have made some that are very small. Although that was with FS 9.On the other hand, I think that it is Jon Patch or Matt Fox who has pointed out a problem with the example in the S.D.K. document. It seems that the line in the section Scenery File Format<?xml version="1.0" encoding="ISO-8859-1"?>

Share this post


Link to post
Share on other sites

I was coming to that same conclusion, Dick. It is very strange, indeed.What makes it even stranger is that the exclude removed normal autogen, but not the forest trees (that have no annotation).And then, when xml autogen was activated, the exclude removed that within the exclude, but not at the edges.I shall take a look in TMFViewer and see if there is a relevant grid somewhere along there that might explain clipping.As for a reference point, that autogen is pretty far from the Bounds I chose, but then we have not been told anything about the new autogen, so who knows?Best regards.Luis

Share this post


Link to post
Share on other sites

Luis,The bgl file didn't work. I'm using MyWorldFSX Landclass and maybe this make a difference. We won't have the same textures on this spot.I've arranged a bigger exclude that works for me. Funny thing that the xml-parsers doesn't work the same. Might this be a factor. I'll continue the testing some other day.Ulf B

Share this post


Link to post
Share on other sites

This is astonishing. It is even frightening.Ulf's coordinates do not fill a LOD 13/quad 15 quadrant. And a BGLComp exclude will not work in such a small area.How did this come about? Was anybody aware of this? Dick, George, you get around to other fora, has this been discussed?Anyway, I don't recall any detailed information concerning this.Ulf, sorry, you were right. Many thanks for bringing it to our attention. It is very important.I made a small vector exclude with Shp2Vec:http://forums.avsim.net/user_files/161060.zipIt seems to work:http://forums.avsim.net/user_files/161058.jpghttp://forums.avsim.net/user_files/161059.jpgPlease let me know if it works for you.So, this is what I have found so far.An xml exclude will work correctly on the old-style autogen, including up to the coordinates specified.However, and even if the xml autogen file is not active, any of the new-style autogen trees will not be excluded if the entire quad 15 is not covered.And this applies to all the new autogen if the xml autogen is active.So, the xml BGLComp excludes will mostly be useful for removing non-autogen objects like control towers, VORs, etc.Well, time for everyone to learn how to use Shp2Vec, I guess.Best regards.Luis

Share this post


Link to post
Share on other sites

Hi Luis.I think this is about right. We should be using XML excludes to get rid of objects, and Shapefile/Vector excludes to get rid of autogen.I haven't read of anything like the QMID15-sized minimum for autogen XML exclusion anywhere else. But it seems true.Dick

Share this post


Link to post
Share on other sites

Hi LuisThanks for the information on xml exclusion rectangles - looks very interesting. Seems that they do work but you need to be careful how the xml is generated and which attributes are used for different circumstances. Also it seems better to use Shp2Vec to remove autogen.

Share this post


Link to post
Share on other sites

Hi Luis,The exclude made with Shp2Vec did work very well. All autogen buildings and trees where removed :-)Ulf B

Share this post


Link to post
Share on other sites

Hello Luis,could you please tell me again, what is the difference between "normal autogen" and (not normal) "forest trees"?And how do you "turned off the xml autogen file"?I came to the same conclusion about the size of the exclusion rectangle: it must include at least a full area. When 1,5 areas are enclosed, only the autogen of the full area is excluded.Maybe this explains your problem with the not excluded edges.(all other rectangles (for library objects etc) can be smaller and more precise)And I still have the problem, that only the first (FULL) exclusion rectangle is recognized and a second one is ignored.Even putting 2 exclusion bgls with 2 switched rectangles into the same scenery-folder did only exclude one area (see the attached sample).PS: I have the same problem with the double quotes: When I do copy and paste the samples from the SDK, they do not compile until I change the double quote character.It might be a problem with the character sets of international Windows versions?Best regards,Edgar

Share this post


Link to post
Share on other sites

Hello Edgar,I wish I knew how FS X autogen works. There has not been any information from the developers on this.I see different types of autogen, however.There is the new xml autogen that can be found in the default.xml file in C:Program FilesMicrosoft GamesMicrosoft Flight Simulator XAutogenThis contains a lot more objects than FS 9, a lot more, and of all different sorts.Since this quantity of objects can drag performance down, I have disabled this file by simply changing the name to default_original.xml and I no longer get any of the objects from there.Well, almost. The forest land class does not have an annotation file, just like in FS 9, and the trees appear even with the default.xml disactivated. These are the new-style canopy trees that are defined in the default.xml file.And I still get plenty of houses that are exactly like the old FS 9 houses and that are not included in the new xml autogen file.Now, the FS X ground textures are annotated extensively (and whoever did that - by hand! - deserves a medal, and a year's paid vacation) and have different types of objects.There are the normal building annotations, and also vegetation (new xml canopy-style), and also polyline buildings (the new European-style buildings with courtyards), and xml buildings and landmarks. There should be a list somewhere in all that I have sent you of the contents of the autogen bgls.So, I assume (but do not know) that by disabling the default.xml file, all that can display is the normal houses that are annotated, and on the forest textures, the new trees (and this, even though the default.xml is not active.)Anyway, it is all assumption, I don't know, and no developer has told us yet how it all works.Sorry, I thought that your problem with the exclusion rectangles was due to the difference in flags for each exclude. But, I see that you now have only the flag excludeAllObjects = "TRUE" for both.It is strange and does not make any sense at all. I shall play with it, but probably will have the same result as you. I really don't know.As for the double quotes, it is, as you say, probably dependent on the character set. Perhaps Ulf has a Swedish system and there is no difference in the quotes there. I have a U.S. system and there are straight and curved quotes, each has a different ASCII value and probably leads to problems with BGLComp. But, again, it is all guesswork.Sorry, I shall get back to you, as your problem is quite unsettling and deserves a lot of study. It does not make any sense at first sight, does it?Best regards.Luis

Share this post


Link to post
Share on other sites

Hello Edgar,It seems that there are 2 different things here.In the excludes of Friday, you had 2 examples that did not work, and one that did. The 2 that did not work both had the flags as such: exclude 1 excludeAllObjects = "FALSE" excludeLibraryObjects = "TRUE"/> exclude 2 excludeAllObjects = "FALSE" excludeGenericBuildingObjects = "TRUE" excludeLibraryObjects = "TRUE"/>As i pointed out, we had found in that thread to which I linked, that exclude flags must all be the same for all excludes in the same bgl, or only the first would work.However, in your final example, you changed the order of the flags to this: exclude 1 excludeAllObjects = "FALSE" excludeGenericBuildingObjects = "TRUE" excludeLibraryObjects = "TRUE"/> exclude 2 excludeAllObjects = "FALSE" excludeLibraryObjects = "TRUE"/>and it worked for you.So, it would seem that we were wrong and that somehow it is necessary to declare all the flags that will appear in the code in the first exclude only. If any subsequent exclude does not declare a flag that was in the first exclude, then it is ignored. Since your second exclude has a flag that appeared in the first, then it works. Just a guess, but it seems as if this is what happened for you here.However, your example of today is quite different.Here, both of your files use the same flag throughout, the comprehensive excludeAllObjects = "TRUE"so that this would no longer be the cause of a problem.But, you have now changed the size of your excludes, reflecting our new knowledge that an exclude must cover an entire Area in order to remove all of the autogen. In addition, your 2 excludes now overlap and slightly cover each other towards the center on the Spree.http://forums.avsim.net/user_files/161101.jpgThere are 2 things.First, just curious, why are you trying to exclude all the autogen in those 2 Areas? Berlin will look very stark and empty there! Before you were eliminating the Handelszentrum with a small exclude and I could understand that, but with these large excludes, you will remove so much more.Secondly, perhaps because your excludes overlap each other, they are somehow interfering. Maybe that is why you get a problem with ordering. This is just a wild guess on my part, because I really don't see anything wrong with your code that could explain a problem.I don't really see how one could do any differently, though. Perhaps you could try declaring the precise Area boundaries for Lat-Lon as such: They don't overlap with these coordinates, but perhaps they are too precise. Anyway, it is worth trying.Best regards.Luis

Share this post


Link to post
Share on other sites

Hello Luis,thanks for your answer! In my first testfiles sent to you on Friday I just wanted to exclude one single building in Berlin, which is not a library object, but a generic building. This is displayed in the scenery, even when the autogen slider is at 0, but has no unique ID.I stumbled over the problem, that this "excludeGenericBuildingObjects" rectangle must be the first in the list of rectangles.The second testfiles (here in the forum) are used to test the autogen-exclude-problem ("ALL") from Lars. I do not want to exclude 2 whole areas in Berlin - they are just a test sample. I just want to exlude autogen in one small rectangle in (13206,31413), but this doesn't seem possible with BGLcomp code now.But what I find quite strange, is that using both exclude bgls in the addon-scenery folder didn't work either and excluded only one rectangle. However, I didn't test 2 bgls with just a single rectangle each.What I want, is a chirurgical knife to exclude objects in a small polygon, not a wooden hammer to flatten whole countries.Looking forward to a small description, how to create excludes with shape2vec... :DBest regards,Edgar

Share this post


Link to post
Share on other sites

The saga continues.Edgar found that a BGLComp exclude would not exclude autogen unless an entire LOD 13 Area (quad 15) was covered.In addition, he found that, of multiple excludes, only the first would exclude autogen.Whenever multiple excludes were in the same bgl, the effect was the same, and only the first exclude removed autogen.I have now verified this behavior. It does not matter if the exclude rectangles overlap or not, whether they are touching each other or separate - only the first will exclude autogen.So, it would seem that BGLComp excludes are not altogether reliable as far as autogen is concerned.I wondered about the other flags though.I have some other things to exclude in an airport - default library objects, triggers, generic buildings.http://forums.avsim.net/user_files/161148.jpgHere is the exclude code:I did not bother to specify different flags since we had determined a year and a half ago that there were complications with the mixing of the different exclude flags. And excludeAllObjects should remove everything.And it does.http://forums.avsim.net/user_files/161149.jpgSo, BGLComp excludes still seem to be reliable for everything except autogen. And they will work for autogen, but only with one single exclude area - any others will be ignored. As Doug said, "broken!"I agree with you about the hammer, Edgar. Too bad.Best regards.Luis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this