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

Scenproc CreateAGNPolyBuild integration

Hi everyone, I made this script reading and finding info Here the best I could find. Some buildings using CreateAGNPolyBuild are not displayed and others yes, as in the source.jpg file,
my reference table is table.jpg (type="residential", type="house", type="industrial"
Is there any improvement I can make? is there anyone able to perfect this script? SetAGNBuildingHeight seems do not work well .. see log file

Thank you so much
Code:
ImportOGR|G:\PREPAR3D\OrthoFull\OrthoGEOtiff\Ortho4XP\Geotiffs\CENTROCOMPILE\roma\*.shp|*|*|NOREPROJ
#
SplitGrid|AGN|*|fclass="building"
SplitGrid|AGN|*
#AddedBRe


AddCellAttribute|*|String;fclass|building
AddCellAttribute|*|String;type|residential
AddCellAttribute|*|String;type|house
AddCellAttribute|*|String;type|apartments
AddCellAttribute|*|String;type|roof
AddCellAttribute|*|String;type|industrial
#
SetAGNBuildingHeight|fclass="building"|0.0;0.6;0.6;0.2
SetAGNBuildingHeight|type="residential"|0.0;0.5;0.8;0.3
SetAGNBuildingHeight|type="house"|0.0;0.8;0.5;0.2
SetAGNBuildingHeight|type="roof"|0.0;0.5;0.4;0.1
SetAGNBuildingHeight|type="industrial"|0.5;0.5;0.0;0.0

#
#creation de la vegetation
#CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
#CreateAGNPolyVeg|FTYPE="POLYGON" And fclass="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And fclass="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And fclass="nature_reserve"|{82f0282d-f82d-484c-a640-aac21a69be03}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And fclass="wetland"|{89ed8548-e54f-40ef-9837-7653885d409c}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And fclass="park"|{e04669c0-9f7b-42e8-a2c7-eee870c59d8e}
#
# Add attribute to indicate the type of building
# 1 = ALMOST RECTANGLE (BASED ON AREA RATIO)
# 3 = REGULAR SHAPED (MANY PARALLEL EDGES)
# 4 = CONVEX POLYGONS
# 5 = CONCAVE POLYGONS
AddAttribute|FTYPE="POLYGON" And fclass="building"|Integer;BUILDTYPE|5
AddAttribute|FTYPE="POLYGON" And fclass="building" And BUILDTYPE=5 And FAREARAT>0.80|Integer;BUILDTYPE|1
AddAttribute|FTYPE="POLYGON" And fclass="building" And BUILDTYPE=5 And FNUMVERT<10 And FNUMPERPANG>3 And FNUMNOTPAR<2|Integer;BUILDTYPE|3
AddAttribute|FTYPE="POLYGON" And fclass="building" And BUILDTYPE=5 And FCONVEX=1|Integer;BUILDTYPE|4
#
# Remove complex buildings
#ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.25;2.0;0.5|Integer;BUILDTYPE|2
#
# Create buildings autogen

CREATEAGNGENBUILD|fclass="building" AND FAREARAT>0.7 AND FWIDTH<15|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=1.5
CREATEAGNGENBUILD|fclass="building" AND FAREARAT>0.7 AND FWIDTH>15 and FWIDTH<30|{f7b99ae4-80ca-4652-b2df-2fee994d70f9}|MAXRATIO=1.75
CREATEAGNGENBUILD|fclass="building" AND FAREARAT>0.7 AND FWIDTH>30 and FWIDTH<40|{f952d757-2e7f-4f69-8072-e6081a2b76a1}|MAXRATIO=2
CreateAGNPolyBuild|fclass="building" AND FAREARAT>0.7 AND FWIDTH>2 and FWIDTH<100|{DF4B450E-6D20-4EA5-899F-D66DF9E46244};{D439BFD9-A410-4005-AB50-2F2DD8D0C034};{DD94EEDD-8367-4A87-95D6-35D123DCDE45}|0.008


CREATEAGNGENBUILD|type="roof" AND FAREARAT<0.7 AND FWIDTH<15|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CREATEAGNGENBUILD|type="house" AND FAREARAT>0.7 AND FWIDTH>15 and FWIDTH<30|{311de8c7-e596-4e28-a94d-da09d0252ce4}|MAXRATIO=2
CreateAGNPolyBuild|type="house" AND FAREARAT>0.7 AND FWIDTH>2 and FWIDTH<100|{2589a851-fcc9-4288-93a2-8acd1556f43a}|0.007
CREATEAGNGENBUILD|type="apartments" AND FAREARAT>0.7 AND FWIDTH>30 and FWIDTH<40|{311de8c7-e596-4e28-a94d-da09d0252ce4}|MAXRATIO=2
CreateAGNPolyBuild|type="apartments" AND FAREARAT>0.7 AND FWIDTH>2 and FWIDTH<100|{BC2778A6-DE17-4081-9434-F30ED0046CF5};{DF4B450E-6D20-4EA5-899F-D66DF9E46244};{B06119A0-DABB-4695-93D5-E09587853C7D}|0.008

CREATEAGNGENBUILD|type="industrial" AND FAREARAT>0.7 AND FWIDTH<15|{4eb68be7-2f1f-4cd2-920e-becfa2d8c888};{a9b0e686-0758-4294-a760-9bb4fd341621}|MAXRATIO=3
CREATEAGNGENBUILD|type="industrial" AND FAREARAT>0.7 AND FWIDTH>15 and FWIDTH<30|{4eb68be7-2f1f-4cd2-920e-becfa2d8c888}|MAXRATIO=3
CREATEAGNGENBUILD|type="industrial" AND FAREARAT>0.7 AND FWIDTH>30 and FWIDTH<50|{4eb68be7-2f1f-4cd2-920e-becfa2d8c888}|MAXRATIO=3


CREATEAGNGENBUILD|type="residential" AND FAREARAT>0.7 and FWIDTH<15|{7d6e09d6-3954-4ea2-bbb7-43b2b3083482}|MAXRATIO=2
CREATEAGNGENBUILD|type="residential" AND FAREARAT>0.7 and FWIDTH>15 and FWIDTH<30|{f8d16195-b3e7-467d-a741-111f98be6abc}|MAXRATIO=2.5
CREATEAGNGENBUILD|type="residential" AND FAREARAT>0.7 and FWIDTH>30 and FWIDTH<50|{f952d757-2e7f-4f69-8072-e6081a2b76a1}|MAXRATIO=3
CreateAGNPolyBuild|type="residential" AND FAREARAT>0.7 AND FWIDTH>2 and FWIDTH<100|{f707c26e-32ed-4f15-85a2-81c5bc9f8b32};{DF4B450E-6D20-4EA5-899F-D66DF9E46244};{D439BFD9-A410-4005-AB50-2F2DD8D0C034};{DD94EEDD-8367-4A87-95D6-35D123DCDE45}|0.008
#
EXPORTAGN|P3D v2|G:\PREPAR3D\OrthoFull\OrthoGEOtiff\Ortho4XP\Geotiffs\CENTROCOMPILE\roma\texture
table.JPG
source.JPG
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

For the building height you now assign all attributes to all cells. So this means that they will all get the same height assigned as well. What kind of strategy do you try to use to vary building height?

Having two SplitGrid steps also won't help. So you better remove the second one.

With this script all buildings that have an area ratio of less than 70% are skipped. So that could explain some of your missing buildings. You could try to use the ReplacePolygonByBuildingRectangles step on those.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
That seems to be some very long building :)

