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

AeroFly FS 2 support in scenProc

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
This week I was approached by an AeroFly FS 2 user with the question if scenProc could be used to make cultivation (the AeroFly name for autogen) for AeroFly FS 2 as well. Of course this was not the highest priority item on the wishlist to work on, but I liked the challenge and the data structure to write to seemed simple enough. So I sidetracked a bit from what I was actually working on and decided to give it a go.

The fact that I’m writing about it now already indicates that it worked. In the next development release of scenProc you will find support to create cultivation for AeroFly FS 2 as well. You can create plants (trees), buildings and lights.

Section 5.9 of the updated manual shows an example script that can be used for AeroFly FS 2. Using OpenStreetMap data I have scattered trees into forest polygons, placed lights along a road and create houses from buildings that are almost rectangular. Hopefully this sample script should be enough to get you going. If there are any questions or suggestions, just let me know.

Image2017-10-07-1949.25.981-1024x645.jpg


Image2017-10-07-2003.25.083-1024x595.jpg


Continue reading...
 
Messages
1,098
Wow, Arno, that is great news, can't wait to give it a go.
And I love your attitude -- 'I had a look, it seemed like it would be easy, so I did it.':)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
And I love your attitude -- 'I had a look, it seemed like it would be easy, so I did it.':)

That's how most features got into my tools, somebody suggests something interesting and I just give it a try :).
 
Messages
58
Country
switzerland
Hello everybody.

I'm the Aerofly FS2 user who distracted Arno from his tasks, I must admit he's been extremely reactive and positive, thanks again Arno!

Being new on this forum, let me introduce myself: My name is Antoine, I'm a long time user of MS FS series and now LM P3D, with the v4 that could be the kind of Graal we've been hoping for so long... Being for so long an FS enthusiast led me IRL to the PPL flying licence back in 2008.

Even if LM's last opus is very promising, I was seduced by a small outsider, IPACS Aerofly FS2 (AFS2), that could become an excellent VFR flight platform if it grows up.
Now that a few tools become available, I'm investigating the feasibility of generating an autogen for AFS2 similar to what can be done in FSX/P3D, based on OSM and other shp data.



Below some pics of Lausanne area (Switzerland) with an initial test zone. I only placed autogen buildings for now, from OSM data. Trees come for the Swiss DLC and their placement is quite poor.

Still a lot to improve, but I'm currently concentrating on feasibility rather than aesthetics. The good think is it works and already doesn't look so bad. Thanks to Arno, extracting OSM data toward AFS2 is now possible with ScenProc, that's a huge help!











Villages too are much enhanced by 3D...







Yverdon-les-Bains










Back to Lausanne, morning light. Here looking towards Evian









Cheers

Antoine
 
Messages
118
Country
france
Well done Arno !

As Antoine said, AFS2 could be a good challenger for VFR flights, especially when one can expect more than 100fps with photo scenery + full autogen coverage :)

Thanks
 
Messages
121
Country
us-california
The real strength of FS2 is the frame rate that supports very fluid VR . Amazing!! Try it on Steam
 
Messages
121
Country
us-california
I hate to ask newbie questions, but here goes:

Goal: Select small area of california-latest.osm (or whatever OSM data from Geofabrik) so as to view in QGIS and limit what ScenProc has to deal with

Do you use QGIS to select a rectangular area (not sure how to do that without it taking forever) and save it
OR
just put "minx;maxx;miny;max" lat/lon values in the ImportOGR attributes? And what is meant by min/max for negative numbers (do you really mean by arithmetic value or NW-SE corners)

I wanted to test this process for maybe a 20nm square area but have to start with a 10gb file for California.

Thanks for the help - and Arno, you are the BEST! (BTW: MCX of mdl/bgl to AC3D works well)

Dave W.
 
Messages
58
Country
switzerland
If you use QGIS, you can download a square window of osm data to use directly for testing.

Cheers
Antoine
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Another option is to download the square from the OSM website directly, but that only works for files that are not too big. 20 km might be too big.

If you plan to process the data a lot of times, it's probably easiest to extract the data in QGIS first. You can use the bounding box option in scenProc, but loading will cost more time in that case. If you only want to process it once the time difference is maybe less important.

The min and max values are what they say :). The the min is always the lowest value. So also if coordinates are negative. So minx, miny is the lower left corner and maxx;maxy the upper right corner.
 
Messages
121
Country
us-california
Arno,
What a treat to see some buildings in my hometown (Oceanside) in California where there is just a little OSM data - amazing! Thanks for your quick response since we didn't have a tool to read the OSM and make a TOC file that was generalized like ScenProc.

I need to read up on QGIS because I didn't see how to export some OSM for a rectangular subset area - but your own min/max coordinates worked fine.

Thanks again

Dave W.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Happy to hear that worked.

I don't load OSM data in QGIS that often, but I believe there is a plugin to load data for a given area available (it should be installed by default).
 
Messages
9
Country
germany
Hi Arno,

as a beginner of scenProc in aerofly I'm looking for an exclude option. The reason is to exclude airport area where the buildings are placed with ac3d.
Can you point me to the direction how to do that?

Thanks and regards
Rodeo
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I'll try to make a sample script tonight. If you have a polygon that covers the area of the airport it is not so hard to do.
 

arno

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

Here is a sample script. I have commented it quite a bit, so hopefully it is self explaining :)

