How to vary autogen building height?

One of the items still on my scenProc wishlist is adding a feature that allows you to vary the heights of the autogen buildings  In the current version you have to set the same height distribution for all autogen tiles. But how to do that? I started a thread on the forum a while ago to discuss the possibilities and at the moment I see a couple of ways this can be done.

  1. First option is to let the user draw some polygons manually where he wants more hi-rise buildings. All areas not covered by these polygons would get the low buildings only. Since KML file can now be read, these polygons could even be drawn in Google Earth quickly.
  2. vector_pop_densityA second option is to find and use some vector data that contains information about population density, amount of houses in an area or something similar. For the Netherlands I found some (free) data from the national statistics bureau that gives information about amount of people, population density and even amount of houses for the entire country. This information is given for cells of 500×500 meter. To the right is a screenshot of this data.
  3. raster_pop_densityA third option would be to use a raster image with population density data. I did not yet find a good source for this however. I found some population density data at the EEA website that covers most of Europe. But it only showed the population density per municipality. Which means that the city centre and the suburbs have the same density. While the aim is to vary the autogen between those parts of town of course. I have included a screenshot of this data on the right again. But there might be better data available and then using raster data would be a good idea.

So with those 3 ideas in mind, how am I going to implement it in scenProc? In the end it all comes down to the same idea. Taking the centre coordinate of the autogen tile the available data should be checked for the population density and than based on the value a selection is made for the distribution of the buildings heights in the autogen. So let’s see if I can get that coded…

Reading KML files

kml-685I have added support for another file format to scenProc, it is now also possible to read KML files. This means that you can now use Google Earth as well to draw your points, lines and polygons. And then use scenProc to convert this data into autogen for FSX.

I have only tested with some KML files made with Google Earth and QGIS. So if you have KML files made with another tool and have problems with importing them, please let me know.

Down time

Just a quick reminder that this website will be offline for an hour or so tomorrow morning. This means that also the development releases of my tools are not accessible for that time.

As some of you might know the development releases and this site our hosted on a small server at my home. And tomorrow I will be making some small adjustments to the electrical wiring in the house to make it safer for our baby that can almost crawl now. So therefore the server will be offline for a while.

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.