Are you sure you are only including features of buildings and not for example big polygons of industrial areas?
 
:D yes sure, I have only the osm building for test. Rome area
the problem I think is here :
AddAttribute|FTYPE="POLYGON" And fclass="building" And BUILDTYPE=5 And FNUMVERT<10 And FNUMPERPANG>3 And FNUMNOTPAR<2|Integer;BUILDTYPE|3
AddAttribute|FTYPE="POLYGON" And fclass="building" And BUILDTYPE=5 And FCONVEX=1|Integer;BUILDTYPE|4
or

CREATEAGNGENBUILD|fclass="building" AND FAREARAT>0.7 AND FWIDTH>30 and FWIDTH<40|{f952d757-2e7f-4f69-8072-e6081a2b76a1}|MAXRATIO=2
CreateAGNPolyBuild|fclass="building" AND FAREARAT>0.7 AND FWIDTH>2 and FWIDTH<100|{DF4B450E-6D20-4EA5-899F-D66DF9E46244};{D439BFD9-A410-4005-AB50-2F2DD8D0C034};{DD94EEDD-8367-4A87-95D6-35D123DCDE45}|0.008

About SetAGNBuildingHeight, the fclass:building contain all bulding, an other column for type=" roof" ,house , etc is inside the same table. I'm not able to select BuildingHeight for "residential" in the JPG table above :stirthepo
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

You need to remember that the building height is set per autogen tile. So that is not something you can do on the basis of individual features. You'll need some measure of how many of a certain type of buildings are in an area or so. In my own projects I often use population density data for this.

Looking at your last screenshots I think the lines come from polygonal buildings. These need to have a courtyard and I think the problem might happen when the polygon is self intersecting (e.g. the size of the courtyard does not work with that specific footprint).
 
Solved the very long building adding: FNUMVERT<10 inside CreateAGNPolyBuild.
The scenery is very good. Latest question:

yellow objects, it is generated like all the others that have a complete area (without holes or openings)
The example object in red is not generated, no object with a hole in the middle is apparently generated. Are these objects not supported by sceneproc, or do you have to create a dedicated function?
P.S. even if you enter a number of vertices of 100, they are not generated

Thanks, Giovambattista
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

That object you show in red is hard to make with autogen. Autogen buildings need to be rectangular.

Only when you use the polygon builidng you can make other shapes, but they need to have a courtyard. And looking at that red polygon it is not a closed shape with a hole, but more like a U-shape with an opening.
 
Many objects is coming..., ScenProc is fantastic. Thanks
Attached a Live mega compiling on Google Cloud server + My PC = 260.716‬ Cells Simultaneus :) only for fans - 4 x Sceneproc v3.0.0.0 r21ea246d open NOW
1.5 GB of SHP data
Over 8 Million Obgects
24 x 2.3 Ghz Xeon core and 64 Gb Ram
6 x 3.7 Ghz Core I5 9600k and 16 Gb Ram
Now compiling the all South Italy, Rome included.
Special thanks to Mr Arno

Compiling2.jpg
Compiling3.jpg
 
Many objects is coming..., ScenProc is fantastic. Thanks
Attached a Live mega compiling on Google Cloud server + My PC = 260.716‬ Cells Simultaneus :) only for fans - 4 x Sceneproc v3.0.0.0 r21ea246d open NOW
1.5 GB of SHP data
Over 8 Million Obgects
24 x 2.3 Ghz Xeon core and 64 Gb Ram
6 x 3.7 Ghz Core I5 9600k and 16 Gb Ram
Now compiling the all South Italy, Rome included.
Special thanks to Mr Arno

View attachment 59344View attachment 59345
Can you post your FINAL .SPC file to see the script you are using?
 
Last edited:
Top