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

P3D v4 GUIDs for ScenProc forests

Messages
496
Country
us-missouri
Can't deduce much from looking at the grids superimposed over my shapefile.

Having tested some more, it's consistently happening at the edges of the tiles: I will import my shapefile and tell ScenProc to give me polys within |-91;-90;36;38| degrees. Then I will do another job within |-91;-90;37;39| and then merge the two adjacent autogen folders. It hasn't been an issue before, and now I get the "no-man's-land" lack of autogen at the grid lines, irregardless of how many trees there are within the LOD-13 grid, or autogen buildings either for that matter. Southeast Missouri does have a BUNCH of trees, but not that many buildings.

0.0002 is certainly a lot of trees compared to what I had before, but I've seen people here have used 0.0001 without reporting similar issues.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

The agn tiles don't align with whole degrees. So it might be that you create the same agn file in two runs now. Hence one will be overwritten and you loose trees.
 
Messages
496
Country
us-missouri
I wondered about that when I first started creating autogen. So I would clip out buildings for a 1x1 grid and export it to the Texture folder. Then I would clip out woodland shapefiles and export it to a Texture2 folder. Then I would merge the two folders -- deleting Texture2. I didn't have this problem with strips of no autogen along the boundaries until I switched from "ReplacePolygonByVegetationRectangles" to "PolygonToPoint"

As it stands right now, I have my scenery folders split up into 5x5 lat/long layers. Is it possible to have one layer with several subfolders? It would be great to somehow put each 1x1 grid of autogen in its own folder so I wouldn't have to recreate as many as 25 grids of scenery when I change something?
 
Messages
7,450
Country
us-illinois
Hi,

The agn tiles don't align with whole degrees. So it might be that you create the same agn file in two runs now. Hence one will be overwritten and you loose trees.


Indeed, as Arno alludes to above, when working with SDK Autogen Annotatator, we must remember MS-FS *an.AGN tile sizes are LOD-13 (aka QMID-15). ;)


To see Geographic coordinates for LOD-13 "Cells" within the local Areas used in MS-FS quad tree tiling file / folder system, consider 0T3 @ Marble Hill, MO:




Note that 0T3 is positioned literally on a Area dividing line in the MS-FS quad tree tiling file / folder system



In SDK TMFViewer:

SDK TMFViewer > File > Open > [FSX install path]\Scenery\0202\dem0202.bgl <-- NW end of airfield

SDK TMFViewer > File > Open > [FSX install path]\Scenery\0202\cvx2318.bgl <-- NW end of airfield

SDK TMFViewer > File > Open > [FSX install path]\Scenery\0302\dem0302.bgl <-- SE end of airfield

SDK TMFViewer > File > Open > [FSX install path]\Scenery\0302\cvx2418.bgl <-- SE end of airfield


SDK TMFViewer > View > QMID Grid > Level 15


SDK TMFViewer > Jump > Lat Long... > Latitude: 37.313900 Longitude: -89.997299

Use Mouse left button click to center view on a quad grid vertex.

Use + key to zoom view multiple times, until Geographic coordinates stop changing with small Mouse cursor position changes

You now should see the MS-FS quad tree grid vertex Geographic coordinates on the bottom status bar; note that these are both fixed ...and calculable.


IIRC, Jim once posted a link to a spreadsheet file that could compute the MS-FS quad tree grid vertex Geographic coordinates.

Perhaps if he would be so kind as to make this available again via an attachment to this thread, that may be used for LOD-13 sized AGN point file sets ? :idea:


Yes, it seems easier to divide work data sets by Arc Degree or USA State sizes, but MS-FS SDK requires use of different source file data set sizes for tasks. :pushpin:


I hope this helps illustrate the MS-FS quad tree Area file / folder and LOD-13 sized AGN Cell tiling system ...that compels how we "size" source data sets. :)

GaryGB
 
Last edited:
Messages
496
Country
us-missouri
Hey Gary! Considering everything in your message above, it seems like I was incredibly lucky when I got good autogen by using 1x1 tiles prior to switching to the new "points" script.

