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

Very large areas of autogen coverage

Messages
539
Country
us-missouri
I use ScenProc to create autogen for areas 1 lat/long degree at a time, which is merged into a 25-square degree scenery library folder (5 tiles x 5 tiles). When I start from scratch, it takes less than five minutes for each one-degree tile. As I add on new tiles to the existing ones, I have ScenProc import the existing autogen and add a new one-degree tile, which seems to take an incredibly long time once I have compiled more than 5 square tiles or so, and becomes so time-consuming that the process eventually binds up, causing me to start completely over again.

I know others have created autogen for entire countries, which is quite a bit more ambitious than my patchwork of 5 x 5 folders. Is there a more efficient way to accomplish autogen coverage over a large area? Or perhaps my script needs work?

Code:
ImportOGR|path\to\CA Woodland.shp|-119;-118;37;38|*|NOREPROJ
ImportOGR|path\to\NV Woodland.shp|-119;-118;37;38|*|NOREPROJ
ImportOGR|path\to\Utility.shp|-119;-118;37;38|*|NOREPROJ
#
SplitGrid|AGN|*
#
ImportAGN|path\to\Texture|EXISTINGCELLSONLY
#
PolygonToPoint|*|INSIDE|0.0002;0.0002|0.9;0.9|String;TYPE|Veg|
AddAttribute|FROMFILE="Utility.shp"|String;TYPE|Utility
FilterFeatures|FTYPE="POINT" AND TYPE="Veg"|FTYPE="LINE" AND TYPE="Utility"|DISTANCE_FEATURE|20
CreateAGNRectVeg|TYPE="Veg"|{ed872711-270a-4ba2-8d2e-7ae89b279f9e};{bc53cb4e-92fd-4482-b890-d9327ebde209};{493c4993-4a11-440c-b1d4-063adf256c6f};{75fcf624-2d17-4790-b65c-f5e5320f4d9d};{68371601-4fae-4034-97e6-faa7e7aa66ed};{f897b102-9139-4027-a6a7-c87bdc881315};{366cb01a-b43b-4c48-80a0-4e47d71a063d};{2edc3430-5dbe-4ad2-a028-0b2cef3b261d};{64ecee3f-7664-4966-90b3-ad146a0d1d05}
#
ExportAGN|P3D v2|path\to\Texture

Thanks,
 
Well, I would create all 1-degree tiles individually, and then merge them together using the Merge Autogen function.
That's use a lot faster and uses less memory.
 
I had started out doing that, but then I came across the "ImportAGN" option in the manual and it seemed faster -- at first -- than doing one tile at a time and merging (then flying to check) them individually. But I haven't tried doing them individually and then doing one big merge. Thanks @MatthiasKNU !

EDIT: Just so I am understanding correctly, that does mean you export to different folders for each task, right?
 
Last edited:
Hi,

I don't think importing all agn files makes any sense. If you have autogen tiles that overlap your 1 degree cell borders, only those would have to be imported, as they would have to be appended.

I'm not 100% sure, but you can probably just use the import agn step with the same bounding box as your area that is processed now.
 
Hi,

I don't think importing all agn files makes any sense. If you have autogen tiles that overlap your 1 degree cell borders, only those would have to be imported, as they would have to be appended.

I'm not 100% sure, but you can probably just use the import agn step with the same bounding box as your area that is processed now.
Hello @arno ! So I would enter "-119;-118;37;38" in place of "EXISTINGCELLSONLY"?
 
Hi,

Sorry, my mistake, this step does not have a bounding box argument. So in that case your EXISTINGCELLSONLY option should be right.

But if in this case you see the processing time increases a lot, that would mean that many AGN files already exist for the area you are processing. While you are mainly interested in the border area.
 
Has there been a change to ScenProc's SplitAGN command @arno? I load my custom statewide woodland and building shapefiles, tell it to only load a 1x1 lat/long tile from each, and SplitAGN seems to be splitting the entire shapefile into AGN tiles instead of just the 1x1 tile I am working with. I've used the SplitGrid|AGN|* command many times and it has only become an issue recently.
 
Hi,

No, SplitGrid has not recently changed. But if you use:

Code:
SplitGrid|AGN|*

It will always split all the data that is present. If you only want to split a certain area, you would need to replace the last * by the bounding box of the area you want to process.

If you specify a bounding box in ImportOGR that means any feature inside that bounding area is read, but the feature might still stick out as well (it is not clipped). That is something the SplitGrid step would have to do.
 
Is there some kind of command where ScenProc will automatically enter coordinates in the bounding box? (Like enter a coordinate |38; 37; 120; 121| on top and have the program paste it wherever it sees @whatever@ or something along those lines? When I load osm data, my custom vegetation, building, and other vector shapefiles, sometimes for multiple states, that's a lot of bounding boxes to copy and paste -- and potentially mess up.

Putting a bounding box in the splitgrid step made planting millions of trees incredibly fast!
 
Looking at our profiles on the sidebar (the flags are a nice addition) I wondered if there was some significance to the fact that Missouri's state flag looks very similar to the Dutch flag.
Missouri's colors symbolize red: valor... white: purity... blue: the permanency, vigilance, and justice of the state.
Netherlands' symbolize red: bravery, strength, valor, and hardiness... white: peace and honesty... blue: vigilance, truth, loyalty, perseverance, and justice.

I found the similarities interesting.
 
Last edited:
Yes, you can do that with the batch variables. They are numbered like @0@, @1@, etc. You define them in a comment at the top and then you can use them anywhere in the script.
 
Tonight when I'm behind the pc I can make a small sample.
 
I'm trying this in the graphical editor, so far so good...

Code:
# @0@=-119;-118;36;37
# @1@=pathto\Texture
#
ImportOGR|pathto\California Woodland.shp|@0@|*|NOREPROJ
ImportOGR|pathto\Utility.shp|@0@|*|NOREPROJ
ImportOGR|pathto\CA Buildings.shp|@0@|*|NOREPROJ
ImportOGR|pathto\norcal-latest.osm.pbf|@0@|landuse|NOREPROJ
#
SplitGrid|AGN|@0@
#Vegetation
ImportAGN|@1@|EXISTINGCELLSONLY ...
 
Yep, looks good.

In batch mode you can specify the values from the batch file, so you can run the same script for different areas for example easily.
 
Back
Top