XtoMDL prerequisites

One common issue when trying to compile objects using XtoMDL in ModelConverterX is that XtoMDL can throw very unclear error messages when the XtoMDL tool is missing one of its prerequisites. For example the FSX XtoMDL needs a very specific DirectX version to the installed and different P3D XtoMDL versions depend on different C++ redistributable package versions. For a user it is often not clear that the error throws is related to such a prerequisites.

In the last development release of ModelConverterX I have made a change. The tool will now check if the right prerequisites are installed before you use XtoMDL and it will give a clear error message (including a download link) in case something is missing. That should make it a lot easier to make sure XtoMDL is working fine.

There is one big catch, on my machine I had all the prerequisites installed already of course. So I was not able to test it well in a situation where things are missing. So if you encounter any weird situations where ModelConverterX reports invalid prerequisites where it shouldn’t or where after installing the prerequisites it still does not work, please let me know.

Improved mipmaps handling

It turned out that for all those years the way ModelConverterX handles the mipmaps of textures was not really correct. So in the last version of ModelConverterX there are a number of changes that improve this. These include:

  • Mipmaps are read correctly from DDS and DXTBMP files, instead of being calculated internally by ModelConverterX.
  • Mipmaps are saved to DDS and DXTBMP files based on the data that was loaded, instead of being calculated by ModelConverterX. This means that if you modified some mip levels that data is not being lost when exporting a texture file from ModelConverterX.
  • The Texture Converter form has a dropdown menu now where you can select which mip level you want to see, that way you can inspect the different levels.
  • And last, but not least, the preview in ModelConverterX uses the mipmap data correctly now when rendering the preview of the object.

The video below also shows most of these changes.

Building Texture Configuration file format change

In the latest development release I have fixed the bug that textures in the 3D building generation have to be square in size. But while making this fix I also broke the backwards compatibility of old BTC files partly. So prevent such issues in the future I have added a new file format that has less backwards compatibility issues, this new format is called BT2.

For now the Building Texture Configuration Editor can read both formats, so you can convert your old configurations by loading them in the editor and then saving them in the new format. I have also made a command line conversion tool that you can use: btc_to_bt2.

Object segmentation and machine learning

I have an early Christmas present for scenProc users, today I have push a new development release of scenProc that contains exciting new features for the texture filter that I have been working on the last months.

About half a year ago I start to explore how I could make the vegetation detection in the texture filter more accurate and easier to use. I found a number of interesting articles about this in the literature and soon it became clear that all of them were using an object based classification, instead of a pixel based classification. And most were also using the Support Vector Machine (SVM) machine learning algorithm for the actual classification. So I have been working on adding these two features to scenProc as well and from the testing and experimentation I have done until now I think this will indeed make detection of features in imagery easier.

Below is a video tutorial I made about these new features. I would also mention the sample that is provided in section 6.3.5 of the manual. That should be a good starting point to start experimenting for your own project. And if you have questions or suggestions on how to improve this functionality, feel free to post them on the scenProc forum at FSDeveloper.com.

Texture filter configuration file format changed

The latest development release of scenProc adds a new file format to export the texture filter configuration file to. This new format is called the TF2 format and will replace the TFC format in the future. For now scenProc will support both formats, but I have some changes in development that will give backwards compatibility issues with the old TFC format. That is why this new format has been added now.

As I know developing a texture filter configuration file for complex feature detection can take a lot of time, it is important that developers can easily convert their existing configuration to the new format. There are two ways to do this:

  1. You can open the TFC file in the texture filter editor and then save it in the new TF2 format.
  2. You can use the tfc_to_tf2 command line conversion tool.

Once I have released the features in development now that will break the backwards compatibility option 2 will be the only way to convert your existing work.

Processing scenProc scripts in batch

The scenProcBatchRunner tool has been expanded in the latest development release of scenProc. With this tool you can run your scenProc scripts in a batch file, passing different variables to each run of the same script. By using multiple scenProcWorkers you can also speed up the processing of your scripts. And the new Workflow Feeder mode allows you to setup a entire workflow for your project and easily run that over a big area. The video tutorial below explains this all in more detail.


Creating photoreal scenery with scenProc

With the latest development release of scenProc it is possible to create photoreal scenery BGL files directly from scenProc. In your script you define which raster and vector data is used to create the photoreal. In a texture filter configuration file you define how the raster data should be processed before it is handled to resample for the BGL creation. The process also allows you to create watermasks, blendmasks, night or seasonal variants. The video tutorial below gives an overview of the possibilities.

scenProc improvements

The latest development release of scenProc contains a number of interesting improvements.

  1. The available steps for the texture filter have been expanded to include steps to calculate the Normalized Difference Water Index (NDWI), Urban Water Index (UWI) and Urban Shadow Index (USI). With those additional steps it becomes easier to detect water from images as well. Sections 6.3.3 and 6.3.4 of the manual show example scripts using these new steps.
  2. The ExportGDAL step can now also call a texture configuration file. That way you can run a texture filter on the raster data before exporting it to disk. This would for example allow you to export the watermask that you have detected with the new texture filter steps described above to a GeoTIFF file and use it in other applications.
  3. I have unlocked two additional features of scenProc that were previously only available to selected projects. But as these features are more complex they deserve their own blog post with a video tutorial. So I will upload those ones the video tutorials are done.

I have another interesting feature in development. I am currently experimenting with using machine learning in the feature detection process. Hopefully that will make the results even better and hopefully also easier to adapt a script for different input images. But as I am still learning how to do this, I can’t give an estimation when this feature will be ready.

XtoMDL special characters

On the FSDeveloper forum there are regularly questions about why XtoMDL does not compile a certain object. XtoMDL then usually throws a bunch of not so clear errors, as shown in the picture below. One of the common causes for such errors are special characters.

Let me start by saying that what I call special characters here, characters like é or ç, are very common characters to use in many languages. So it might well be that your Windows username contains some special characters or something like that. But XtoMDL is very picky and does not like them. I have analyzed which situations give issues:

  1. If you use special characters in the model name or in texture names, they are lost on export to the MDL file. Therefore FS will also not render the texture correctly. There is no error from XtoMDL in this case and a MDL file is still created.
  2. If you use a special character in the filename of the MDL file there is no problem, this is allowed and works fine.
  3. If you export the MDL to a folder that contains a special character than XtoMDL throws the error shown in the image above is given, no MDL file is created in this case. You should thus make sure that you always export to a location where the path contains no special characters. That means if your Windows username has some of these characters that you should not export to your desktop or places like that.

The latest development release of ModelConverterX also helps you with the special characters. For situation 1 described above a warning message will be shown in the log that informs you that information will be lost on export. For situation 3 ModelConverterX writes a clear error message in the event log and stops the export. So this way you don’t get the unclear XtoMDL error anymore, but a clear error message that tells you want you need to change.