So if I am understanding you, I could create use lat/long coordinates for the LOD-13 grid (instead of the round figures I had been using) and use those boundary numbers in my ScenProc filter to possibly get a solution?
 
Messages
7,450
Country
us-illinois
Hey Gary! Considering everything in your message above, it seems like I was incredibly lucky when I got good autogen by using 1x1 tiles prior to switching to the new "points" script.

So if I am understanding you, I could create use lat/long coordinates for the LOD-13 grid (instead of the round figures I had been using) and use those boundary numbers in my ScenProc filter to possibly get a solution?

Assuming one uses 13 Decimal point precision for the Geographic coordinates in one's data set, they 'should' fit within LOD-13 Cell boundaries for *an.AGN files.

I believe that by using ScenProc 64-Bit, it is already possible to input larger (Arc Degree / USA State ?) -sized source data sets to ScenProc, and with use of appropriate intermediate script steps in the processing sequence, one may segment the resulting data into LOD-13 Cell sized "chunks" that fit precisely within the Geographic coordinate boundaries of each specified *an.AGN file.




I would consider it likely that, via Arno's and Jim's example scripting / batching routines, you should ultimately be successful in developing a way to semi-automatically output the (many) *an.AGN files required for CONUS without Autogen display anomalies. :)

GaryGB
 
Last edited:
Messages
496
Country
us-missouri
I believe that by using ScenProc 64-Bit, it is already possible to input larger (Arc Degree / USA State ?) -sized source data sets to ScenProc, and with use of appropriate intermediate script steps in the processing sequence, one may segment the resulting data into LOD-13 Cell sized "chunks" that fit precisely within the Geographic coordinate boundaries of each specified *an.AGN file.
Thanks, Gary. I always make sure to update my 64-bit version to the latest development release. And it seems to me that
Code:
SplitGrid|AGN|*
should put the data into appropriate LOD-13 grids.

Maybe I could try adding
Code:
SplitGrid|AGN|-91;-90;36;38

Are you talking about Arno's and Jim's example scripts here? Or elsewhere across the site? I'm pretty good at reverse-engineering so -- after re-reading the manual -- I usually look to see what other people have successfully done, then I can understand more about what each element does and apply/adapt that to my scenery scripts.
 
Messages
496
Country
us-missouri
OK, I tried eliminating as many variables as possible. I started with a clean texture folder and ran my script for -91;-90;36;37. Instead of a full grid of trees with nothing to the north, I got almost no trees in -91;-90;36;37 except for the border between this tile and that to the north. I guess this east-west strip of trees is the LOD-13 grid mentioned above. What puzzles me though is that this is the only region that gives me no trees.
 

Attachments

  • 2020-11-8_14-16-3-157.jpg
    2020-11-8_14-16-3-157.jpg
    220.2 KB · Views: 111
  • 2020-11-8_14-14-48-962.jpg
    2020-11-8_14-14-48-962.jpg
    280.9 KB · Views: 98
Messages
7,450
Country
us-illinois
Hi Chris :

Have you yet opened with SDK Autogen Annotator, the custom photo-real imagery land class *an.AGN file for the LOD-13 Cell in question, and confirmed that your work-flow did, in fact, result in vegetation rectangles output by ScenProc with mapped and valid default object GUIDs in Area layers set active in Scenery.Cfg ...which replaced your input source data points ? :scratchch

If so, then one must determine what local scenery object (vector GUID polygon or 3D model) might cause a more commonly seen Autogen Exclusion.

One might also wonder whether it is possible, one may find a Area layer interaction via local AGN Cell boundary overlaps, or perhaps AGN 'bleed-through' from an under-lying layer due to excessive assigned Blend Mask transparency gray-scale values for the local Cell in question ...which could cause the MTPC limit to be exceeded, resulting in 'bands' of Autogen display anomalies.

GaryGB
 
