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

Thoughts from a newbie trying to create trees and buildings for Norway

Messages
71
Country
sweden
Hi

My aim was to create OSM data (Buildings and Trees) for the beautiful Lofoten area in Northern Norway for which I have created photoscenery with Ortho4XP (p3d). I have OpenVFR for Norway but its from 2013 so the data in very sparse.

Anyway, I followed along ok in the tutorials and managed to download all of Norway in a large 1.4 GB zip file shp from the German website. Back to ScanProc I gave it the whole day but its just too complicated and I am about to give up. All I want is some autogen for Norway, I dont care about building hights etc Is there is simple (very simple) step by step guide. The ones online seem old and the first step calls to "ImportOSM". There is not even such a command in the version I use. Can someone please please help me what steps to take and what to write in the commad window.

Extremely thankful for any information from you pros :)
 

MatthiasKNU

Resource contributor
Messages
958
Country
germany
Hi Mikael!

First, i assume you have downloaded a zip-file with many different shapefiles in it (.shp) for the whole country.
That's the first problem, if you process the whole country in ScenProc it will take extremly long.
So I recommend you take a look at QGIS, load the buildings... .shp and the landuse... .shp into it and extract the area you want to create. Then you export the data again as shapefiles.

Now ScenProc:
It is pretty easy, if you know, how.
First, you load both newly created shapefiles with ImportOGR:
Code:
ImportOGR|landuse.shp|*|*|AUTODETECT
ImportOGR|buildings.shp|*|*|AUTODETECT
Then the SplitGrid-Step:
Code:
SplitGrid|AGN|*
Now we can create the autogen:
For the trees:
Code:
CreateAGNPolyVeg|fclass="forest" OR fclass="scrub"|[Your Vegetation GUID]
and for the buildings:
Code:
CreateAGNGenBuild|code=1500|[Your Roof GUID]|MAXRATIO=2
and now you are exporting your agn-files:
Code:
ExportAGN|P3D v2|[Your folder]

That's kind of the most basic ScenProc-Script to create autogen...
I hope, this helps!
 
Messages
71
Country
sweden
Hi Matthias

I am so thankful for your reply! I actually went to the following page https://extract.bbbike.org/ where I could specify the exact area in Norway where I want OSM data. So now I have a zip file much, much smaller than the one I got from the German site (...Fabric something) that unfortunately contained all of Norway.

The file includes several shp files including Buildings.shp (Autogen Buildings I assume) Natural.shp (Autogen trees I assume). Those are the only two I should care about right? There are also Landuse.shp, Places.shp, Points.shp, Railways.shp and Roads.shp. Any of them useful? You mention Landuse in your example, what is contained there?

Anyway, I will follow your very nice easy to use instruction above. I am starting to get a little hang of this :)

Mike
 
Last edited:

MatthiasKNU

Resource contributor
Messages
958
Country
germany
Hi!
Use the OSM-Data for the first try, that's easier.
The shapefiles don't include Autogen. You can build you own autogen from the data which is included in the shapefiles.
In the building.shp the Building footprints are stored.
In the landuse.shp the landuse information is stored, so where forest, where scrub or where residential areas are.
The natural.shp includes single Trees or Cliffs, peaks, etc., you don't need it for the first try.

Buildings.shp and landuse.shp are the most important, and the scenproc script I gave you is working with these two shapefiles as input data.
 
Messages
71
Country
sweden
Hi

Things went great and I now have a terrific autogen trees and buildings to accompany my Norway photoreal. There are only one small thing. Some commercial buildings are very very large, not tall but large. Where in real Life there are say two or three commercial buildings on the site my autogen brings one large bulding. anything that can be done about that?

I had some trouble with getting any trees initially. All istructions I followed online called the "TYPE" command when it really needed the FCLASS command. Finally found it in the attributes table in QGIS :)

I see that my landuse file also includes schrubs. Can I add that with the same CREATEAGNPOLYVEG command that I used for trees but only replace the name "forest" with schrubs and select an appropriate schrubs GUID (any good suggestion for nie looking schrubs? :)

And this brings me to my last question. I use Orbx Trees HD and will use Orbx HD Buildings when it is released. Will I benefit from these Products. I selected the same trees as was in the Wiki instruction "Terrain Autogen Class Small Leaf Mixed Woods".

Thanks for a great tool! :)

Mike
 

MatthiasKNU

