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

Creating storage tanks / circular objects

Messages
38
Country
unitedkingdom
Hi,

I've searched the manual but can't seem to find any info. I am wondering how I could get Scenproc to recognise and build Storage tanks as can be seen in the attached OSM data?

Many thanks
 

Attachments

  • storage tank.jpg
    storage tank.jpg
    469.8 KB · Views: 290

MatthiasKNU

Resource contributor
Messages
955
Country
germany
I would recommend to load the data, use the "PlacePointAtCenterPolygon"-Step, and then place and xml object with the GUID of the storage tanks...
And then you have to export the result as a bgl...
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
If placing them as BGL files the suggestion from Matthias is probably the best way.

But if you want to place them as autogen library objects you can use probably use the existing polygon as input for the CreateAGNLibObject step.
 
Messages
38
Country
unitedkingdom
If placing them as BGL files the suggestion from Matthias is probably the best way.

But if you want to place them as autogen library objects you can use probably use the existing polygon as input for the CreateAGNLibObject step.
So I sort of got it to work, is there any way I can adjust the size of the tanks to better fit the size in the image?

Have attached a photo and my config.
 

Attachments

  • 2020-5-28_13-31-3-880.jpg
    2020-5-28_13-31-3-880.jpg
    619.3 KB · Views: 259
  • storage tank script.txt
    402 bytes · Views: 190

arno

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

The autogen library objects can not be scaled, so you might want to check if there are different objects that are larger.
 

MatthiasKNU

Resource contributor
Messages
955
Country
germany
But if you create the tanks as XML objects and export them as bgl, you can specify a scale value.

I usually do this by creating a column "Radius" with GIS, from which I then calculate the scale factor.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
I should probably modify scenproc to calculate that scale automatically :).
 
Messages
38
Country
unitedkingdom
Thanks for your help guys. My understanding and manipulation of Scenproc is too basic I'm afraid to be able to do what I want to do here.

Is there any way I could just at least exclude any areas with landuse=industrial so that generic autogen buildings aren't added to these areas?

Many thanks.
 

arno

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

There are two options to do that. One is to use the AddAttributeIfInside step to add an attribute to all buildings that are inside an industrial polygon. You can then use this attribute to exclude them.

