Auto completion for attributes

From the next development release scenProc has a new feature, it is now possible to get auto completion of possible attributes and their values. All you have to do is scan the file you will be processing by pressing the “Scan attributes” button. Be aware that this might take a while for big files.

After that you will see that the auto completion when constructing a filter also shows the attributes and their possible values (as found in the OSM or Shapefile). This makes it a lot easier to construct the filters. And it is also a great way to explore which possible values there are for you to use.

Below is a quite video I made to demonstrate the feature.

Turn on the turbo!

A while ago I made the scenProc step to split the features in the correct grid faster by using multiple threads. I have now updated almost all of the steps to use multiple threads and process the features in parallel. So this should reduce the time needed to process bigger areas quite a bit. Especially on current multi-core computers running in multiple threads should speed things up quite a bit.

The only exception to this is that the steps to import data from file still use on thread, since there is only one file to read.

These changes will be available in the next development release.

 

Creating rectangles from a footprint

I have added a new processing step to scenProc, with this step you can replace a complex building footprint by a number of rectangles. The step only takes the filter of the objects you want to process as argument. So for example:

REPLACEPOLYGONBYBUILDINGRECTANGLES|BUILDTYPE=3

It only works well on footprints that have many parallel edges, else it is very hard to represent the shape by rectangles. Below is a picture showing the result for some test area I did. The pink footprints are the new rectangles that have been made. As you can see, sometimes you still see part of the original footprint. So the result is not yet perfect, but when viewing the resulting autogen I think it looks quite convincing already.

I plan to do another video tutorial soon, where I will demonstrate more of the autogen creation flow and how this new step fits in.

A FS developer conference?

A user of the FSDeveloper community started an interesting discussion this week, would it be possible to organize a conference for FS addon developers? Similar to the AltDevConf it should be an online conference so that it is easy for people from everywhere to attend.

At FSDeveloper we find this a very interesting idea, so we have put together a survey to get a better idea of how many people would like to attend such a conference and which topics you would like to see covered. So please take a few minutes to fill in this survey.

Using your feedback we will then decide if we can organize such an event next year. Personally I think it would be very nice if we could. The 2007 DevConf organized by Microsoft was a great event to gather knowledge about addon development. And now so many years later I think it would be great to have another event where we can share our knowledge about this hobby.

 

 

Texture border in drawcall minimzer

The drawcall minimizer has a new option, you can now add a border around your textures. This means that a row of pixels is added with the same colour as the outside of your texture. Doing this can prevent visible edges or black lines after running the drawcall minimizer. Below is a screenshot of the material editor where you can now enter the size of the border in pixels, the default size is 1 pixel.

FSC exporter

I have added a new exporter to ModelConverterX, from now on you will also be able to export to the FSDS FSC format. The exporter will save the geometry, material and textures. Animations are not supported at this time.

With this new additional it is now possible to convert both to and from FSDS. So especially for developers using FSDS that should open new ways to exchanging (parts of) models between FSDS and other programs.

Let there be rectangles…

I have added a new processing step to scenProc that allows you to turn polygons into rectangles. This step is mainly useful when creating autogen vegetation for FS2004, since the vegetation must be rectangular there.

What the step does is just take the polygon and try to fill the shape with rectangles of the size specified. You can also specify the percentage of overlap you want between the rectangles. A random factor can also be specified to give the position a little more variation. Below is an example configuration file that shows how it works:

IMPORTOSM|andorra.osm|*|landuse
EXPORTSHP|landuse=forest|poly
REPLACEPOLYGONSBYRECTANGLES|landuse=forest|0.0025|0.25|0.1
EXPORTSHP|landuse=forest|rect

Below is a screenshot showing the result.

Features with holes

I have made some changes to the OSM importer for scenProc and it should now handle features with holes correctly. Since I am currently travelling for work, I do not have the FSX SDK here, so I haven’t been able to try yet if the produced AGN with the holes will actually work. That’s something I plan to do once I get home.

I am quite sure that complex holes (like holes within holes) will not yet work. Also features with holes for Shapefiles are not working yet. I’ll have to check those once I got home as well, since the laptop I have here does not have the Ace driver installed that is required.

So let me know if there are any issues with features with holes.

OpenStreetMap, performance and more

In the next development release there are some interesting changes to the scenProc tool. These are the main changes:

  • You can now read data from the OpenStreetMap XML format. This makes it even easier to use OpenStreetMap data to create autogen objects for FSX. By reading the OSM XML format directly you can get even more features than in most Shapefile version that can be downloaded.
    The new step to import OSM data is called IMPORTOSM and it takes 3 additional arguments. The first is the OSM file you want to load. The second specifies the region you want to load (lonmin;lonmax;latmin;latmax) or use a * to load everything. The third argument is a list of tags that should be loaded, only features that have at least one of the tags listed will be imported. Or use a * to load all features.
    A good overview of the tags used in the OpenStreetMap data can be found here.
  • In the options you no longer have to set the XtoMDL, ModelDef.xml and Autogen SDK path. Instead you should now just set the FSX SDK path and the tool will find all the other files by itself. Also you get a folder selection dialogue now, making it even easier to select the right folder.
  • When processing the scenProc configuration file you will get more feedback in the event log now. For example the import steps will report how many features they have imported and the steps to create autogen objects will report how many they have made.
  • And last, but not least. I have made some changes to improve the performance of the SPLITGRID step. This step usually takes most of the time, especially for big areas. From now on this step uses multiple threads, so that should speed things up. Be aware that I use .NET 3.5 functionality now as well, so be sure you have that version of the framework installed.