View Full Version : Importing FS2004 scenery object
I have improved the FS2004 MDL reader a bit more. I solved some problems with reading the transformations that caused crashes when loading some of the default library BGL files.
Now they load fine, but I noticed that some objects show as empty. This is because these have an empty LOD as their first LOD. Currently ModelConverterX can not yet read the LOD structure from these files. I think I might try to read the highest LOD only for the moment, or find another way to address this.
30 Jun 2009, 10:24
Nice progress with your Tool! Thanks alot.
Did you already solve the problem with LODs and FS9 mdls? Or more generally, variable-dependent display of objects (LOD is checked by IfVarVSize commands if I remember correctly...)?
No, that is still on the todo list. I have some ideas already on how to implement it, but I did not yet start with trying to implement it.
As you said I need to find a way to deal with conditional display of (parts) of the code in general, the LOD is just an example of that.
11 Jul 2009, 02:44
I still experience some problems with importing FS9 scenery objects (made with FSDS3).
I get the following error (sorry it is in Dutch but that is Arno's doing):
System.FormatException: De indeling van de invoertekenreeks is onjuist.
bij System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
bij System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
bij System.Convert.ToInt32(String value)
bij ModelConverterX.SCASMReader.TextureList2TextureLis t(SCASMCommand sca)
bij ModelConverterX.SCASMReader.Generate3DModel(List`1 cmdList, Dictionary`2 labelDict)
bij ModelConverterX.MDL9Reader.ReadMDL(Int64 len)
bij ModelConverterX.MDL9Reader.Read(String filename)
bij ModelConverterX.MDLReader.Read(String filename)
bij ModelConverterX.ObjectReader.read(String fileName)
bij ModelConverterX.MainWindow.bwImporter_DoWork(Objec t sender, DoWorkEventArgs e)
bij System.ComponentModel.BackgroundWorker.OnDoWork(Do WorkEventArgs e)
bij System.ComponentModel.BackgroundWorker.WorkerThrea dStart(Object argument)
************** Geladen assembly's **************
Win32-versie: 2.0.50727.3074 (QFE.050727-3000)
Does that perhaps have to do with the first LOD being 0 ?
Can you send me the file for debugging? It looks like there is something in the texture names that ModelConverterX does not like.
11 Jul 2009, 04:52
Thanks. I found the bug, it was because one of the textures used on the model has a space in the name. I have fixed the bug, so in tomorrow's development build it will be solved.
11 Jul 2009, 07:06
It is getting monotonous, but, once again: thanks, it is much appreciated.
Do you mean to say that the model can not be rendered by ModelconverterX just because one of the textures has a space between the two names that describe it?
Yes, the filename of one of the textures has a space in it, that was the problem. Because of this, while parsing the code of the object the arguments mixed up and that caused the crash.
12 Jul 2009, 12:02
I can confirm it works now,
Had some trouble getting it to work until I found out I still had the country settings to the Netherlands. Maybe you could put it in big fat capital letters in the Wiki ?
I thought the tool automatically checked if the decimal character was set OK, if not you will get an error message in the event log that tells you so. But I might have to check if that still works as it should :).
vBulletin® v3.8.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.