• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Export as mdl fails, export as .x file OK

Messages
310
Country
us-washington
Hi again Arno!

A frustrating problem with a model using both the latest development release and an older 'it always works' version;

My latest revision of an older model imports fine into MCX (using .jpg textures), but will not export as .mdl, or .bgl. I get a zero bit file as the result. It will however export as a .x file, and that file can be imported successfully back into MCX. It just will not export as .mdl or bgl.

The model is more complex now, but it's not the most complex one I've done. Twenty plus draw calls and 18,000 vertices.

I tried hiding parts of the model bit in Sketchup, then exporting with 'export hidden geometry' unchecked. When I finally had most all the model hidden I got a successful .mdl export, however even a very simple hull structure would not export.

As a check, another more complex model exported fine with the latest development release. And the original of this model exported properly.

I'm not sure what to try next! It seems like it must be something with the model, but I've checked everything I can think of! :)

Any suggestions from you or others will be immensely appreciated. :)

Larry



Here's an error log from one text where I successfully imported a .x file having successfully exported it from the Sketchup generated .dae file.

4:10 PM XReader Information Starting reading of file C:\Users\Larry\Desktop\temp textures\hiyu test as x.x
4:10 PM XReader Information Finished reading objects
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_3.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_side_30.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_hiyu_top.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_inner_side.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_end_37.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_2.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_tunnel_sides.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_0.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_1.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_railing.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_radar_base.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_crane_and_boat.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_life_raft2.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_cables1_28.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_ferry_horn.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_antenna.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_side_34.dds
4:10 PM ObjectRenderer Information Loaded texture: C:\Users\Larry\Desktop\temp textures\hiyu test_life_ring1.dds
4:10 PM MDLXWriter Information Starting writing of file C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
4:10 PM MDLXReader Information Starting reading of file C:\Users\Larry\Desktop\temp textures\hiyu test.mdl
4:10 PM MDLXReader Information Finished reading objects
4:10 PM XWriter Information Starting writing of file C:\Users\Larry\Desktop\temp textures\hiyu test.x
4:10 PM XWriter Information Finished writing of file C:\Users\Larry\Desktop\temp textures\hiyu test.x
4:10 PM XtoMDL Information OutputFile: C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
4:10 PM XtoMDL Information Output file after modification: C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
4:10 PM XtoMDL Information Creating output MDL file: C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
4:10 PM XtoMDL Information error : Error loading .X file: (C:\Users\Larry\Desktop\temp textures\hiyu test.x). Is it a valid FLIGHT SIMULATOR '.X' file?
4:10 PM XtoMDL Information (0): error : XToMdl.exe Unhandled Application Exception
4:10 PM XtoMDL Information (0): error : Error in the application.
4:10 PM XtoMDL Information (0): error : -2005531760 (Unknown)
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XFileLoader.LoadFromModelFile(ModelFile FileInfo)
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.ModelFile.LoadFromXFile()
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.LoadAllFileData()
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.Process(ModelFile[] InputFiles, Hashtable[] AnimationLinkage, String[] AnimationFileRef, XPartDict PartDictionary)
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.ProcessInputs()
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.RealMain(String[] args)
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.Main(String[] args)
4:10 PM XtoMDL Information (0): error :
4:10 PM XtoMDL Information (0): error : Error in the application.
4:10 PM XtoMDL Information (0): error :
4:10 PM XtoMDL Information (0): error : Stack Trace:
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XFileLoader.LoadFromModelFile(ModelFile FileInfo)
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.ModelFile.LoadFromXFile()
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.LoadAllFileData()
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.Process(ModelFile[] InputFiles, Hashtable[] AnimationLinkage, String[] AnimationFileRef, XPartDict PartDictionary)
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.ProcessInputs()
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.RealMain(String[] args)
4:10 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.Main(String[] args)
4:10 PM MDLXWriter Information Finished writing of file C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
The very first error indicates that the .x file isn't a valid FSX format:
Code:
Error loading .X file: (C:\Users\Larry\Desktop\temp textures\hiyu test.x). Is it a valid FLIGHT SIMULATOR '.X' file?
 