Last edited:
Messages
496
Country
us-missouri
I did check things out in SBuilderX like you mentioned yesterday, but in I've never used the Annotator before and I will check that out.

In the meantime, I re-did the photoreal scenery in the area above, just to eliminate that possibility from my mind. I read your linked post earlier today. But often things don't connect the first time I read them, as I usually have learned something new since the first time I read a post that -- at that time -- didn't yet make sense.
 
Messages
7,450
Country
us-illinois
Hi again:

In addition to Luis Feliz-Tirado's Autogen tutorial previously cited, you may wish to review these threads for some orientation info:



GaryGB
 
Last edited:
Messages
496
Country
us-missouri
Hi Chris :

Have you yet opened with SDK Autogen Annotator, the custom photo-real imagery land class *an.AGN file for the LOD-13 Cell in question, and confirmed that your work-flow did, in fact, result in vegetation rectangles output by ScenProc with mapped and valid default object GUIDs in Area layers set active in Scenery.Cfg ...which replaced your input source data points ? :scratchch
I can open the scenery BGL file but not my autogen files. But while that could be a clue to the problem, I bet it's most likely that I just need to learn more about how to use the Annotator since I just started using it.
 
Messages
7,450
Country
us-illinois
After the required steps are completed to open the custom photo-real imagery land class BGL in question within Autogen Annotator GUI, the mapped *an.AGN file will also be automatically opened, and the Autogen Vegetation Rectangles (if successfully created via ScenProc) will then be displayed within the Autogen Annotator GUI ;)

[EDITED]

Note that this requires the *an.AGN files mapped to the Geographic extents of a custom photo-real imagery land class BGL, must be physically located within the paired \Texture sub-folder directly adjacent to the \Scenery sub-folder containing the custom photo-real imagery land class BGL itself.

Likewise, run time rendering of the Autogen annotations for that local LOD-13 Cell / tile requires the same configuration of physically adjacent file / folder locations as just described above. :pushpin:

[END_EDIT]

PS: I corrected the latter URLs in my post immediately above.

GaryGB
 
Last edited:
Messages
496
Country
us-missouri
Haven't fully grasped the Annotator yet but I did notice that the photoreal scenery tile I was struggling with was in the wrong scenery folder... it was there, but not in the proper folder/layer. As things grew, my "Missouri" folder started encompassing areas of Illinois, Arkansas, and other adjacent states, so I had to come up with a new system and this file got lost in the shuffle.

I'll have to re-generate all that autogen in other grids to see if I still have those missing east-west and north-south LOD-13 boundaries that gave me fits this weekend. But it does appear to be as Arno stated: areas on the boundary of my scenery folders will have a missing LOD-13 tile from autogen scripts on both sides overwriting the other. If that is the case, it's back to the drawing board regarding how to divide up my scenery so that if I make a change to one area's autogen, short of adding and merging, I don't have to wipe everything and start ALL THE WAY over. For like the 100th time if I was counting.

And my main issue of no randomness in my Veg rectangles remains. Thanks so much to everyone for all the help... I've learned a handful of new things and I absolutely can't wait to release some of this scenery!
 
Last edited:
Messages
7,450
Country
us-illinois
And my main issue of no randomness in my Veg rectangles remains.

Hi Chris:

I found this in the August 1st, 2020 ScenProc PDF file:

9.2.1 AddAttribute

Purpose


Add a new attribute to the selected features. The attribute category and value are provided.

Arguments

1. The filter that selects the features to which the attribute should be added

2. The attribute type and category (name) of the new attribute

3. The value of the new attribute. There are three special values that have a different behaviour:

• RND(x) generates a random number between 0.0 and x

• RND(x,y) generates a random number between x and y
• NEWGUID creates a new random GUID

• TILELOD adds the name of the LOD of the cell the feature is in


Example

Add new attribute to all square polygons:


AddAttribute|FTYPE="POLYGON" And FNUMVERT=4 And FNUMPERPANG=4|String;BUILDINGTYPE
,! |SQUARE


Add random heading between 0 and 360 to all point features:

