As I've mentioned on a previous thread in these forums, I received some FS2004 aircraft with missing main wheel animations that I'd like to fix.
I've tried fixing them using ModelConverterX, but while I was able to get the main wheels turning I also noticed that most of the plane's control surfaces are animated incorrectly: I suspect this is because ModelConverterX is really designed for FSX native (and newer) MDL files.
I'm wondering if I may be better off trying to fix the MDL files directly, as that way I'll be able to have fine control and only make changes where they're actually needed, but to do this of course I need to know the format of the MDL files in question.
I've already established that FS2004 aircraft MDL files are RIFF files containing the following:
While you do have documentation on the BGL file format it seems like it's completely different from what FS2004 aircraft MDLs use: for example your documentation suggests that all BGL data starts with a header beginning with the "magic number" bytes 01 02 92 19 from FS2004 onwards, but (given that FS2004 aircraft are MDL8 like FS2002 aircraft) I wonder if the BGL data is in an older FS2002 format. In the models I've seen the first bytes after the "block size" DWORD found within the RIFF file's BGL block are the (rather 16-bit looking) 3A 00 38 00 00 00 XX 00 00 00 04 00 8E 00 64 00 39 00 4A 00, where the "XX" is the same as the "radius of object" byte from the MDLH block.
Where can I find information on this different BGL format used by the FS2004 MDL files? Please advise.
(And by the way, what would I need to do to log into the FsDeveloper wiki, in case I wanted to post information like the above there? The login I use for these forums doesn't seem to work there, but I can't find any way to create a wiki account either!)
George
I've tried fixing them using ModelConverterX, but while I was able to get the main wheels turning I also noticed that most of the plane's control surfaces are animated incorrectly: I suspect this is because ModelConverterX is really designed for FSX native (and newer) MDL files.
I'm wondering if I may be better off trying to fix the MDL files directly, as that way I'll be able to have fine control and only make changes where they're actually needed, but to do this of course I need to know the format of the MDL files in question.
I've already established that FS2004 aircraft MDL files are RIFF files containing the following:
- RIFF header: contains "MDL8" (same as FS2004, unlike the "MDL9" found in FS2004 scenery MDLs)
- MDLH block: much as described in the wiki for scenery MDLs, except that the fixed "152" is incremented by the total size of the data records described in the DICT block next.
- DICT block: this seems to list animations referenced within the main BGL block, and is divided into records of 28 bytes as follows:
- Data Type: 1 = FLOAT32, 2 = UINT32, 4 = UINT16, 6 = FLAGS16
- Data Offset: For the first record this is 152, while for subsequent records it is incremented for each record's data size (for example if the first record is a FLOAT32 then the second record's offset will be 156).
- Data Size: This is 2 for UINT16 or FLAGS16 records, or 4 for FLOAT32 or UINT32 records.
- Data GUID: This identifies the parameter in the dictionary, and are listed within ModelConverterX's ASToFra.FSUtils.dll: note though that the final 4 and 12-bytes segments in those GUIDs must be treated as big-endian though!
- I've also noticed some MDL files have GUIDs which are not listed in ASToFra.FSUtils.dll which seem to be used for "custom" animations.
- Custom animations built into models using a MakeMDL.parts.xml file seem to have the GUID {CFCBF645-206F-456C-A86C-0C0FAEC544C9}, while those added by ModelConverterX seem to have {0C30F248-0F3C-43AE-83FA-CD29F790AA3E}.
- In both cases the string describing the custom animation (in Reverse Polish Notation as used in FS2004 XML gauges) is stored in one or more extra records after the main record: these extra records have a Data Type of 0, with the other 24 bytes (replacing the offset, size and GUID) replaced by the string data. padded with \00 bytes as necessary.
- BBOX block: this always seems to contain 36 bytes all equal to \00: maybe this is used in scenery MDL8 (and contains perhaps a centre co-ordinate unlike MDL9 data, explaining why 36 instead of 24 bytes) but not aircraft ones?
- ISFT block: contains "MakeMDL - FS90 (9.00.030612.02)"
- BGL block: presumably this contains the actual 3D modelling data which contains (amongst other things) the animation data that I want to fix!
While you do have documentation on the BGL file format it seems like it's completely different from what FS2004 aircraft MDLs use: for example your documentation suggests that all BGL data starts with a header beginning with the "magic number" bytes 01 02 92 19 from FS2004 onwards, but (given that FS2004 aircraft are MDL8 like FS2002 aircraft) I wonder if the BGL data is in an older FS2002 format. In the models I've seen the first bytes after the "block size" DWORD found within the RIFF file's BGL block are the (rather 16-bit looking) 3A 00 38 00 00 00 XX 00 00 00 04 00 8E 00 64 00 39 00 4A 00, where the "XX" is the same as the "radius of object" byte from the MDLH block.
Where can I find information on this different BGL format used by the FS2004 MDL files? Please advise.
(And by the way, what would I need to do to log into the FsDeveloper wiki, in case I wanted to post information like the above there? The login I use for these forums doesn't seem to work there, but I can't find any way to create a wiki account either!)
George
Last edited:

