FSX ScenProc Autogen Doesn't Appear in Megascenery Earthv3 [SOLVED]

I have Megscenery Earth Idahov3 installed and the view is stunning, but as you probably know, it kills the autogen. To add Autogen Trees (not so much worried about buildings) back in I have tried using both Autogen Annotator from the FSX SDK and ScenProc.

I got AA to work finally and added some trees to the bare terrain of MSE. It looks okay. I would really like to get ScenProc to work, but so far have not had any good results. I created my ScenProc config to read the vector data from my geo source in a bounding box roughly the size of the Franch Church River of No Return Wilderness Area. When I ran ScenProc the IMPORTOGR parameter found 307 features and based upon the size of the bounding box generated 30 .agn files.

Since MSE uses textures imbedded (probably not the right word) within the .bgl files for the photo real scenery, there was no texture folder in the MSE/Idaho folder, so I had ScenProc write to the main FSX/Texture folder. I now realize I should have created a texture folder on the same level as the MSE/Idaho/Scenery folder and had ScenProc export the agn files there. To correct that I moved the agn files from FSX/Texture to a new folder I created MSE/Idaho?texture.

No autogen appears and in another thread someone has suggested it is because I did not tell ScenProc to create a "custom" agn so it created "default" agns, which, of course, are suppressed by MSE.

I can continue to use Annotator to get to where I want the forests of Idaho to look over the MSE Photo Real, but I think ScenProc will do a much better job if I could just get it to work.

Any ideas?

Randy
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

You should indeed save the AGN files in a texture folder at the same level as the photo scenery BGL. Else they are not found.

Can you show your scenProc script? Maybe there is some mistake in there. For example which GUID did you choose for the vegetation?
 
Thanks for replying Arno,

I ran ScenPro again last night using this config...

ImportOGR|C:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free_1.shp|-116.16;-113.98;43.69;45.96|*|NOREPROJ
#
SplitGrid|AGN|-116.16;-113.98;43.69;45.96|FROMFILE=c:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free__1.shp
#
CreateAGNPolyVeg|FTYPE=POLYGON;fclass=forest|{0e77a8ed-3104-4ec5-8d86-da808d05f878}
#
ExportAGN|FSX|C:/MegasceneryEarth/Idaho/texture
This time when running it, as you can see, I did have the agn files exported to a folder labeled "Texture" in the same location and level as the MSE/Idaho/Scenery folder.

I wish I had saved the event log to file. I will next time, but if memory serves me correctly, it found 307 features, created 87 agn objects, and when exporting said it exported 30 .agn files to MSE/IDAHO/Texture. I looked, they are there, but when I flew the area last night in FSX the only trees there were the ones I placed manually with ADE around airstrips and the ones I placed using Autogen Annotator around 0U0 Landmark Airstrip. Nothing else anywhere inside the bounding box coordinates.

The bounding box I describe in my parameters covers roughly the Frank Church River of No Return Wilderness Area in Central Idaho and a portion of the northern part of the Boise National Forest.

Randy
 
To help Arno and others following the evolution of this interesting 'topic-in-progress' which originated here:

http://www.fsdeveloper.com/forum/threads/creating-a-new-single-object-from-several-default-objects.440803/

...I'll offer a suggestion that may make it easier to more easily view/copy/paste longer lines of alpha-numeric info in posts.


Since Randy may be discussing (literally) at some length the 'configuration' statements for various steps in ScenProc, it may be helpful to Arno and others, for Randy to utilize the "Insert > CODE" option when posting such ScenProc 'configuration' statements.


FYI
: When posting to a thread in the default forum "Rich Text Editor" mode, if one 'hovers' the Mouse cursor over the icon on the toolbar immediately to the left of the 'Diskette' (Save Draft) icon, the "Insert... 'tooltip' label text appears; when the Left mouse button is clicked on that icon, select the "CODE" option, and type or copy and paste ones 'lengthy' lines of alpha-numeric characters, program code, or ex: ScenProc 'configuration' statements, and then click the [Insert] button for this result:

Code:
ImportOGR|C:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free_1.shp|-116.16;-113.98;43.69;45.96|*|NOREPROJ
#
SplitGrid|AGN|-116.16;-113.98;43.69;45.96|FROMFILE=c:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free__1.shp
#
CreateAGNPolyVeg|FTYPE=POLYGON;fclass=forest|{0e77a8ed-3104-4ec5-8d86-da808d05f878}
#
ExportAGN|FSX|C:/MegasceneryEarth/Idaho/texture

Hope this helps facilitate the ongoing discussion and troubleshooting process. :)

GaryGB
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Did you check your SHP in a GIS program to check how many polygons are actually there with the forest attribute? Sometimes that can be quite disappointing :)
 
Arno,

I did, using QGIS, and there are 233 features identified under the fclass=forest in the attributes table of QGIS for that shape file specified in my config, which is confusing to me because scenProc finds 307 features.

Something else popped into my head when I finished this post and was reading it for errors. When using annotator I "open" the MSE BGL for the area I want to add autogen trees to. I create the vegetation polygons and save. Annotator then "writes" an agn file to the MSE/Idaho/Texture folder specifically for those polygons I just drew it seems and the polygons, of course, are visible on the "BGL Image" in annotator. So if I draw 2 polygons it creates 2 agn files.

I know scenProc uses geo lat/lon data to place the autogen, so does it matter that a polygon image is not on the individual BGL files for MSE?

scenProc writes 30 agn files so is it only creating 30 polygons?

Randy
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Randy,

One AGN file can contain many polygons. Each file covers a certain area of the photo. So there is no one on one relation between the number of polygons and the number of files.

In the ImportOGR step you limit the area that is processed by giving coordinates. So that is probably why scenProc loads less data than you see in QGIS. This way you tell scenProc to not use the entire file.

If you open Annotator after creating the AGN files with scenProc you should see in Annotator as well which poygons have been made.
 
Hi Arno,

Sorry this reply is so late. Thanks for the explanation on the AGN/Polygon relationship. However, I am seeing more data in scenProc than I see in QGIS, just the opposite of what you said.

