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

ModelConverterX alpha 09 release

Discussion in 'ModelConverterX' started by arno, 10/2/08.

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

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,304
    Country:
    netherlands
    Here is a new version of ModelConverterX. The following changes have been made:

    • Triangulation stops after too many failed attempts and gives a warning to the user about this
    • Triangulation will not start when a polygon is not planar and will give a warning to the user about this
    • Quotes around texture filenames no longer give trouble
    • Material editor GUI added where the user can specify if a texture has transparency, this will add the correct code in the FSX MDL file to show the transparency
    Last edited: 24/2/08
  2. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,253
    Country:
    scotland
    Hi Folks

    Cheers Arno
    Will play tomorrow.

    ATB
    Paul
  3. gsnde

    gsnde

    Joined:
    21/3/05
    Messages:
    2,930
    Country:
    germany
    Thank you, Arno
  4. KlausKlausen

    KlausKlausen

    Joined:
    27/1/08
    Messages:
    15
    Country:
    germany
    Error detected

    Hi Arno,

    Thank you very much for the latest version. The converter works fine with simple 8-point buildings. However, I tried to convert a somewhat more complex building consisting of 3 blocks of different height and advertising signs, and this is what I got (the source code is incomplete for reasons of debugging):

    Error message in separate window:
    An error occured ...System.Number,. StringToNumber NumerStylesOptions
    SystemNumberParseDouble
    At SystemConvertToDouble ... etc.

    The Modelconverterwindows says "Starting reading ... "but not "Reaching end of file".

    At other occasions, there is an exception error , clicking on "Continue" leads to a red-crossed display window in ModelConverter. Clicking on the window often displays the correct textures.

    I am uploading the source code and hope it will help you debugging.

    Thanks a lot.

    Greetings, Klaus

    Attached Files:

  5. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    A quick look at the source code did not result in any obvious problems. So I will run the sample you provided through the tool here and hopefully I can reproduce the problem then.
  6. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,253
    Country:
    scotland
    Hi Folks

    Arno -
    Getting a fair number of dropped polys
    with the error -
    Warning: Polygon is not planar and will be skipped!
    Previously these were apparently displaying ok in preview mode.

    Please see PMs for some examples.

    HTH
    ATB
    Paul
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    Found the issue, it was because there are some tabs in the file. Will be fixed in the next version.
  8. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    I have changed this code a bit and polygons with 4 vertices will now always be processed, even if they are not planar. Technically that is not a correct polygon and therefore the triangulation algorithm will fail on them. Maybe I need to find a way around this, as the integer points in the old SCASM code often seem to lead to such polygons.
  9. KlausKlausen

    KlausKlausen

    Joined:
    27/1/08
    Messages:
    15
    Country:
    germany
    Tabs and Bitmap switching with seasons

    Hi Arno,

    Thanks a lot. You are right, it is just if the source code contains tabs which will produce error code. Simple solution to remove them.

    I think a good feature to add to the Converter would be the Rotate command (also the rotate part in the TransformCall command does not seem to work by now.)

    For me, the question arises if it is possible to switch to different night textures according to the season (for instance to show Christmas illuminations in winter or in December). While this is easy with scasm, I wonder how it can be done with MacroConverterX. Maybe the code can be added manually to the *.x file - but I have to admit I am not familiar with the x-language and therefor do not know where to start.
    Any help would be greatly appreciated.

    Greetings, Klaus
  10. gsnde

    gsnde

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

    Please have a look at this macro. It loads ok and the preview shows it correctly textured, but when I compile I receive an error message about "x file could not be read - make sure it is a valid..." and the mdl is 0 bytes in size.

    Thank you,
    Martin
    Last edited: 1/4/08
  11. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    I did the TransformCall command already, will take a look at the RotatedCall as well. Of course it only works if you enter a value there, not the % parameters that are passed to the API.

    No, that is not possible. Simply because the FSX MDL format does not support that kind of conditions. It would be possible in the FS2004 MDL format, as we could insert our own conditions there. But the FSX format is more optimized for performance and there we have lost this flexibility.
  12. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

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

    I can confirm that I can reproduce the problem here as well. So let me try to find out where it goes wrong :).
  13. gsnde

    gsnde

    Joined:
    21/3/05
    Messages:
    2,930
    Country:
    germany
    Thank you, Arno :)
  14. KlausKlausen

    KlausKlausen

    Joined:
    27/1/08
    Messages:
    15
    Country:
    germany
    Hi Arno,

    as for the TransformCall( ..., it seems the Converter does transform in x,y,z direction correctly, but does not rotate the transform-called coordinates regardless of the value. Same with RotatedCall( :test 0 0 30 ) for example. Only a minor feature, though.

    So far I have converted several macros, and all seem fine - Converter is doing a great job.

    I don't know whether this is the right place, but how can I insert conditions in *.x files for FS2004 to load certain textures only in winter or at Christmas, for instance?

    Also, is it possible to do a different texture mapping at day and at night (i.e. if the night textures do not have the same proportions and coordinates of the day textures and therefor need different coordinates?)

    Lastly, can one adjust any values in the *.x file to make the sides of a polygon whihc lies in the shadow look somewhat brighter? I think in FSX, those sides look much too dark, whereas the ground is too bright in contrast.

    Best regards,

    Klaus
  15. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,304
    Country:
    netherlands
    A new version is available, see this thread.

    @Klaus, I made a new thread for your condition questions.
    Last edited: 24/2/08
Thread Status:
Not open for further replies.

Share This Page