Jump to content
Sign in to follow this  
arno

Autogen Exclusions

Recommended Posts

OK, here is what I have found this weekend.First about the old style SCASM polygons. I have to rephrase my conclusion a bit, it now is:AutoGen is excluded for each Area in a rectangle that fits the biggest object found and that exclusion is centered around the last RefPoint found in the source.Because I used two identical objects in my first tests I didn't found that. More details: http://home.wanadoo.nl/arno.gerretsen/autogen/oldpoly2I also tried the new FP poly commands, same result. http://home.wanadoo.nl/arno.gerretsen/autogen/newpolyI haven't finished this yet, but I had a look at the old roads also. It seems that they exclude autogen in a rectangle that fits around the entire road. So this can have a big influence on the autogen. I'll try some other settings to see if that has an influence. But on the other hand they are mainly used for airport taxilines nowadays (we have VTP roads for the real roads). So the autogen exclusion is no real problem then.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.So, the autogen exclusion is a rectangle fitting the largest poly, but centered on the last Refpoint used in the defined Area.I'm still trying to see the figure in the effect of a trailing Dummy call, and why that spares the autogen.Also, did you over/under exaggerate the v2 in any of the examples to finally rule out that influence? I wouldn't ask, but I found an undersized v2 to be a problem with the SurfaceType command.Dick

Share this post


Link to post
Share on other sites

Yes, that's what I found. If there are more then one RefPoint in the Area then autogen is excluded for the biggest area in size and centered around the last RefPoint.Of course most design programs use one Area and one RefPoint for each polygon and then these things not happen (then it is just the tighest fitting rectangle).I'll have a look at the dummy call this evening to see which effect that can have. I expect the effect is that you confuse the algorithm that determines the size and thereby not exclude anything. But I'll have a look.I have only tried to use a oversized v2 (the results are in my first page with results). There the v2 value didn't have any effect. I never tried undersized ones, as they shouldn't be there (they can give visual problems as well for example). I'll have a look at it this evening, to see if I can get effects like you mention.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.The reason I mentioned an undersized v2, was because that is what had an effect regarding SurfaceType. If the v2 was equal to or greater than the SurfaceType area, the autogen was fine. So in that case, disappearing autogen was a symptom of an undersized v2...and maybe that would be handy to use as a 'verifier' for proper v2 sizing (?)I'm very much leaning towards the idea of only one Refpoint & object ( or poly,effect, etc... ) per defined Area. It does keep things under control. Special instances, like J.R. Morgan's idea of chaining objects with TransformCalls should probably remain 'special' and not the norm, as a design idea.Perhaps we will find dummy calls a valid design technique to save autogen, but I'd like to explore any bad effects they might have, as well, in a future thread. For now, it appears they are the only method to preserve autogen.I find it interesting that autogen exclusion is rectangular for runways, but appears square (?) for groundpolys, old roadlines, and surfacetypes. That seems to have a relation to v2, as that is found to be square ( not a RADIUS as the SDKs indicate ).Dick

Share this post


Link to post
Share on other sites

Hi Dick,>The reason I mentioned an undersized v2, was because that is >what had an effect regarding SurfaceType. If the v2 was >equal to or greater than the SurfaceType area, the autogen >was fine. So in that case, disappearing autogen was a >symptom of an undersized v2...and maybe that would be handy >to use as a 'verifier' for proper v2 sizing (?)Yes, very interesting indeed. I need to have a look at this when I get home :). I only tried increasing the v2, not decreasing as that makes no sense from my point of view.>I'm very much leaning towards the idea of only one Refpoint >& object ( or poly,effect, etc... ) per defined Area. It >does keep things under control. Special instances, like J.R. >Morgan's idea of chaining objects with TransformCalls should >probably remain 'special' and not the norm, as a design >idea.I do not agree here. I think it is more efficient to collect several things that are close to each other in one Area. A program like GroundMaker for example also does that and (I can't prove it with figures, but it's a feeling) they give a better framerate for the scenery then Airport for example.So I think collecting several RefPoints in one Area might be a good thing to do from performance point of view.>Perhaps we will find dummy calls a valid design technique to >save autogen, but I'd like to explore any bad effects they >might have, as well, in a future thread. For now, it appears >they are the only method to preserve autogen.Agree. I'll see if I can play with some this evening and try to find some "rule of thumb" again. But before we put it there as the solution we need to look at the side effects also.>I find it interesting that autogen exclusion is rectangular >for runways, but appears square (?) for groundpolys, old >roadlines, and surfacetypes. That seems to have a relation >to v2, as that is found to be square ( not a RADIUS as the >SDKs indicate ).I assume you mean with rectangular that it is also rotated with the runway and so is more an expanded runway shape, where for polygons etc it also is a rectangular (the shape doesn't have to be square), but that it is not rotated and therefore can kill a lot of side autogen that we want to be saved.Maybe I need to reread some of the posts, but how did you find out that the v2 is square?EDIT: Just reread your post where you note the square v2. I think the scenery engine still uses the v2 as a radius when determining what to draw, but for the autogen exclusion it might just take the value and make a square/rectangle out of that.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.My evidence of the squareness of v2 came from what I discovered about SurfaceType.A SurfaceType area of 100 x 500 meters needs a v2 of 500 ( or greater ) to NOT exclude autogen. If the v2 is 100, then autogen will be exclude in the center, a 100 x 100 square. If a v2 of 50, the autogen excluded will be a 50 x 50 area centered at the refpoint.So the v2 controls the exclusion... and the v2 is showing a square shape.. not a radius. So the appearance is the v2 is a square, centered on the Refpoint, with the x,y size of the value ( and it also appears to be scaled by the Refpoint's scale value, as well ).The shape is definately not round, nor a radius ( 1/2 the distance from the center of the 'circle' ).Logically, it makes much more sense, that this is square, and an x,y centered on the Refpoint. I could never quite figure out wht MS would use a radius. The math is just unnecessarily complicated. I think this is just another SDK mistake that has existed from version to version, because the SDK writers are not scenery designers, and would never catch the mistake in terminology.Dick

