1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Importing FS2004 scenery object

Discussion in 'ModelConverterX' started by arno, 17/5/09.

  1. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,496
    Country:
    netherlands
    Hi,

    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.
  2. Jeffrey Stähli

    Jeffrey Stähli

    Joined:
    8/8/04
    Messages:
    131
    Country:
    switzerland
    Hey Arno

    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...)?

    Regards,
    Jeff
  3. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,496
    Country:
    netherlands
    Hi Jeff,

    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.
  4. robystar

    robystar

    Joined:
    4/10/06
    Messages:
    3,125
    Hi,

    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.TextureList2TextureList(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(Object sender, DoWorkEventArgs e)
    bij System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    bij System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


    ************** Geladen assembly's **************
    mscorlib
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.3074 (QFE.050727-3000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    ModelConverterX
    Assembly-versie: 1.0.0.0
    Win32-versie: 1.1.0.0

    Does that perhaps have to do with the first LOD being 0 ?
  5. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,496
    Country:
    netherlands
    Hi,

    Can you send me the file for debugging? It looks like there is something in the texture names that ModelConverterX does not like.
  6. robystar

    robystar

    Joined:
    4/10/06
    Messages:
    3,125
    Coming up.

    Rob
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,496
    Country:
    netherlands
    Hi,

    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.
  8. robystar

    robystar

    Joined:
    4/10/06
    Messages:
    3,125
    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?
  9. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,496
    Country:
    netherlands
    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.
  10. robystar

    robystar

    Joined:
    4/10/06
    Messages:
    3,125
    Hi Arno,

    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 ?

    Roby
  11. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,496
    Country:
    netherlands
    Hi,

    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 :).

Share This Page