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.

YouTube links

After the accidential loss of the FSDeveloper YouTube channel a few months ago, I have uploaded most of the video tutorials related to my tools to a new channel. Today I have tried to update as many links in the posts and pages on this website to point to the new channel. But if you find an old post that still has an invalid link, just let me know by posting a comment or sending an email.

Material color to vertex colors

The latest development release of ModelConverterX adds a new drawcall optimization option for MSFS. It is now also possible to copy the color of the material color to the vertex colors. That allows multiple parts with the different colors to be rendered in one drawcall, if the remainder of their material settings is the same.

This new option is accessible in two places:

  • In the Hierarchy Editor you can right click on a model part to perform this action.
  • In the Drawcall Minimizer in the Material Editor there is a checkbox where you can select that material colors are copied to the vertex colors. If this option is not checked, the material colors will be replaced by textures, as the previous implementation always was.

Hopefully this new feature gives you more options to optimize models for MSFS.

Command line conversion

ModelConverterX is primarily a tool with a graphical user interface, but did already have some command line arguments to load objects or apply batch conversions. These command arguments have now been modified to support easy conversion between formats from the command line as well. This can be useful if you want to integrate ModelConverterX somewhere in your modelling workflow automatically. Check the new chapter in the manual for all details.

Error report file upload error

ftp warning, error vector icon 4806105 Vector Art at Vecteezy

From within ModelConverterX and scenProc you can upload an error report directly to my bug tracker. There is an option to include the file that caused the crash as well. Recently I noticed that most users did not try to upload the file anymore, which makes debugging harder. Today I found out the problem was that uploading failed because the server could not be reached correctly. This will be fixed in the next development release. But please feel free to report this kind of issues in the forum as well, I never use the error report functionality myself, so I never spotted this was not working anymore.

MSFS texture distortion

The latest development release of ModelConverterX contains some new functionality that help you to inspect if your model is likely to have texture distortion issues in MSFS and also allows you to minimize this effect by updating your model. The video tutorial below explains all these functions.

I would also like to mention that the background information chapter of the ModelConverterX manual gives more technical background on why this distortion happens in MSFS. So if you want to understand that I encourage you to read that.

Material changes using the hierarchy editor

In the latest development release of ModelConverterX a new feature has been added to the hierarchy editor. You can now also modify the material of model parts in the hierarchy editor. When you click on the material name you get a list of all materials in the model and can select which one should be applied to the part. If you hold down the control key while selecting a copy of the selected material is made, so that you can change attributes without affecting other parts that use the same material. The video tutorial below shows this new functionality.

Export MSFS scenery package

With the recent changes for scenProc to export to MSFS as well, I have added writing a scenery to a MSFS package to the exporter capabilities. This means that ModelConverterX now also has the same export capability. So if you select “Export scenery” you will be able to export to a MSFS scenery package.

The created package contains a PackageSources folder with the XML and glTF files of your objects and their placement. As well as the PackageDefinitions XML file and a project XML file. This means you can directly compile this package with the MSFS package tool. So this capability can be used to have a quick start with making a package.

If you have just modified a single model, it is probably easier to export it as a glTF file as before and insert the new glTF files in your existing package manually.

For me it is also a bit searching to see which workflow makes most sense for MSFS. So if there are ideas to improve or change the package export, just post your suggestions in the forum.

Exporting to MSFS

The latest development release of scenProc does adds initial support for MSFS. Since the release of MSFS I have been waiting to update scenProc as it was not clear to me what purpose the tool would still have. For example the new autogen format is still largely unsupported by the SDK tools, so making autogen for MSFS is not an option. But over time it become clear that placing objects or exclusion rectangles based on GIS data is still useful when working on a scenery of a larger area. Therefore support for MSFS has now been added. If there are other scenery elements that should be supported or if the functionality of the steps should change just post in the forum with your ideas.

So what has been added in the latest version?

  1. With the ExportMSFS step you can write XML and glTF files in the MSFS scenery package structure. This step will create a basic package that you can directly compile with the package tool. Of course you can also choose to copy the XML and glTF files into your existing packages, that just depends on the workflow you prefer.
  2. With the CreateXMLRectangle step you can make MSFS style XML rectangles. These can for example be used to make exclusions. The ExportMSFS step will write these rectangles to XML output.
  3. With the CreateXMLSimObject step you can place an instance of a SimObject at a certain location. This step works like CreateXMLLibObj, but then for SimObjects. The ExportMSFS step will save the generated placement information to XML file again.

The manual has been updated as well, so all new steps are explained in there as well. I hope this addition to scenProc is useful and if there are more suggestions just let me know.