Share this post


Link to post
Share on other sites

I still think you can't conclude from the way the autogen exclusion handles the v2 value that the scenery engine also uses it the same way when it determines to draw or not to draw a certain object.If you work in a normal xyz coordinate system then indeed the radius isn't that logical, but if you work with polar coordinates then it certainly does.Because the v2 is used to determine when you object is not on the screen it might be hard to test if it uses a square or a circle (because the object is never visible when the v2 comes into play). But I'll try and see if I can find something.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.Yes, the evidence that v2 is square. is a little thin. But SurfaceType definitely interacts with the v2 value, and the exclusion of autogen controlled by that value is a square shape, not a circular shape.. or even a radius ( more closely related to a diameter ).So it's possible this is a mistake or shortcut in the autogen coding, but I still suspect v2 is square... or perhaps a cube. Dick

Share this post


Link to post
Share on other sites

Hi Dick,Didn't found much new things last evening, but I can confirm some things you said.First, indeed the SurfaceType command does exclude autogen when the v2 value is too small. Maybe I should check the other thread from Sebastian again, but that should mean that Bumpy should also not exclude autogen (if the design program used the correct v2 value).Second, I had a little look at the polygons with a dummy call. Indeed then all autogen is saved (we already knew that), but I can't find any reason for it (maybe apart from it confusing the algorithm for the exclusion as I guessed before).Finally, at this is nice I think. I did a test with the v2. I made a circular shape polygon with a radius of 1000 meter. On top of that I draw roads in a square with sizes of 1000 meter (so the circle is bigger). Both had their own RefPoint. For the circle I set the vw value too small (at 500).Then I moved from the centre point forward at heading 0 and indeed the polygon dissapeared when I was 500 meter from the centre (just crossing the road). Then I did the same at a heading of 45 and now the polygon dissapeared when I reached the road again. That means that the v2 is indeed a square and not a radius as we have always thought.This makes me think, I should still test it, that we might have set the v2 value to big all the time. If you have a square of 1000x1000 meter then the radius is sqrt(2)*500 = 707. But maybe 500 is enough because we are talking about a square that should fit and not a circle anymore. I'll try to test this this evening.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.Yes, that was a very good test. So the idea that v2 is a lat-long square, centered on the refpoint, can move from a guess to a theory. :)I would be curious if the scale is shown to affect v2.. so that it's not always meters, but controlled by the Refpoint scale factor as well. ( I suspect it is ).If you could attach some code, I could check it with FS2000 and CFS2, to see if v2 has been a square for quite some time.Maybe we need a new thread to deal with v2 findings?I know the Refpoint of an object should be the point needed in an exclude file to make it vanish... but must the exclude area also include the whole v2? If so, then excludes should be sized to the object's v2. And does v2 rotate with an object? That would also affect excludes. I'm suspecting v2 does not rotate, so perhaps it does need to be the size of the largest 'diagonal' in the object :)Dick

Share this post


Link to post
Share on other sites