In QGIS I find in the Attribute Table, within my bounding box coordinates, 233 landuse features identified as forest. Yet when scenProc runs that same bound box coordinate area it finds 307 features, creates 87 autogen objects/features/polygons and exports 30 .agn files. Those so 30 files do indeed appear after the run in MegaSceneryEarth/Idaho/Texture, yet the autogen trees never appear in the sim...ever. I have flown the Frank Church RONRWA in sim after a scenProc run north to south and east to west (it's only 100 by 100 miles or so) in a fast turboprop. Nowhere do I see 3D trees except at airstrips where I have manually added them with ADE or the one single area around 0U0 Landmark USFS Airport where I used Autogen Annotator.

When I used Annotator, was I forming a polygon on the actual texture imbedded within the MSE BGL file for that region? You keep saying "photo", but as I'm sure you know, MSE doesn't come with a texture folder. I had to create that. There are no "Photo" files in the texture folder. They are imbedded, right". Nowhere, on any of the MSE BGLs that make up the Frank Church area I am trying to add Autogen to, does a polygon show up when opened with Annotator, except the one I opened with Annotator and edited with Annotator.

Thinking there was perhaps an issue with the bounding box area I am trying to populate with Autogen, I decided to use asterisks instead so it reads all features on the Landuse GIS shape file (mostly "cemetery", "park", "forest" and "grassland") and spltgrids the same way on the entire area. scenProc is running right now since I have time given the difference in our time zones. SplitGrid is obviously taking a lot of time to do the whole state of Idaho. Just in the Landuse GIS it found 2,934 features for the whole state.

Randy
 
Okay, scenProc has finished running the entire landuse GIS for the state of Idaho. Here is the configuration entry...

Code:
ImportOGR|C:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free_1.shp|*|*|NOREPROJ|DONTPROCESHOLES
#
SplitGrid|AGN|*|FROMFILE=c:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free__1.shp
#
CreateAGNPolyVeg|FTYPE=POLYGON;fclass=forest|{0e77a8ed-3104-4ec5-8d86-da808d05f878}
#
ExportAGN|FSX|C:/MegasceneryEarth/Idaho/texture
Here is the log entry created once it was finished...

11:30 AM ImportOGR Information Reading file C:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free_1.shp
11:30 AM ImportOGR Information Read 2934 features from file
11:30 AM SplitGrid Information Splitting features in 0.0146484375 x 0.010986328125 grid...
5:07 PM SplitGrid Information Features divided in 344932 cells
5:07 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE=POLYGON;fclass=forest...
5:07 PM CreateAGNPolyVeg Information Created 1975 autogen objects
5:07 PM ExportAGN Information Writing AGN files to folder C:/MegasceneryEarth/Idaho/texture
5:07 PM ExportAGN Information Created 1975 polygonal vegetation objects
5:07 PM ExportAGN Information Written 1553 autogen files
5:07 PM SceneryProcessor Information scenProc finished processing
5:07 PM SceneryProcessor Information 1.73 seconds for IMPORTOGR
5:07 PM SceneryProcessor Information 20202.22 seconds for SPLITGRID
5:07 PM SceneryProcessor Information 2.34 seconds for CREATEAGNPOLYVEG
5:07 PM SceneryProcessor Information 5.04 seconds for EXPORTAGN
5:07 PM SceneryProcessor Information 20211.33 seconds total
Result? No Autogen Trees anywhere in the state of Idaho. Only trees visible are the ones I hand placed using ADEX and the one square grid at Landmark I did with Autogen Annotator.

The .agn files are there in MSE/Idaho/Texture, all 1,553 of them. Looking at the MSE BGLs for Idaho the only one with any polygons on them is the one single BGL file containing the image of Landmark, 0U0, that I did with Autogen Annotator in about twenty minutes. If Annotator works, then why bother with scenProc you may be wondering? There are 866 MSE BGLs in the Idaho/Scenery folder...times 20 minutes per BGL is 288 hours or 12 days. scenProc processed the entire state, albeit to no avail, in just slightly over 5-1/2 hours. That's why I really, really want scenProc to work.

But, no more big runs for me. From this point on, until I get Autogen to appear over the top of MSE I will be doing a very, very small bounding box in the Boise National Forest region.

Oh yes, and in case this possible reason is suggested at some point. I have Terrain_Max_Trees_Per_Cell set to 6000 in the FSX.cfg file in appdata/roaming/miscrosoft/FSX/ folder.

I am way, way open for suggestions. Even a Teamviewer look at my system. I am retired with only one responsibility, getting my grandchildren to and from school. Otherwise, available even in the wee hours of the morning my time to fit your schedule.

Randy
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
What does the GUID you reference in the CreateAGNPolyVeg step point to? Which vegetation class is it? If you put a wrong GUID there you will see nothing indeed.

That you get more features in scenProc is because holes are removed from the polygons. Autogen can't have holes in polygons. But as the result of that there are more polygons.
 
Good Day Arno,

It is the GUID for "pinepinion mat 2". How does one know what vegetation class is wrong and what is right? Should I be typing in a Terrain Class and letting Auto Correct point me to the right GUID?

Randy

Well, I tried using autocorrect to point me to an acceptable Terrain Class GUID and ran a small configuration bounded to include the Gospel Hump Wilderness Area Northeast of McCall KMYL. No Joy. Read twelve features off the GIS and created two agn files. Nothing shows in FSX and I see no polygons on the BGL images when I look at them with Annotator.
 
Last edited:
Arno,

I may have figured out why I'm not seeing the autogen in MSE. I think I have been using the wrong "fclass" from the attributes table in QGIS. From the landuse GIS I did some "deeper" looking and suddenly realized a lot of the large regions in the GIS are not in the fclass=forest. There are categorized as fclass=nature_reserve because they are a wilderness area with no roads and very, very few buildings.

So I have written a new configuration to include all the "tree" landuse classes found inside my bounding box. The code is included here...

Code:
ImportOGR|C:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free_1.shp|-115.400;-114.000;43.700;44.600|*|NOREPROJ
#
SplitGrid|AGN|-115.400;-114.000;43.700;44.600|FROMFILE=c:/FS Design Tools/Scenery_Processor/Idaho_GIS/gis.osm_landuse_a_free__1.shp
#
CreateAGNPolyVeg|FTYPE=POLYGON;fclass=forest|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
CreateAGNPolyVeg|FTYPE=POLYGON;fclass=nature_reserve|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
#
ExportAGN|FSX|C:/MegasceneryEarth/Idaho/texture
I will let you know the results, but from looking at the GIS data, the large area features that I assumed were forest because they were wilderness areas were actually classed as nature_reserve. Also from what I can tell, the areas classed as "forest" are very, very small areas that I have to zoom in on the vector map in QGIS to even see. The autogen created by all my past attempts may have actually worked, it was just a tiny area in a great big state and probably only contained 10 or less trees.

More to come after scenProc ends it's run.

Randy
 
That was it, I wasn't using the incorrect fclass. Using "forest" was giving me very tiny, tiny areas of autogen. Using the fclass "nature_reserve" indeed filled in my MSE view with lots and lots of trees. Now I am at the other end of the spectrum and don't know what to do. I have too many trees and they are everywhere, even over the top of the airstrips. I can exclude these using ADEX and an exclusion polygon, but they cover the rivers and lakes as well. Also, many of Idaho's South facing slopes are not as heavily wooded as the North facing ones. They are both forested just as heavily and it looks "out of place.



If I was working off a photo image I could go in and edit the image, but there is no "image" to edit, just the MSE .bgl file. Is there a way to edit the .agn file and "change" the vegetation polygon border? I tried annotator on one file and the vegetation polygon is there, but when I select it (it covers almost the entire file including the town of Stanley, Idaho, the roads (it is within the wilderness area but a small corridor of roads is allowed in for access to the further areas), and the airstrip there.

But in general I am a much happier guy knowing the process is working for me and probably has been all along. I'm thinking I have to find a different source for my GIS data that lets me work with an image and not a bgl file.

Randy
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

What you describe sounds quite logical. I have seen that for other US states as well, the OpenStreetMap data didn't contain many forests. Ony rough nature areas, but these are quite rough and don't align well.

For a project I'm working on I'm trying to detect the vegetation directly from the photo. That is an approach that works for areas with less vector data available.

But such an approach doesn't work yet with scenery where you only have the BGL file. There is a beta version of a decompiler for such photo bgl files now, maybe I can use that in the future to let scenProc detect things from a BGL file.

For now the best way is to either correct/draw in Annotator. Or try to find better vector data for your area. Maybe the GIS website of the state has some data available for example.
 
Thanks for the reply, Arno.

Too much is far better than none for the moment so I am a happy guy. Thank you so much for both the program and for all your help.

Please keep me in mind if/when that beta decompiler comes out. In the meantime, I will simply remove the autogen polygon from the limited bgl files affected and use annotator to hand draw the polygons. The main ones are the BGLs with airports in them or large open grassland/meadow areas and those number in the 20's out of 400 BGLs at most in the area I have been flying, so completely doable in Annotator.

Thank you again so much. Looking forward to the BGL decompiler.

By the way, I looked to see if there was a way to change the subject line to include "SOLVED", but didn't see how. If you have a way to do so, please do as I consider the issue solved and chalked up to my own ignorance and not the program's failure to work as expected.

Randy
 
Last edited:
Top