PDA

View Full Version : ModelConverterX alpha 11 release


arno
23 Mar 2008, 13:20
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 (http://www.fsdeveloper.com/wiki/index.php?title=ModelConverterX) on the Wiki, that should also help users more.

gsnde
23 Mar 2008, 16:47
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 :o)

I get this error on opening the API:

An error occurred during loading the selected file
Nicht negative Zahl erforderlich. --> Non negative number required.
Parametername: Count
...

arno
24 Mar 2008, 07:16
Hi Martin,

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

arno
24 Mar 2008, 09:10
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:


Added some more commands, so that they are read correctly
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.

BASys
24 Mar 2008, 09:44
Cheers Arno

gsnde
24 Mar 2008, 10:57
Thank you, Arno

romgun
09 Apr 2008, 12:08
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".....

arno
09 Apr 2008, 14:44
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 :).

pierrot1951
12 Apr 2008, 01:58
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

arno
12 Apr 2008, 03:53
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.

adr179
05 May 2008, 18:34
:) I converted some quite complicated api's, mostly static aircraft, without a glitch.

THANK YOU Arno!

sonhospa
07 May 2008, 06:36
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...

arno
08 May 2008, 16:46
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.

sonhospa
08 May 2008, 18:42
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

arno
09 May 2008, 12:33
Hi,

Which makes a lot of sense regarding scalability and flexibility of the macro. Too sad MC doesn't like them :rolleyes:

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

Btw trying the *.mdl samples (from the SceneGenX Library, which is surely not for FSX) results in the same "COM Class" error.

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

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?

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.

sonhospa
09 May 2008, 15:58
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

arno
10 May 2008, 15:24
Hi,

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.

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.

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?

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

sonhospa
11 May 2008, 07:46
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!

arno
11 May 2008, 14:54
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.

arno
16 May 2008, 15:55
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.

sonhospa
17 May 2008, 07:30
Thank you, Arno.

Still I guess I'll have to wait until one of the API/Sca/Scm sources I have available would be supported, since for one or the other reason none of them was converted by MC :(. I'm going to drop an eye here every now and then to see your announcements - the basic idea of the program is still genius!

CU and wish you all the best!
Kind regards

Mick

sruddy
28 May 2008, 16:15
I like the idea of being able to convert mdl's to 3ds but I have tried about 10 different fsx mdl's some I have made some came from bgl analyzer and some from the sdk samples and I have not found one that imports yet on 2 different computers.

Is there a working sample somewhere?

Thanks,
great idea like to see it in action!

Sean

I know RTFM... I Didn't see that I needed to register the dll's!

Sweet, it works!

arno
29 May 2008, 14:50
Glad to hear the manual helped, although I should still finish it. The 3DS export functionality will be in the next release.

arno
30 May 2008, 13:18
New version (http://http://www.fsdeveloper.com/forum/showthread.php?t=10120) is available now.