PDA

View Full Version : Convert API for use in FS9 ?


opaplano
08 Sep 2009, 21:15
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.

GaryGB
09 Sep 2009, 17:14
Hi OPA (...David, I presume ?):

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

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

opaplano
09 Sep 2009, 20:25
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

arno
13 Sep 2009, 08:18
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.

opaplano
13 Sep 2009, 09:02
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.

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.

opaplano
13 Sep 2009, 09:43
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.

arno
13 Sep 2009, 09:59
Hi David,

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

opaplano
13 Sep 2009, 10:18
Hi David,

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

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.

arno
13 Sep 2009, 12:00
Thanks David. It might take a little while before I have time to debug the objects.

opaplano
26 Sep 2009, 20:59
Thanks David. It might take a little while before I have time to debug the objects.

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.

arno
27 Sep 2009, 03:18
Hi David,

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

arno
28 Sep 2009, 16:17
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.

gsnde
24 Jan 2010, 16:49
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.

arno
25 Jan 2010, 14:55
Hi Martin,

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

arno
25 Jan 2010, 16:28
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.

gsnde
26 Jan 2010, 00:13
Great, Arno. Thank you:)

gsnde
31 Jan 2010, 15:54
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.

arno
01 Feb 2010, 14:40
Thanks, got them and I will take a look.

arno
02 Feb 2010, 15:51
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).

gsnde
02 Feb 2010, 16:26
Good finding, Arno. Would be great if you could solve it :)

arno
03 Feb 2010, 15:26
Hi Martin,

I have build in a fix for the long filenames (you can still use them, but it won't stop MakeMDL from working anymore).

I tried with some of your objects and they seem to work now. Hope the rest also compiles fine now.

gsnde
03 Feb 2010, 16:12
Thanks a lot,Arno. Is it already in the latest downloadable build?

arno
04 Feb 2010, 13:20
Now it is, the development release is made at 2:00 every night (European time).

Pyscen
04 Feb 2010, 18:00
Now it is, the development release is made at 2:00 every night (European time).

That means 10:00pm est/9:00pm cst in the US

gsnde
04 Feb 2010, 18:15
Arno,

It does indeed convert all macros now. I have then combined the macros with LibraryCreatorXML and have tested it with Instant Scenery in FS9.

The objects are all on their side with one half buried in the ground :eek: Should I send you the BGL?

tgibson
04 Feb 2010, 19:42
Of course Instant Scenery can fix both of those, but I understand how you might not want them to be that way. :)

But it might be the way they were designed???

gsnde
05 Feb 2010, 01:48
No, converted to FSX they are just plain boring upside down :)

arno
05 Feb 2010, 14:21
Hi Martin,

I also see it here for the objects I tested (I did not try to load the MDL again before). Probably a mistake in the X file, let me take a look.

arno
05 Feb 2010, 14:30
Hi Martin,

Without any attached effects it seems to work fine, so I guess it is an issue with them. I'll take a closer look.

gsnde
05 Feb 2010, 14:33
Thanks, Arno :)

arno
05 Feb 2010, 15:09
Hi Martin,

I think I have found it. Will be in the development release of tomorrow.

gsnde
05 Feb 2010, 15:18
Will feedback tomorrow then. Thank you, Arno!

gsnde
06 Feb 2010, 17:58
Hi Arno,

much better, but...


Some (~10 of 63) models do not compile correctly for FS9. Few or many parts of the model are missing. I can not see a rule.
All animations (rotation of radar or fan) are gone.
I believe that the lights do not show (I say believe because I just realize this and don't want to reboot into flightsim to check) :rolleyes:

I made a compile for FSX to see if this is still okay, and yes - 100% perfect. All animations there, no parts missing.

I have send you the api macros.

arno
09 Feb 2010, 14:28
Hi Martin,


Some (~10 of 63) models do not compile correctly for FS9. Few or many parts of the model are missing. I can not see a rule.
All animations (rotation of radar or fan) are gone.
I believe that the lights do not show (I say believe because I just realize this and don't want to reboot into flightsim to check) :rolleyes:


I'll have a look at those with missing parts, that should not happen.

Exporting animations is currently not supported for FS2004 MDL files. I still have to see how animations are defined in the X file for FS2004. That is a FSX only feature at the moment.

For the lights, I think they should work. Did you copy the effect files to the effects folder? Else I would have to check if the attachpoints are working OK for FS2004 export.