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

Convert API for use in FS9 ?

Discussion in 'ModelConverterX' started by opaplano, 9/9/09.

  1. opaplano

    opaplano

    Joined:
    23/6/07
    Messages:
    25
    Country:
    us-texas
    I have been experimenting with the Converter program and it seems to work well in creating mdl files which display properly in FSX.

    They do not display at all in FS9 -

    I was under the impression (perhaps mistakenly) that they could be used in FS9.

    Am I missing a step perhaps? :confused:

    I am taking the resulting mdl files and using the Library Creator which came with the Instant Scenery program to create a library of objects which can be placed using the IS program. That works well so far.

    The Library Creator which I have that came with EZ does not work with these converted files however. Perhaps because EZ works in FS9 only.

    I am hoping there is a way to use the converted API to MDL files in FS9.

    Thanks in advance for any suggestions.
  2. GaryGB

    GaryGB

    Joined:
    23/12/05
    Messages:
    1,545
    Country:
    us-illinois
    Hi OPA (...David, I presume ?):

    Sorry I missed that this might be for output to FS2004 in the thread at AVSIM. :eek:

    Arno will likely reply here soon, and his interconversion solution, when fully completed, will no doubt be the best ( he's kinda' busy... getting married soon! ). :p

    http://www.fsdeveloper.com/forum/showthread.php?t=6763


    But I'll briefly mention here some other possible options while ModelConverterX legacy FS2004 MDL output functionality is "still under construction" which might help more in-depth developers working "under the hood" with the 3D models:

    http://www.fsdeveloper.com/forum/showthread.php?t=14591&page=2


    As far as your own goal of getting the MDL file into an FS9 format to re-process into FS9/FSX compatible libraries, I'm wondering if you might try to compile the API into a SCASM-encoded FS2002-FS2004 compatible API macro placement BGL with one of the available API placement utilites (such as Arno's legacy API ObPlacer). :idea:

    http://www.fsdeveloper.com/forum/downloads.php?do=file&id=20


    Then you could decompile (a copy of) that BGL with either Winfried Orthmann's legacy FS2002 SCASM file format decompiler BGLAnalyze version 3.1 ("BGLAna31") at:

    http://library.avsim.net/esearch.php?CatID=fs2002sd&DLID=27375


    ---or use Takuya Murakami's OpenSource "ScDis" version 2.3 at:

    http://sourceforge.net/projects/freesc/

    http://sourceforge.net/projects/freesc/files/



    NOTE: The SCDIS - Graphical User Interface (GUI) v1.1 Beta might be helpful to use with this as well:

    http://www.scenery.org/design_utilities_e.htm



    After decompilation IIRC one gets FS2002 legacy format *.SCA files and *.MDL files which might be then further processed with either EZ Scenery Library Maker (or try Arno's newer Library Creator XML 2.0 here at FSDeveloper):

    http://www.fsdeveloper.com/wiki/index.php?title=Library_Creator_XML_2.0

    http://www.fsdeveloper.com/forum/downloads.php?do=file&id=8


    PS: I often find that using a converted "DXT3" *.BMP texture file format (rather than making an extra copy of the object library just for the use of the FSX DXT5 *.DDS texture format) allows objects placed with XML methods to display equally well in either FS9 or FSX; thus I only need to make 1 object library for XML placement. ;)


    Hope this helps! :)

    GaryGB
    Last edited: 27/2/10
  3. opaplano

    opaplano

    Joined:
    23/6/07
    Messages:
    25
    Country:
    us-texas
    Thanks for the reply Gary -

    Here is a brief update on my experiments so far - nearly 100% success when converting API Macros into the FSX only mdl format. They easily compile into an Object Library but display only in FSX.

    I was not aware that there apparently is a difference in mdl files - some work in both Ver of FS while others work ony in FSX.

    I finally figured out that the conversion process also creates an .X file which can be manually run through the Makemdl program from MS. The success rate doing that has been only about 50% - i.e. Makemdl is only able to succesfully process about 50% of the .X files I have experimented with.

    Those that are are successful can then be compiled into an Object Library and those seem to display equally well in FSX and FS2004.

    Of course I am more interested in a final solution that handles the FS2004 version properly.

    There is no hurry on this - I am just excited about the possibility of being able to convert API files this way.

    And Congrats to Arno and the Bride to be - hope she is as tolerant of our hobby/addiction as my wife (of 54 years) is !! :)

    David "Opa" Marshall
  4. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi David,

    To use the objects in FS2004 you would have to select the option to export as FS2004 MDL file, not as FSX MDL file. When you do that ModelConverterX will use MakeMDL to make the MDL file for you.

    For most objects this should work fine, although some features still need improvement (the X file is primarily written for the FSX export now and some things are different in the FS2004 export). If you have specific feature that do not show up, please let me know.
  5. opaplano

    opaplano

    Joined:
    23/6/07
    Messages:
    25
    Country:
    us-texas
    Thanks Arno -

    I just missed the option to save the output that way - must be getting blind in my old age.

    Just made a couple of quick tests and it seems to work as advertised now.

    Will report back if I uncover anything else which seems odd.
  6. opaplano

    opaplano

    Joined:
    23/6/07
    Messages:
    25
    Country:
    us-texas
    Just ran a few more tests and still get the following error message on some API's I am trying to convert:

    ----
    Running model

    Start! (C:\FS Scenery Work Area\Model Converter\Latest Beta version\OUTPUT\semi_trailer2.x)
    Loading X C:\FS Scenery Work Area\Model Converter\Latest Beta version\OUTPUT\semi_trailer2.x...
    Non Normalized normal encountered in part Part2
    Non Normalized normal encountered in part Part2
    Error!
    Error!
    -----

    If you wish, I can send along the small API collection I am worrking with - perhaps they are defective in some way as only about half of the 7 or so macros in this group will convert properly.
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi David,

    Yes, it would be helpful to have the ones that fail for debugging purposes.
  8. opaplano

    opaplano

    Joined:
    23/6/07
    Messages:
    25
    Country:
    us-texas
    I will attempt to attach it now.

    I have only been able to convert the tractor and trailers 1, 3 and 4 to the FS9 format.

    They all seem to convert properly in the FSX format however.

    I shall be interested to know what, if anything, you are able to discover.

    Attached Files:

    • semi.zip
      File size:
      371.9 KB
      Views:
      172
  9. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Thanks David. It might take a little while before I have time to debug the objects.
  10. opaplano

    opaplano

    Joined:
    23/6/07
    Messages:
    25
    Country:
    us-texas
    Understood Arno - you certainly have other priorities right now.

    When you do get back to it, I have uploaded another API which returns an error message and will not convert. Thought this might be helpful also.

    Attached Files:

  11. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi David,

    OK, I have added it to my bug report as well. Will let you know after testing.
  12. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi David,

    I think I fixed all of your bugs now, the objects are exporting fine here. Tomorrow you will find the fixes in the development release.

    Btw, the last object still gives a MakeMDL crash, but that is due to the "feature" of MakeMDL that very small objects can't be exported with it.
  13. gsnde

    gsnde

    Joined:
    21/3/05
    Messages:
    2,925
    Country:
    germany
    Hi Arno,

    I have a set of 61 API models that all neglected to be converted to FS9 with the error message "Non Normalized normal encountered in part AttachPart3". I have tried with the latest developer release.

    I have emailed you three macros to test.
  14. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi Martin,

    Thanks, got the email and I will use it to test.
  15. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi,

    Thanks, I think I found the issue. Had something to do with the lights on the objects. Should be fixed in the next development release.
  16. gsnde

    gsnde

    Joined:
    21/3/05
    Messages:
    2,925
    Country:
    germany
    Great, Arno. Thank you:)
  17. gsnde

    gsnde

    Joined:
    21/3/05
    Messages:
    2,925
    Country:
    germany
    Arno,

    It is working now for 3 out of 61 objects - much better ;)
    I have just sent you the whole bunch of files so that you can find the root cause.
  18. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Thanks, got them and I will take a look.
  19. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,302
    Country:
    netherlands
    Hi Martin,

    For some of the files it seems to be the length of the file name. If I export to a shorter name for the MDL file they work fine. I have to see how I can work around this (probably internally use a short file name).
  20. gsnde

    gsnde

    Joined:
    21/3/05
    Messages:
    2,925
    Country:
    germany
    Good finding, Arno. Would be great if you could solve it :)

Share This Page