OGR power!

For the new scenProc feature to detect features from imagery I started to use the GDAL/OGR libraries. But since the OGR library supports reading many vector formats, I have now also add a new step that allows you to read in data through this library. It is called IMPORTOGR. The attributes are the same as you are used to for the other formats, you specify the filename, the optional geospatial filter and the coordinate system used in the file.

The big advantage is that the OGR library supports many formats. So this makes it possible to load even more data into scenProc. So you can for example read SHP or OSM XML. But also the binary OSM PFB, KML, GML and many many more.

Using the OGR library I think I also have better support for features with holes. Before that was only supported when reading from SHP and for complex features it didn’t always work. That should have been improved now as well.

The existing steps like IMPORTSHP, IMPORTOSM and IMPORTKML are now deprecated. Which means I will not develop them further and they will be drop in a future release. So you are advised to switch to the new IMPORTOGR step. Let me know if there are features that used to work in the old steps, but no longer in the new one.

One feature from the old IMPORTOSM step is not yet implemented, that’s the ability to filter on the attributes and only read the features of the attributes you need. I hope to add such a feature to the new OGR reader as well. Any ideas on what would be the most convenient way to do this are welcome. Assuming that you users are using this attribute to limit the memory usage.

FSDeveloper DNS problem

As already indicated in my post yesterday there is a problem with the FSDeveloper website. The DNS is not working correctly. We are working with the domain registrar to get everything working again, but since Christmas is approaching quickly now I don’t expect an answer from their support anymore before Christmas. So that means it will take a bit longer before you can reach the FSDeveloper site in the normal way again.

Of course we hope that our community members will  have a nice Christmas, but if you feel the urge to visit FSDeveloper you can for the moment do that by using the IP address of the server.

FSDeveloper offline

As you have maybe already noticed the FSDeveloper website is currently not accessible. The problem has nothing to do with the server, but for some administrative reasons the domain has been put on hold. We are working hard to reverse this and hope that the site is available again soon.

If you want to keep up to date with the progress please check the FSDeveloper Facebook page, we’ll post regular updates there.

Detect vegetation from imagery

In the last months I often wrote about my progress of adding a feature to scenProc to detect features from imagery. My main purpose was to detect vegetation. I have now finished this feature and put it in the scenProc development release.

Be aware that adding this feature meant I had to add the GDAL libraries. This is quite a big collection of files and to keep the download size manageable there are now two versions of scenProc. One for 32 bit systems (x86) and one for 64 bit systems (x64). Be sure to download the right version for your OS. You can find all the links at the usual page.

How this new feature works is a bit too complex to explain in this short blog post. So I’ll be making a video tutorial shortly to explain you how it works.

Exporting FS2004 aircraft MDL files

beta-splashOne feature often requested is the ability to export FS2004 aircraft MDL files as well. I have now set a first step in the direction of this functionality. If you download the development release tomorrow you will see that you can export both FS2004 scenery and aircraft MDL files.

But before you get too enthusiastic, let me warn you. The aircraft exporting is VERY limited at the moment. For example all animations will still export as tick18 (like they do in the FS2004 scenery MDL). And other more complex aircraft features are also not yet supported.

My first priority is to get the animations working. I think either I will let the user define the FS2004 style animation names in the animation editor (now FSX style names are used there). Or I’ll add some mapping between those two.

So why did I make this very basic exporter available already? Because I am looking for some users who want to help me test it. And based on your feedback and experiences it will be a lot easier to complete this function. So if you want to help test it, just post your feedback on the forum and together we can improve the tool further…

scenProc and tiny autogen buildings

A while ago I already wrote about the dangers of tiny buildings in autogen. The problem with those tiny buildings is that they will prevent other autogen from showing correctly in Annotator as well. Since some users reported such trouble recently, I have decided to automatically filter out buildings that are smaller than 1 meter in length or width now. So scenProc will automatically drop such buildings from now on.

I would also like to remind everybody that it is best to exclude your buildings in the SPLITGRID step. Don’t let them be sliced into small pieces, but only sort them into the right cell. This should prevent many of the small buildings appearing in the first place.

Prepar3D v2 MDL changes

When I released the first update for ModelConverterX that supports the new Prepar3D v2 MDL format, I had already found out two differences in the MDL format:

  • The material definition has been extended with an additional attribute for the ZBias
  • The indices of the triangles are now stored as int instead of short. This basically means that you can have more triangles in a modelpart, because with a short you can’t have an index higher than 65536.

But a few days ago I found out that there are more changed sections in the Prepar3D v2 MDL file. It turned out that the way the mouse rectangles are stored has also changed. So I have now updated ModelConverterX again to support this change as well. You can download the new version tomorrow.

I have tested with most of the models that come with Prepar3D v2 and I haven’t been able to spot other MDL files with unknown sections. But you never know what we will find in the future…

Points in polygons

I have added a new step to scenProc, PLACEPOINTSINPOLYGON. With this step you can place points in polygons. This can be useful if you want to scatter objects in the polygon for example. As arguments the step takes the distance between the points and the amount of randomness you want to use. Below you see two pictures, one without randomness and one with 50% randomness on the position of the points.

pointpoint_rand

Now you might remember that there already was a step called PLACEPOINTINPOLYGON (do you spot the tiny difference in the name?). This step creates one point at the center of a feature. To prevent confusion that step has been renamed to PLACEPOINTATCENTERPOLYGON now.

I Prepar3D the tools

logo-prepar3dThe new Prepar3D v2 was released a few days ago, so it was time for me to update my tools to be more aware of Prepar3D. For Prepar3D v1 it in general worked if you just set the FSX folders to the Prepar3D folders, but with version 2 there are more changes. Therefore Prepar3D v2 is now recognised as a completely seperate platform. For Prepar3D v1 you would still have to use the FSX “mode” of the tools.

The Prepar3D changes affect many of my tools. Below I list the main changes for each of them. All the changes will be available in the development release of tomorrow.

DrawCallMonitor

  • Can show drawcall related information for Prepar3D v2 MDL/BGL files as well now.

FXEditor

  • Prepar3D v2 added to the options as preferred version. When selected the tool will default to the effects folder of Prepar3D v2. To do so it needs to know where Prepar3D v2 is installed, so that has been added to the options as well. When no path has been set yet, the tool will try to load the correct path from the registry.

Library Creator XML

  • Can create Prepar3D v2 library BGL files as well now. It uses the Prepar3D v2 BGLComp for that, so you need to have the Prepar3D v2 SDK installed.
  • The correct path where you installed BGLComp should be recognised automatically based on the registry values.

ModelConverterX

  • Can read and write the Prepar3D v2 MDL format. For writing the Prepar3D v2 XtoMDL and BGLComp tools are needed. The MDL format changes that I am aware of now are supported, but I haven’t tested with very complex models yet. So if you find unsupported elements let me know.
  • Support for the new ZBias material attribute. In the material editor there already was a ZBias attribute, since FS2004 had one. For Prepar3D v2 this value is put in the correct material setting.
  • The correct path where you installed BGLComp and XtoMDL should be recognised automatically based on the registry values.
  • In the Convert and Place Object Wizard you can now select Prepar3D v2 as output version.
  • When exporting to X file you can now select if you want a FS2004, FSX or Prepar3D v2 X file.

scenProc

  • scenProc has not yet been fully updated to support Prepar3D, but if you enter the Prepar3D v1 or Prepar3D v2 folder as the FSX path the auto completion of the different autogen classes will work. Better support will be added later.