AddAttribute|FTYPE="POINT"|Double;heading|RND(360)


Add random building height between 10 and 20 to all buildings:

AddAttribute|building=*|Double;height|RND(10,20)


86"


Note the above offers to impart 'Randomness', but it is unclear whether / how one can randomize GUIDs of Vegetation Objects placed via Rectangles


9.2.27 ReplacePolygonByVegetationRectangles

Purpose


For FS2004 autogen vegetation can only be rectangular in shape. For FSX there is a choice between polygonal and rectangular vegetation. With this step it is possible to replace a polygon by a set of rectangles that cover roughly the same area. So this allows rectangular vegetation to be created from polygons that are not rectangular. Figure 9.9 shows an example of this.

1604947883399.png


Figure 9.9: Example of polygon replaced by a number of rectangles


Arguments

1. Filter to select the polygons that should be replaced by rectangles

2. The size of the rectangle that will be created in degrees

3. The amount of overlap between rectangles, where 0.0 means no overlap and 1.0 means 100% overlap.

4. The amount of random offset added to the rectangles, 0.0 means no random offset while 1.0 means a maximum random offset equal to the size of the rectangle.


Example

Replace all forest polygons by rectangles 0.001 degrees in size. The rectangles will have 25% overlap and 25% random offset:

ReplacePolygonByVegetationRectangles|landuse="forest"|0.001|0.25|0.25


Note the above offers to impart 'Randomness', but it is unclear whether / how one can randomize GUIDs of Vegetation Objects placed via Rectangles


"9.3.5 CreateAGNRectVeg

Purpose


Create autogen rectangular vegetation. This is usually used to create forest or other vegetation for FS2004. For FS2004 the type of vegetation is determined with the SetAGNVegetationSettings step. For FSX the type of vegetation is selected with a GUID that refers to a class in the autogen configuration files. The bounding box of the selected features is used as the rectangle of the autogen.

Arguments

1. Filter to select the features from which the rectangular vegetation will be generated

2. GUID of the vegetation group that will be used. If you provide multiple GUIDs, separated by a semicolon (;), scenProc will randomly select one of the GUIDs from the list.

3. Optional feature attribute name that contains the vegetation type GUID. If the attribute does not existing the GUID provided in the second argument is used as fallback.

Example

Create autogen rectangular vegetation from all forest polygons and assign the vegetation group named "Mixed Forest".

CreateAGNRectVeg|landuse="forest"|{c9dc45ae-f240-42a9-a137-b7617452a308}


Create autogen rectangular vegetation for FS2004 where the GUID is not required.

CreateAGNRectVeg|landuse="forest"


112"

Another option is to make your own custom groups in the autogen configuration. The advantage of the groups is that you automatically get a mix in heights in an area. If you use single models you have to introduce that variation yourself.

But especially if you are placing each tree as a small vegetation rectangle both methods will work well.


Regarding what Arno means by "Vegetation Group", this is apparently less well defined in the PDF file, or his other posts which use the term " Vegetation Group". :scratchch

https://www.google.com/search?source=hp&ei=zoupX5_EA5W6tAbzlrugDQ&q=ScenProc+"vegetation+group"&oq=ScenProc+"vegetation+group"&gs_lcp=CgZwc3ktYWIQAzoLCC4QsQMQgwEQkwI6CAguELEDEIMBOgIIADoLCC4QsQMQxwEQowI6CAguEMcBEKMCOgUIABCxAzoLCC4QxwEQowIQkwI6BQguELEDOg4ILhCxAxDHARCjAhCTAjoCCC46CAguEMcBEK8BOgUIABDJAzoECAAQCjoECAAQHjoHCAAQyQMQHjoFCCEQoAFQ3RBYkTxgoUVoAHAAeACAAY4BiAHBCpIBAzQuOJgBAKABAaABAqoBB2d3cy13aXo&sclient=psy-ab&ved=0ahUKEwif44OMjfbsAhUVHc0KHXPLDtQQ4dUDCAg&uact=5