I think we are getting off topic indeed, let's start a new one about the v2 things. I'll take my code with me tomorrow so you can do some tests with it.And indeed I also planted to look at scale effects, until now I did all tests with scale 1.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.A new thread would be good for v2.. can you start it in a day or so?I still have questions about autogen.The older roads seem to have a bad effect on autogen. We have both FS98-style road and FS2000-style road types to look at. I think we can skip the textured Area16n polys, as there is no need for those anymore.I still think Library objects react a little differently with autogen, than ground polys or simple or advanced 'Building' code. For example, does the shadow of a library object affect autogen as well? What is the autogen effect of a library object's SIZE and POWER, as well as that assigned by the Refpoint?And I don't know if we thouroughly explored excludes.. both the 'switch' type in the CFG file, and the BGL types ( SCASM lists 2 bgl methods ).Then, aren't there newer FP ground polys? Would they react the same as the older types?So, we still have a little way to go with autogen exclusion.Perhaps, today, I'll try to go over various types of object excludes.Dick

Share this post


Link to post
Share on other sites

>A new thread would be good for v2.. can you start it in a >day or so? I already did :). I will enter some more info about the file I used etc tomorrow.>I still have questions about autogen. Yes, I think we are not ready with this thread yet.>The older roads seem to have a bad effect on autogen. We >have both FS98-style road and FS2000-style road types to >look at. I already had a look at the Fs2000 style roads (RRStart/RoadCont) as I noted in a previous post. Just like for the polygons everything is excluded for a rectangle that fits around the entire road. As roads can be rather big this has a devestating effect of course :). I do still have to look at other parameters that could have an effect on this.>I think we can skip the textured Area16n polys, as there is >no need for those anymore. Uhhh, textured Area16 polygons???? As far as I know there are only Area16 flatten polygons. But I agree that these shouldn't be used anymore, as the LWM polygons provide a much better way of doing it.>I still think Library objects react a little differently >with autogen, than ground polys or simple or advanced >'Building' code. For example, does the shadow of a library >object affect autogen as well? What is the autogen effect of >a library object's SIZE and POWER, as well as that assigned >by the Refpoint?True interesting questions. Until now I have only looked at the effect of a ground polygon, not of an object with a PerspectiveCall. Surely something I want to have a look at. I agree that the SIZE and POWER might be interesting, until now I never understood what they really do (I don't see any effect), so maybe we can find a link here with autogen.>And I don't know if we thouroughly explored excludes.. both >the 'switch' type in the CFG file, and the BGL types ( SCASM >lists 2 bgl methods ).I think there is only one SCASM method, but I haven't looked at the influence of excludes yet. Might be a good idea to add that to the to-do-list too. Then we can make a complete autogen guido or so.>Then, aren't there newer FP ground polys? Would they react >the same as the older types? They act the same (http://home.wanadoo.nl/arno.gerretsen/autogen/newpoly). I already had a look at that.>Perhaps, today, I'll try to go over various types of object >excludes.I think I'll first finish my tests with the old style roads and after that move over to 3D objects (not the library objects, that's for later from my point of view). Could prevent double work :). Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi all.I've found that object excludes will delete autogen, whether they are in the Scenery.cfg as a switch, or as a BGL.There are 2 types of autogen... AGN files, and generic 'hard-coded' autogen.There is one odd requirement.If an exclude is in an area with ONLY hardcoded autogen ( no objects in the object exclude area ), then the generic trees won't be excluded. Add an object to the area, and generic tree autogen is then excluded, while the object remains. Even adding an object with a "dummy call ", to try to save autogen, won't help here.Here's an exclude in an area of generic autogen:; =================; RussiaEx.sca N64* 0.00' E49* 10.00'Header( 1 N65:00:00.0000 N63:00:00.0000 E050:00:00.0000 E048:0:00.0000 )LatRange( N63:00:00.0000 N65:00:00.0000 )Exclude( F N64:10:00.00 N64:00:00.00 E049:10:00.00 E049:00:00.00 ); =================This should exclude a 10 minute area.. but unless you add an object, it won't work.; =================; RussiaBuilding.sca N64* 0.00' E49* 10.00'Header( 1 N65:00:00.0000 N63:00:00.0000 E050:00:00.0000 E048:0:00.0000 )LatRange( N63:00:00.0000 N65:00:00.0000 )GRP( N64:05:00.0000 E049:05:00.0000 )Area( 5 d 0 0 12 ) PerspectiveCall( :My_Building ) ShadowCall( :My_Building ) Jump( : ):My_Building RefPoint( rel :Building_Fail 1.00 d 0 0 V1= 20000 V2= 100 ) Building( 0 0 0 25 50 50 0000 FFFF ) Return:Building_Fail ReturnEndA; =================This oldstyle building fits the bill... and the whole 10 minute area is autogen free.So object exclude code requires some kind of object ( even an autogen building ) to guarantee exclusion of generic vegetation autogen.Dick

Share this post


Link to post
Share on other sites

OK, interesting. It sounds reasonable that autogen is also exclude by an exclude, so that is what you expect. It's interesting to see that the trees are normally not excluded.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...