PDA

View Full Version : ModelConverterX alpha 09 release


arno
10 Feb 2008, 11:51
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

BASys
10 Feb 2008, 19:11
Hi Folks

Cheers Arno
Will play tomorrow.

ATB
Paul

gsnde
12 Feb 2008, 02:41
Thank you, Arno

KlausKlausen
16 Feb 2008, 14:50
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

arno
18 Feb 2008, 16:00
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.

BASys
18 Feb 2008, 16:48
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

arno
18 Feb 2008, 16:55
Hi Klaus,

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

arno
18 Feb 2008, 16:56
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.

KlausKlausen
22 Feb 2008, 13:21
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

gsnde
23 Feb 2008, 17:01
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

arno
24 Feb 2008, 06:06
Hi Klaus,

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

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.

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.

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.

arno
24 Feb 2008, 06:46
Hi Martin,

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.

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

gsnde
24 Feb 2008, 07:03
Thank you, Arno :)

KlausKlausen
24 Feb 2008, 10:09
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

arno
24 Feb 2008, 10:50
A new version is available, see this thread (http://www.fsdeveloper.com/forum/showthread.php?t=8852).

@Klaus, I made a new thread (http://www.fsdeveloper.com/forum/showthread.php?t=8853) for your condition questions.