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

ModelConverterX alpha 11 release

Discussion in 'ModelConverterX' started by arno, 23/3/08.

Thread Status:
Not open for further replies.
  1. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,251
    Country:
    netherlands
    Here is a new version of ModelConverterX. Compared to the previous version this are the main changes:

    • The SCASM binary commands are now supported. Most important this means that colour in FSDS API macros are now read correctly (and also the textures are no longer read in a dirty way).
    • Fixed a problem with reading in a VertexList with automatic normal calculation.
    • Added an object reader for FSX MDL objects. This might not be very useful for most users, as you want to export to FSX, not import to it.

    In the pipeline for the next version are things like basic animations, direct reading of BGL files and support for lights and lines (can't promise all will be in the next). And I have started on expanding the manual on the Wiki, that should also help users more.
    Last edited: 30/5/08
  2. gsnde

    gsnde

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

    Thank you for the new release and the pre-view on what is coming :)

    Do you still have the API "Practice Arrestor Cables Scenery" that I have sent you recently? If not I resend it to you (I have used up my attachment space and don't find out how to delete the old ones at the moment :eek:)

    I get this error on opening the API:
    Code:
    An error occurred during loading the selected file
    Nicht negative Zahl erforderlich. --> Non negative number required.
    Parametername: Count
    ... 
  3. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    Yes, I still have the macro somewhere. I will test it again and let you know.
  4. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,251
    Country:
    netherlands
    Hi Martin (and others),

    I have found the issue. This error occurred when a not recognised binary command was found. I have fixed it in two ways:

    1. Added some more commands, so that they are read correctly
    2. When a unknown command is now found it will be skipped (including the rest of the binary commands as there is no way to know their length). In this case you will see a warning in the log area.

    I have uploaded this new version to the first post of this thread. If you have already downloaded it, please do so again.
  5. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,239
    Country:
    scotland
    Cheers Arno
  6. gsnde

    gsnde

    Joined:
    21/3/05
    Messages:
    2,715
    Country:
    germany
    Thank you, Arno
  7. romgun

    romgun

    Joined:
    11/1/08
    Messages:
    21
    Country:
    russia
    Thanks, Arno for this converter!

    When i try to convert fsx mdl i have an error (((
    And in material editor (colors options) i see "no link to object".....

    Attached Files:

  8. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    Can you send me the file you had loaded and were trying to save? The error message alone does not tell me so much, although I think this is the first crash I have seen in the exporter :).
  9. pierrot1951

    pierrot1951

    Joined:
    25/6/06
    Messages:
    305
    Country:
    france
    Hello

    I begin to get rather good results, even if some API still fail.
    However, I have often a scale problem in final result.
    Would it be possible to take scale factor in consideration (when known).
    So far, is it possible to manually insert it in the .x code?

    Pierrot - FMEP
  10. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    I already tried to read the scale from the API macro. If you have one that does not work correct, please let me see the SCASM code so I can debug.

    There is also a scale option in ModelConverterX already, which you can use to alter the scale after you imported the object. You find it at the toolbar at the right.
  11. adr179

    adr179

    Joined:
    5/5/06
    Messages:
    257
    Country:
    slovenia
    :) I converted some quite complicated api's, mostly static aircraft, without a glitch.

    THANK YOU Arno!
  12. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
    Loading errors

    Hello,

    trying the Model Converter (cool idea, Arno!) I face only errors with all the test macros, which I took from SBuilder (..\Tools\ASD). Maybe the reason for the errors is plain - I'm using FS9 (which on the Wiki-page is listed red / non-applicable). But from the exporters list in the tool I figured that it should work, since it also exports FS9 mdl, and in addition I had found a post from Jan08 here in which you intended to add FS9 export capability. So I tried...

    The following errors occur on loading:

    1. Loading scm:
    "An error occurred during loading the selected file.
    The given key was not present in the dictionary."

    2. Loading sca (created by SBuilder after placing as well as decompiled with BglAnalyzer):
    "An error occurred during loading the selected file.
    Retrieving the COM class factory for component with CLSID ... failed due to the following error: 8007007e."

    (In case you don't have the sample macros that come with SBuilder, I enclosed the scm, the sca and the jpg.)

    3. Next I tried to import api (sample files from EZ-Scenery\ExtraObjects as well as from SceneGenX):
    "Starting reading of subobject 0
    Ignoring content of mif block
    Reached end of file
    Warning: This is an empty object!
    Finished reading of subobject 0

    Starting reading of subobject 1
    Unsupported command callLibobj in line 39
    Warning: This is an empty object!
    Finished reading of subobject 1
    Finished reading objects"

    So in my case nothing seems to work, I couldn't convert a single object. Is it possible that the tool only imports aircraft models? Or what is wrong with me :-( ???

    Thanks for helping
    Mick


    Arno, in case it's supposed to work for FS9 (as I guessed) then would you please be so kind and note that in the Wiki-page? It's a bit confusing - and seeing no result but a bunch of import errors yet, I'm not even sure that I guessed well...

    Attached Files:

    • wall.zip
      File size:
      23.4 KB
      Views:
      190
    Last edited: 7/5/08
  13. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    The problem with those SBuilder macros is that they relay heavily on user parameters, which ModelConverterX does not support yet. So that means that without those it is not possible to read the object definition. That must be the reason why you have trouble.

    For example, the size of the wall is defined with those parameters. So without them there is no size in the object and therefore nothing to do.
  14. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
    Hi Arno,

    good you're back ;-) and hope you're fine!

    When I check the scm or sca files I think I see what you mean: There are many UVAR values that are obviously set by the assignments done through SBuilder (dimensions, texture etc.). Which makes a lot of sense regarding scalability and flexibility of the macro. Too sad MC doesn't like them :rolleyes: Btw trying the *.mdl samples (from the SceneGenX Library, which is surely not for FSX) results in the same "COM Class" error.

    Checking the APIs from SceneGenX (sample enclosed) and also from the EZLibrary I don't find such Parameters and still face error messages, just different ones as written above... Same reason?

    My basic intention was to "modernize" the available macros to XML and collect them into a library with "Library Creator" (that accepts only mdl). Would that make sense, anyway?

    Kind regards
    Mick

    Attached Files:

  15. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    It is on the wishlist to be implemented, but not with the highest priority at the moment.

    At the moment only FSX style MDL files can be read. FS2004 style scenery MDL files are not yet supported. That is something else that is still on the todo list :).

    Probably not, but if you can give the errors that might help a lot (or I will try to run the sameple once I have some time again). I think the problem with those is that the MoveTo and DrawTo commands are not supported. So after reading the object almost nothing is left.
  16. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
    Hello Arno,

    sorry for blowing up the wishlist :whiteflag Guess it's long enough :(

    After test-running the same apis again, I can confirm your assumption: The running lines in the small window are full of "unsupported command in line..." errors, most of them are "MoveToPt" and "DrawToPt", but also "LineColor" and "EndSurface" are showing up. One funny thing - and the reason why I can't send it as a log - is that it seems to run into a loop (somewhere between lines 200 and 250) until it crashes.

    Does my basic approach of modernizing and converting and collecting the older macros in a library with "Library Creator XML" (accepting only mdl) even make sense to you? Or would there be a better way?

    Thanks again
    Mick
  17. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    Can you send me the API that does that (or is it the sample you already posted)? Could be there is some other command missing in that case and I would like to debug that then.

    Yes that makes sense. It could gain you some extra performance and allows you to use the objects with more modern scenery design tools.
  18. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
    Hi Arno,

    enclosed two of the APIs you wanted to debug (from SceneGenX \ UserAPI). I can't recognize which line(s) start or end these loops, I can only see that around line 250 it goes to around line 290 and keeps going back to approx. line 250 again... slowing down more and more. When I click into the small window (with the text "unsupported command... " etc.) the program goes down...

    With the "modernizing" idea I guess I'd rather wait until you made an official release of your tool - which is still a great idea!

    Attached Files:

  19. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    Thanks, I'll take a look at them. A first look at the sources shows nothing weird. So I will have to run them through the tool in debug mode to see what is going on.
  20. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    I checked the VOR API's, it seems they end in a loop, but actually that is the structure of the API source. If you wait long enough they load fine (although a lot of the commands are not supported at the moment). I'll try to figure out why the reading process is so slow though.
Thread Status:
Not open for further replies.

Share This Page