tgibson

Resource contributor
Messages
11,327
Country
us-california
Can you have spaces in the X file name? It's best to avoid them in the FS2004 compile process, and perhaps FSX is similar.
 
Messages
310
Country
us-washington
The very first error indicates that the .x file isn't a valid FSX format:
Code:
Error loading .X file: (C:\Users\Larry\Desktop\temp textures\hiyu test.x). Is it a valid FLIGHT SIMULATOR '.X' file?

Thanks folks,

I normally do not use spaces in the file names, but to check, I just tried exporting an older model with and without spaces in the filename. Both exports worked.

I then used MCX to export that older model as a .x file (e.g. boat.x). I imported that file back into MCX, and successfully exported it as a .mdl file. In the past, if I’m watching my export file folder during export, MCX first generates a .x file (or appears to), which then disappears as the desired file format is created. So I’m not sure about the significance of the error message regarding .x files not being an fsx file. Interestingly, in the MCX file export file type drop down box, .x files are listed as “FSX object X file” or something like that.

Edited to add an part of an error log from a test of exporting the 'bad' model from MCX as a .mdl file:

3:20 PM MDLXWriter Information Starting writing of file C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
3:20 PM XWriter Information Starting writing of file C:\Users\Larry\Desktop\temp textures\hiyu test.x
3:20 PM XWriter Information Finished writing of file C:\Users\Larry\Desktop\temp textures\hiyu test.x
3:20 PM XtoMDL Information OutputFile: C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
3:20 PM XtoMDL Information Output file after modification: C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
3:20 PM XtoMDL Information Creating output MDL file: C:\Users\Larry\Desktop\temp textures\hiyu test.MDL
3:20 PM XtoMDL Information error : Error loading .X file: (C:\Users\Larry\Desktop\temp textures\hiyu test.x). Is it a valid FLIGHT SIMULATOR '.X' file?
3:20 PM XtoMDL Information (0): error : XToMdl.exe Unhandled Application Exception
3:20 PM XtoMDL Information (0): error : Error in the application.
3:20 PM XtoMDL Information (0): error : -2005531760 (Unknown)
3:20 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XFileLoader.LoadFromModelFile(ModelFile FileInfo)
3:20 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.ModelFile.LoadFromXFile()
3:20 PM XtoMDL Information (0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.LoadAllFileData()
3:20 PM XtoMDL
etc
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi,

Something in the x file is wrong, but most likely it is not your problem. Most of the times it is a bug in modelconverterx that causes this.

Can you send me one of the models that gives this problem? Then I can try to reproduce it.
 
Messages
310
Country
us-washington
Hi,

Something in the x file is wrong, but most likely it is not your problem. Most of the times it is a bug in modelconverterx that causes this.

Can you send me one of the models that gives this problem? Then I can try to reproduce it.

Hi Arno,

Thank you *so* much! This was driving me crazy, trying to figure out just why only this model was causing problems. :)

When I get home I'll send you the model in question with .jpg textures which will not export, and if it's not too large I'll separately send the same one with .psd textures that will not load into MCX properly.

Larry
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi,

Thanks, got your email and will take a look.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi Larry,

I have found and fixed the problem. So the next development release should work (will be available in about 1 hour from now).

The problem was that SketchUp exported some texture coordinates as NaN (not a number) and XtoMDL does not like that.
 
Messages
310
Country
us-washington
Hi Larry,

I have found and fixed the problem. So the next development release should work (will be available in about 1 hour from now).

The problem was that SketchUp exported some texture coordinates as NaN (not a number) and XtoMDL does not like that.

Thanks so much Arno! Wonderful news and thanks for your work on such an abscure problem. I wonder what the offending texture or part of the model was causing the problem.

Larry
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
It's hard to see in the collada file which part of the model it was. I didn't expect sketchup would generate NaN values, so in that case it is always good to make the tool more robust.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Are you using the development release version?
 
Top