Another option is to use the FilterFeatures step and filter out the building polygons that are inside the industrial polygon (in that case they are removed and you can't use them anymore for something else either).
 
Messages
38
Country
unitedkingdom
Hi,

There are two options to do that. One is to use the AddAttributeIfInside step to add an attribute to all buildings that are inside an industrial polygon. You can then use this attribute to exclude them.

Another option is to use the FilterFeatures step and filter out the building polygons that are inside the industrial polygon (in that case they are removed and you can't use them anymore for something else either).
Hi,

Thanks for your reply. Just had a look in the manual at the relevant sections you've mentioned for AddattributeIfInside and also the FilterFeatures but again it just goes over my head sadly, but thanks for your help.
 
Messages
38
Country
unitedkingdom
One is to use the AddAttributeIfInside step to add an attribute to all buildings that are inside an industrial polygon. You can then use this attribute to exclude them.

I don't suppose you could elaborate on this in a little more detail for me, as my understanding of Scenproc is too basic to even know where to start, despite looking in the manual. Sorry :(
 

arno

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

I'll try to make a small example script tonight.
 
Messages
38
Country
unitedkingdom
Another question for you when you get chance, I thought it was easier to keep it in the same thread.

I've been trying to create Library objects for things such as castles, churches etc.

Scenproc appears to create the objects but then I don't see any of the objects in the sim?

Have attached the test config I used to create them.
 

Attachments

  • library object creation.txt
    1.9 KB · Views: 169

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
I should probably modify scenproc to calculate that scale automatically :).

I have just modified scenProc so that it can calculate the scale value. So in the next development release you can do something like this:

Code:
CreateXMLLibObj|man_made="storage_tank"|8aaabdf2-4496-483a-8df1-86ea13aa950d|0|0|0|FLENGTH/20

Which will use the FLENGTH attribute value of the feature and divide it by 20 to calculate the scale (this assumes the library object has a length of 20 meter at scale 1).
 

arno

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

Another question for you when you get chance, I thought it was easier to keep it in the same thread.

I've been trying to create Library objects for things such as castles, churches etc.

Scenproc appears to create the objects but then I don't see any of the objects in the sim?

Have attached the test config I used to create them.

In the log file you can see that there are only 8 library objects being created in an area of 200 cells. This probably means you need to look in very specific places to see the library objects, as there are very few only.

Also are you sure you have entered a valid GUID of a autogen library class in the script?
 
Messages
38
Country
unitedkingdom
Hi,



In the log file you can see that there are only 8 library objects being created in an area of 200 cells. This probably means you need to look in very specific places to see the library objects, as there are very few only.

Also are you sure you have entered a valid GUID of a autogen library class in the script?

Hi,

I downloaded OSM data for just a very small area in portugal near Faro, just for one village which had these features in order to test it.

Here are the GUIDs I used:

# Credit to Harry Otter for the default ScenProc script!
IMPORTOGR|C:\Users\Daniel\Desktop\Bosnia osm\porto.osm.pbf|*|*|AUTODETECT
SplitGrid|AGN|*|building="*"
#
SETAGNBUILDINGHEIGHT|*|1.0;0.5;0.0;0.0

CreateAGNLibObject|historic="castle"|{ca9d46a3-454c-45de-bf64-587d35a37469} (Orbx_EU_Castle_square)
CreateAGNLibObject|amenity="place_of_worship"|{fc1ddba0-f068-4561-ac6a-230f425677ff} (Orbx_EU_Church_Large)
CreateAGNLibObject|amenity=shop="*"|{f26a6d14-4b01-4c49-b5b6-f0aa3b9c9680};{fc1ddba0-f068-4561-ac6a-230f425677ff} (Orbx_29b06_Shop1)


EXPORTAGN|FSX|F:\Prepar3D photo Scenery\Portugal photoreal\Texture
 

arno

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

I'll try to make a small example script tonight.

Here are some samples of how to filter. First I made a very simple script which loads some OSM data and makes buildings out of each building feature in the OSM data (this includes towns, but also storage tanks). You can see 2086 buildings were made.

1590780299868.png


One easy way to prevent buildings being made for the storage tanks is to just exclude them in the filter, like I do here. That way only 1968 buildings are being made instead.

1590780353644.png


But I know this is not what you asked, as you wanted to filter on industrial areas. So the first approach is to use the AddAttributeIfInside step. You can add an attribute to each building that is inside an industrial landuse. In used the attribute isIndus="yes" here, but you can name it whatever you like. In the step that makes the buildings I then exclude the features that have isIndus="yes". With this you see only 1802 buildings are made.

1590780485019.png


The last option is to use the FilterFeatures step. In this case I remove any building feature of which the center is inside an industrial landuse polygon. In the step to create the buildings I don't have to exclude any features anymore, as they were removed already. Once again 1802 buildings were made for this test area.

1590780655321.png


I hope these samples help you a bit.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,858
Country
netherlands
I downloaded OSM data for just a very small area in portugal near Faro, just for one village which had these features in order to test it.

Here are the GUIDs I used:

You might want to check in which region of the default.xml file these library classes are defined. It might be they are not defined for the region that Portugal falls within.
 
Messages
38
Country
unitedkingdom
Hi,



Here are some samples of how to filter. First I made a very simple script which loads some OSM data and makes buildings out of each building feature in the OSM data (this includes towns, but also storage tanks). You can see 2086 buildings were made.

View attachment 58599

One easy way to prevent buildings being made for the storage tanks is to just exclude them in the filter, like I do here. That way only 1968 buildings are being made instead.

View attachment 58600

But I know this is not what you asked, as you wanted to filter on industrial areas. So the first approach is to use the AddAttributeIfInside step. You can add an attribute to each building that is inside an industrial landuse. In used the attribute isIndus="yes" here, but you can name it whatever you like. In the step that makes the buildings I then exclude the features that have isIndus="yes". With this you see only 1802 buildings are made.

View attachment 58601

The last option is to use the FilterFeatures step. In this case I remove any building feature of which the center is inside an industrial landuse polygon. In the step to create the buildings I don't have to exclude any features anymore, as they were removed already. Once again 1802 buildings were made for this test area.

View attachment 58602

I hope these samples help you a bit.
This is brilliant, I really cannot thank you enough for doing this. Thank you so much for your help, it's really appreciated.
 
Top