Code:
# Example AeroFly FS 2 scenProc script
# with function to filter out objects on airport
# --------------------------------------------------------
#
# Load OpenStreetMap data of the area to work on
# Only load highway, landuse and builidng to save memory
ImportOGR|annemasse.osm|*|highway;landuse;building|NOREPROJ
#
# Load Shapefile that contains the area of aiports that
# should be filtered out
ImportOGR|airport.shp|*|*|NOREPROJ
#
# Split the features into a grid of 0.25 x 0.25 degrees
# Do not split buildings, but filter them into thee
# right grid cells
SplitGrid|0.25|*|building="*"
#
# Place point features for the lights along roads of
# type primary at 50 meter interval
PlacePointsAlongLine|highway="primary"|SINGLE|50;50|0;0|25|String;point|light|hdg
#
# Place point features for the plants in forest polygons
# using spacing of 0.00025 degrees and no randomness
PlacePointsInPolygon|landuse="forest"|0.00025;0.00025|0.0;0.0
#
# Filter out the buldings, lights and plants that are within
# the airport polygons
AddAttributeIfInside|building="*"|FROMFILE="airport.shp"|String;skip|yes
AddAttributeIfInside|point="light"|FROMFILE="airport.shp"|String;skip|yes
AddAttributeIfInside|FTYPE="POINT" And landuse="forest"|FROMFILE="airport.shp"|String;skip|yes
UnloadFeatures|skip="yes"
#
# Create AF2 plants
CreateAF2Plant|landuse="forest"|10;20|broadleaf
#
# Create AF2 lights
CreateAF2Light|point="light"|0.8;0.8;0.8|3|0;0;1|10
#
# Create AF2 buildings for polygons that are almost rectanguar
# Make longer buildings industrial with a flat roof
CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH < 12|2|gable|residential
CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 12 And FLENGTH < 25|3|gable|residential
CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 25|2|flat|industrial
#
# Export the AF2 TOC file
ExportTOC|out|annemasse
 
Last edited:
Messages
5
Country
france
Hi,

Here is a sample script. I have commented it quite a bit, so hopefully it is self explaining :)

Code:
# Example AeroFly FS 2 scenProc script
# with function to filter out objects on airport
# --------------------------------------------------------
#
# Load OpenStreetMap data of the area to work on
# Only load highway, landuse and builidng to save memory
ImportOGR|annemasse.osm|*|highway;landuse;building|NOREPROJ
#
# Load Shapefile that contains the area of aiports that
# should be filtered out
ImportOGR|airport.shp|*|*|NOREPROJ
#
# Split the features into a grid of 0.25 x 0.25 degrees
# Do not split buildings, but filter them into thee
# right grid cells
SplitGrid|0.25|*|building="*"
#
# Place point features for the lights along roads of
# type primary at 50 meter interval
PlacePointsAlongLine|highway="primary"|SINGLE|50;50|0;0|25|String;point|light|hdg
#
# Place point features for the plants in forest polygons
# using spacing of 0.00025 degrees and no randomness
PlacePointsInPolygon|landuse="forest"|0.00025;0.00025|0.0;0.0
#
# Filter out the buldings, lights and plants that are within
# the airport polygons
FilterFeatures|building="*"|FROMFILE="airport.shp"|DISTANCE_FEATURE|0
FilterFeatures|point="light"|FROMFILE="airport.shp"|DISTANCE_FEATURE|0
FilterFeatures|FTYPE="POINT" And landuse="forest"|FROMFILE="airport.shp"|DISTANCE_FEATURE|0
#
# Create AF2 plants
CreateAF2Plant|landuse="forest"|10;20|broadleaf
#
# Create AF2 lights
CreateAF2Light|point="light"|0.8;0.8;0.8|3|0;0;1|10
#
# Create AF2 buildings for polygons that are almost rectanguar
# Make longer buildings industrial with a flat roof
CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH < 12|2|gable|residential
CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 12 And FLENGTH < 25|3|gable|residential
CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 25|2|flat|industrial
#
# Export the AF2 TOC file
ExportTOC|out|annemasse

First of all to thank you very much for the great with your application! It is great!!!

On the above does any of the friends here could share a shp file that I could edit and use? I am not proficient with QGIS, I tried but got completely lost... So I was hoping this exclusion could ve done with just GPS corner coordinates or somthing like it? A second point in your maual, pdf, your exmaples have an arrow that when copied to a notepad type for editing gives some errors and I saw many peopel get lost. For sure easy to fix by deleting the characters, just thought I mnetioned. Cheers, Luis
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
If you want a rectangle area you could also use the CreateRectangle step in scenProc. This will make a rectangle from the coordinates you specify.

Another option would be to use the airport bounds from OSM, but they might not match the actual addon extends.

The arrows in the manual indicate that the same line continues. I can't put such long lines in the manual else. So you need to put them back on one line in the editor.
 

arno

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

There was a mistake in the sample script above. I made it from mind yesterday, but the FilterFeatures step is implemented differently then I remembered. So I changed that part of the script a bit to work.
 
Messages
5
Country
france
Salut Arno merci!
Quick question, have you corrected the script above or do you have a new one you can share? I understand from the pdf, and I did fix it myself like you mentioned. I only mentioned it to you as I saw it from other people having trouble on another forum... :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I have updated the sample above. So what's posted is correct now.
 
Messages
9
Country
germany
Hi,

I can confirm that it works now. The log lists the number of excluded objects by the shape polygon.
Thank you so much for your effort!

Rodeo
 
Top