MDL Tweaker

I have just added a new feature to the ModelConverterX development release. It is a MDL Tweaker that you can find in the special tools menu.

Let me first explain how this tweaker differs from loading a MDL into ModelConverterX itself. When you import a MDL into ModelConverterX the object is read and stored in an internal representation. ModelConverterX then works with this internal representation when you make changes. In the end this internal representation is exported again to a MDL file.

The MDL Tweaker works differently, it directly manipulates the binary code of the MDL file, without decoding it to an internal representation first. This means that you can for example make small modifications without loosing animations or other elements that are in the MDL file. But it also means you are more restricted in the kind of manipulations you can make.

So what can this new MDL Tweaker do? At the moment it supports the following tweaks:

  • Change MDL name
  • Change MDL GUID
  • Change radius as stored in the MDL file (this is similar to the function of the RADItor tool I made a while ago)
  • Change the bounding box values of the MDL
  • Add a custom shadow model

Below you see a screenshot of the form. After you have made the changes you want, you need to click Save MDL to saves the changes to disk. When you click the Insert custom shadow model button you will get a file selection dialogue where you can select the MDL file that should be used for the shadow model.

I would like to stress that at this moment the tweaker only works for FSX MDL files. I still need to test and adapt it to work with FS2004 MDL files as well. Also at the moment the tool might not be super robust yet, I am still working on that as well.

One thought on “MDL Tweaker

  1. eightmileshigh says:

    Hi Arno,

    Thanks for adding this wonderful feature. I am having a small problem seeing my custom shadows in FSX.

    I have made a scenery object and a custom shadow model:

    http://fsfiles.org/flightsimshots/images/571blanik_shadows.jpg

    I can insert the custom shadow model with MDL Tweaker, no problem. If I load the same .mdl into ModelConverterX it displays correctly with the custom shadow. But when I use LibraryCreatorXML to compile the .mdl file in a larger .bgl (which contains several models) I get the following error:

    7:28 PM BGLCommp Information INTERNAL COMPILER ERROR: #C2014: Failed to load model data in file: C:\gmax\gamepacks\FSX_GmaxGamePack\New folder\YBLA-Blanik.MDL
    7:28 PM BGLCommp Information INTERNAL COMPILER ERROR: #C2149: Failed to load model data! Does the file exist?
    7:28 PM BGLCommp Information INTERNAL COMPILER ERROR: #C2340: Failed to finalize MODEL_DATA!
    7:28 PM BGLCommp Information INTERNAL COMPILER ERROR: #C2032: XML Parse Error! Element tree follows:
    7:28 PM BGLCommp Information ERROR:
    7:28 PM BGLCommp Information ERROR:
    7:28 PM BGLCommp Information ERROR:
    7:28 PM BGLCommp Information INTERNAL COMPILER ERROR: #C2024: Failed to process closing element tag
    near line 7!
    7:28 PM BGLCommp Information INTERNAL COMPILER ERROR: #C2607: Compilation errors detected, compilation failed!

    This happens when I use the .mdl I saved from MDL tweaker. If I export to .mdl format the .bgl will compile but I lose the custom shadow.

    I’ve overlooked something obvious here haven’t I

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.