Jim's examples in the preceding discussion above in this thread appear to focus on use of "ModelEntry GUIDs with scenProc rather than groupings".

However, Arno has stated "For FSX the type of vegetation is selected with a GUID that refers to a class in the autogen configuration files"


Arno, would you please be so kind as to further clarify how Chris may randomize vegetation objects placed via vegetation rectangles using ScenProc ? :teacher:


Thanks in advance for your help in explaining more clearly this aspect of how to use ScenProc and/or other utilities to define / select vegetation groups for random placement of Autogen objects by means of vegetation rectangles.


GaryGB
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Chris is using the right steps already. It is in the PolygonToPoint step that you can add randomness when placing the points.
 
Messages
496
Country
us-missouri
Hi,

Chris is using the right steps already. It is in the PolygonToPoint step that you can add randomness when placing the points.
PolygonToPoint|*|INSIDE|0.0002;0.0002|0.25;0.25|String;type|veg| is what I use

Thanks, Arno. After all the reading and troubleshooting it is a relief to hear I am on the right path. But I still must be doing something wrong somewhere, because everything I've tried (including messing with the heading option, which isn't necessary for INSIDE) still gives me lovely orchards.

I had no trouble with randomizing my autogen before switching to points, using "ReplacePolygonByVegetationRectangles" in Gary's post above. Here is my script:
Code:
ImportOGR|woodlandshapefile|-91;-90;36;37|*|NOREPROJ
#
SplitGrid|AGN|*
#
PolygonToPoint|*|INSIDE|0.0002;0.0002|0.25;0.25|String;type|veg|
#
CreateAGNRectVeg|type="veg"|{ed872711-270a-4ba2-8d2e-7ae89b279f9e};{bc53cb4e-92fd-4482-b890-d9327ebde209};{493c4993-4a11-440c-b1d4-063adf256c6f};{aa737190-f06a-4c75-a2fe-8fa0d324f526};{d3968f91-cbd5-4c8b-b6d4-193b417bd0c9};{deffc34e-3a46-4ab6-a1e7-2634abd06c3f};{7da2873a-b7ce-4e2f-ac29-3e21795d6145};{378b5438-71be-4e51-a07d-7ce88d830c4f};{1a480795-ed88-42b4-b0ff-b0dc140b55d9};{15d916d2-f951-4ae8-82a0-16a2a7c36ee3};{0a9c59f5-d12e-43ed-a5e2-8878ae10eddd}
#
ExportAGN|P3D v2|pathtotexturefolder
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Chris,

I did a quick test here with this script:

Code:
ImportOGR|c:\dev\astofra\tests\data\scenproc\natural_schier.shp|*|*|NOREPROJ
#
PolygonToPoint|type="forest"|INSIDE|0.0002;0.0002|0.25;0.25|String;type|veg|hdg
#
ExportOGR|type="veg"|GML|random_test.gml|random_test

As you can see in the screenshot below the points are not in a straight line, but have some random offset.

1604953538687.png


As only 25% randomness is used the effect is not very strong. If I increase it to 50% it becomes more clear.

1604953683545.png
 
Messages
496
Country
us-missouri
it is unclear whether / how one can randomize GUIDs of Vegetation Objects placed via Rectangles
Thanks as always for such a thought-out response, Gary (by the way, I am still studying the Annotator info you pointed me towards).

It is my understanding that the PolygonToPoint step creates a grid .0002 degrees apart, then places points randomly in a field that is up to one-quarter the distance between grid intersections. Then CreateAGNRectVeg turns the points into rectangles for the tree (selected at random from the GUID list) to go.
 
Messages
496
Country
us-missouri
As only 25% randomness is used the effect is not very strong. If I increase it to 50% it becomes more clear.

It seems so obvious now to change the randomness level... but in my defense, it worked so well in "ReplacePolygonByVegetationRectangles" and it seemed like the trees were perfectly aligned, so I assumed the problem lied elsewhere.

Thank you very much Arno!!!
 
Top