Resource contributor
Messages
958
Country
germany
Where in real Life there are say two or three commercial buildings on the site my autogen brings one large bulding. anything that can be done about that?

Yes, take a look at the ScenProc Manual, chapter 5.4 explains how you detect different building types and how you replace them with smaller buildings.

I had some trouble with getting any trees initially. All istructions I followed online called the "TYPE" command when it really needed the FCLASS command. Finally found it in the attributes table in QGIS :)

I see that my landuse file also includes schrubs. Can I add that with the same CREATEAGNPOLYVEG command that I used for trees but only replace the name "forest" with schrubs and select an appropriate schrubs GUID (any good suggestion for nie looking schrubs? :)

Yes, of course you can do that. As I have written above you have to use this step:
Code:
CreateAGNPolyVeg|fclass="forest" OR fclass="scrub"|[Your Vegetation GUID]

And replace it with something like that:
Code:
CreateAGNPolyVeg|fclass="forest"|[Your Vegetation GUID]
CreateAGNPolyVeg|fclass="scrub"|[Your Vegetation GUID]

And this brings me to my last question. I use Orbx Trees HD and will use Orbx HD Buildings when it is released. Will I benefit from these Products. I selected the same trees as was in the Wiki instruction "Terrain Autogen Class Small Leaf Mixed Woods".

ORBX Trees and Buildings just replaces the textures which are being used by the sim. So yes, you will see the ORBX Trees and Building textures.
 

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
Folks, I'm adding to this thread as I'm totally at a loss to what's happening with SceneProc. Everything's running well enough, but the program won't write any AGN files, as per the image below. Any ideas - I've been on this all afternoon for a client and I'm totally stumped.
 

Attachments

  • fail.jpg
    fail.jpg
    193.6 KB · Views: 208

MatthiasKNU

Resource contributor
Messages
958
Country
germany
Hi!
Try this:
Code:
ImportOGR|buildings.shp|*|*|AUTODETECT
SPLITGRID|AGN|*
CREATEAGNGENBUILD|code=1500|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
ExportAGN|P3D v2|D:\Program Files\Lockheed Martin\Prepar3D v4\Addon Scenery\Israel Photoreal\texture

Also try saving the agns to another path, because saving to Program Files always might cause problem due to missing rights...
 

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
Hi!
Try this:
Code:
ImportOGR|buildings.shp|*|*|AUTODETECT
SPLITGRID|AGN|*
CREATEAGNGENBUILD|code=1500|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
ExportAGN|P3D v2|D:\Program Files\Lockheed Martin\Prepar3D v4\Addon Scenery\Israel Photoreal\texture

Also try saving the agns to another path, because saving to Program Files always might cause problem due to missing rights...

Hi Matthias, thanks for your reply - I tried both methods, but neither worked. It's very odd - SceneProc processes everything, and yet no AGN files are written in the end. Can't understand what's wrong as without an error it's impossible to troubleshoot really.

Everything looks fine up to the code used - I wonder if that's the issue?
 
Last edited:

MatthiasKNU

Resource contributor
Messages
958
Country
germany
Just tried your script, works perfect.
Are you using the latest Development Version of ScenProc?
Are you sure, your buildings shapefile has the field "code"?
 

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
Just tried your script, works perfect.
Are you using the latest Development Version of ScenProc?
Are you sure, your buildings shapefile has the field "code"?

Yep, everything's in order and the script runs fine, just no files written again. I'm starting to wonder about other factors that might not be in the manual: should SceneProc be installed somewhere specific ( it's folder is on my desktop at the moment ). Could it be something like that?
Latest.jpg
 

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
I replaced the code with an FTYPEPOLYGON script but that also failed to write the autogen. No errors though.
 

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
It worked! I used an .osm file as the ImportOGR target and it compiled easily. Not sure why the .shp files are not working?
 

MatthiasKNU

Resource contributor
Messages
958
Country
germany
Strange. I am always working with Shapefiles...
Maybe you could try to load the shapefile into QGIS/ArcGIS and check if the shapefile has the field "code"...
 

arno

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

Looking at the log there were simply no features with an attribute code and a value of 1500 in the SHP file that you loaded. You can see in the log that no autogen buildings had been made, so then nothing can be saved either. Most likely the data used different attributes.
 

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
Hi Matthius and Arno, thanks for your replies.

I solved it. As ever, my fault - I had inadvertently saved the project to a different folder than where the damned shp / osm files were. I have duly slapped myself in the face for being an idiot :)
 
Top