![]() |
|
|||||||
| Register | Wiki | Downloads | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
Categories |
ViewsScenProcFrom FSDeveloper Wiki
Scenery Processor, or scenProc for short, is a tool to process GIS data and create scenery output from it. It can for example import vector data and create autogen AGN files from this data. The tool is driven by the configuration file, which can be edited in the GUI of the tool.
[edit] Getting scenProc[edit] Prerequisites
[edit] InstallationAt this moment scenProc is still under development, but a beta version is already available. Please be aware that this version might have bug left. You can download the latest development release here. The development release also contains other tools that I made, like ModelConverterX. Just unzip all of these tools to a folder of your choice. That's all the installation. To be able to read shapefiles, you need to have the Microsoft Access Database Engine 2010 installed. Be aware to install the right version, if you are running a 64 bit OS, you need to have the 64 bit driver installed. If you get an error while installing that a 32 bit Microsoft Office is installed, you can run the installer in passive mode to still install the driver: AccessDatabaseEngine_X64.exe /passive [edit] User interfaceThe graphical user interface of scenProc is shown below. It consists of three main components:
Validation While typing your configuration in the text editor the configuration file is automatically validated. This means that there is a mistake in the file this will be reported in the event log at the bottom of the screen. It is for example validated if the correct amount of arguments are specified for a step, if the file specified exists or if the specified GUID is valid. As long as there are errors while validating the configuration file, you can not run the configuration. Options Below the options of scenProc are shown. In the options you need to specify the paths to FSX and to the FSX SDK. Without these paths the auto completion functionality is not working. Besides that some parameters of algorithms can be set in the options as well.
Batch mode It is also possible to run the tool like a command line tool. In that case it should be started from the command line providing the name of the configuration file and the additional argument /run. In this case the configuration file will be ran directly after opening and the tool will automatically close once finished. [edit] Configuration fileIn the configuration file (plain text file, usually with the extension .spc) you specify what data you want to process and how you want to process it. In the next section the available commands are described. All lines starting with a hash (#) are comments and are ignored. Each lines starts with the name of the action you want to perform, followed by arguments of needed. The arguments are separated with a pipe (|) symbol. [edit] FilterSome processing commands take a filter as input. With this filter you can select the features that match certain attributes. Please be aware that attribute names are values are case sensitive, so be aware that you type them in the correct case. You specify the filter with the syntax: ATTRIBUTENAME=VALUE There are four operators that can be used:
If you want to specify multiple conditions you separate them with semicolons (;). All features that match all of those conditions are then selected. ATTRIBUTENAME1=VALUE1;ATTRIBUTENAME2=VALUE2 Besides the attributes that are present in the source data you imported, there are some special attributes that scenProc adds while importing the data. The table below indicates which attribute is added to which type of feature.
Use can use an asterisk (*) to select all features.
[edit] Available processing stepsBelow the available processing steps in scenProc are listed. For more detailed help enter the step in your configuration file and hover over the command to see the tooltip showing the help.
[edit] Examples[edit] FSX autogen from OpenStreetMap shapefilesThis examples shows how FSX autogen can be created from OpenStreetMap shapefiles downloaded from GeoFabrik. # Schiermonnikoog autogen test
IMPORTSHP|natural_schier.shp|NOREPROJ
IMPORTSHP|buildings_schier.shp|NOREPROJ
#
SPLITGRID|AGN
#
SETAGNBUILDINGHEIGHT|1.0;0.0;0.0;0.0
SETAGNBUILDINGTEXTURE|autogen_NL
#
CREATEAGNPOLYVEG|FTYPE=POLYGON;type=forest|{e8b937fd-a1f2-4bd5-8548-2c80d30102af}
CREATEAGNGENBUILD|FTYPE=POLYGON;FROMFILE=buildings_schier.shp;FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CREATEAGNGENBUILD|FTYPE=POLYGON;FROMFILE=buildings_schier.shp;FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
CREATEAGNROWHOUSE|FTYPE=POLYGON;FROMFILE=houses_schier.shp
CREATEAGNLIBOBJ|FTYPE=POINT;type=light|{0017a263-464f-14fd-f77f-2996fed44864}
#
WRITEAGNFILES|FSX|c:\flightsim\nl2000\nl2k_v4_resample_FR\texture
[edit] FS2004 autogen from shapefilesThis example shows how to create FS2004 autogen from a set of shapefiles that each contain a specific feature type. IMPORTSHP|vegetation.shp|NOREPROJ
IMPORTSHP|libobj.shp|NOREPROJ
IMPORTSHP|building.shp|NOREPROJ
#
REPLACEPOLYGONBYVEGETATIONRECTANGLES|FROMFILE=vegetation.shp|0.0005|0.25|0.25
#
SPLITGRID|AGN|FROMFILE=building.shp
#
SETAGNVEGETATIONSETTINGS|1|2|0.5|1.0|6;12|5;20
#
CREATEAGNRECTVEG|FROMFILE=vegetation.shp
CREATEAGNGENBUILD|FROMFILE=building.shp|{00000000-0000-0000-0000-000000000000}
CREATEAGNLIBOBJ|FROMFILE=libobj.shp|{82be3f0e-40dc-6365-679d-45ac6fde6872}|0|8;8
#
WRITEAGNFILES|FS2004|C:\flightsim\work\agn\s43_harvey\texture
[edit] SupportIf you have any problems while using the program or if you have suggestions and other feedback to improve the tool, please let me know. You can either contact me directly or visit the scenProc subforum at FSDeveloper.com. [edit] User license(c) 2011 SceneryDesign.org / Arno Gerretsen This software program is distributed without charge to other addon developers. Redistribution of the original ZIP file is allowed. You are NOT allowed to sell this software program or ask money for its distribution. Special effects created with this software program can be used in commercial scenery projects if you wish. The copyright and any intellectual property relating to this program remain the property of the author. The software distributed in this way may represent work in progress, and bears no warranty, either expressed or implied. Categories: FSX Acceleration | FSX | FS9 (FS2004) | Tools | Manuals | ScenProc |