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

Strange SlimDX Error when exporting to .mdl

Messages
49
Hi all, I'm still fairly new at scenery design. I built a simple hangar as a practice project in 3DS Max 2018. Using the latest P3Dv4 SDK tools. Also using latest MCX development version (1.4.0.0 3ca5b2a4 DEV 6/13/2018).

I was able to import the .X file from 3DS into MCX fine other than the minor (I think) import errors below. I'm able to view the model and all the textures are there and it looks fine. However, when I go to export it throws an odd SlimDX error. Can't seem to figure it out. Anyone have any thoughts on what I'm doing wrong/missing?

.X Import errors when importing to MCX:

8:00 PM XReader Warning Unsupported X command OverrideBoundingBox
8:00 PM XReader Warning Unsupported X command OverrideRadius
8:00 PM XReader Warning Could not find linked animation for Hangar_Body
8:00 PM XReader Warning Could not find linked animation for Roof_Panel

Export from MCX to P3Dv4 .MDL errors:

8:01 PM XtoMDL Error (0): error :
8:01 PM XtoMDL Error (0): error : ----------------------------------------------------------------
8:01 PM XtoMDL Error (0): error :
8:01 PM XtoMDL Error (0): error : XToMdl.exe Unhandled Application Exception
8:01 PM XtoMDL Error (0): error :
8:01 PM XtoMDL Error (0): error : System.BadImageFormatException
8:01 PM XtoMDL Error (0): error :
8:01 PM XtoMDL Error (0): error : Could not load file or assembly 'SlimDX, Version=2.0.9.42, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
8:01 PM XtoMDL Error (0): error :
8:01 PM XtoMDL Error (0): error : ----------------------------------------------------------------
8:01 PM XtoMDL Error (0): error :
8:01 PM XtoMDL Error (0): error : Stack Trace:
8:01 PM XtoMDL Error (0): error :
8:01 PM XtoMDL Error (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.ProcessInputs()
8:01 PM XtoMDL Error (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.RealMain(String[] args)
8:01 PM XtoMDL Error (0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.Main(String[] args)
 
Thanks Arno, didn't see that page. So I had C++ 2013 installed but not 2015. I tried to install it but it complained about 2017 being installed and canceled the install. Found a workaround where you run the command line "vc_redist.x64.exe /uninstall" and execute a repair and that will install it, which it did. Still, I get the same error :/ Any other thoughts?
 
Are you also using a 64 bit xtomdl? Else you need the 32 bit runtime files.
 
Thanks. I pulled the xtomdl from the Lockheed Martin SDK folder in "Program Files" so it *should* be the 64-bit version but is there a way to confirm? Didn't see it in the xtomdl.exe file properties.
 
If it helps any, I'm using the LM 64-bit SDK version 4.3.29.25520. Tried importing an older .X file I know I was able to export a while back and get the same error when trying to export to .mdl. Can't seem to get around this error :/
 
Hello...
Other searches revealed, such as this can a number of things... such as special characters within the filename or path... or You are missing needed files.. such as MSXML 4.0 SP or MSXML 6.0, one of them not both.
 
Thanks Doug for helping. I tried installing MSXML 6.0 but still no luck. The only special characters in the path are an underscore and a hypen. Any other thoughts?
 
What's interesting is that it refers to a "bad image format". Running xtomdl separately results in the same message. The textures associated with the model are just 24 bit BMP's. Maybe they need to be something else?
 
Tried MCX on another machine and get the same error. Is exporting a 3DS 2018 .X file to P3Dv4 mdl file in MCX working for anyone?
 
What do you mean by... "tried installing MSXML 6.0 but still no luck."? Also, a bad image format?

What did your computer do when you installed MSXML 6.0? Did it error out? what? I know you said the texture was a BMP, but have you tried using totally different model to compile through MCX? According to your original message this model has animated parts? is this true? The next thing, maybe, is for you to share this model here if you can...

How are you exporting this file from 3DS 2018 .X file to P3Dv4 model... Have you tried something simpler to export? Like a simple box with textures on it?
 
Sorry, I guess I wasn't clear. I installed MSXML. No errors there. But when I went to convert in MCX I got the same MCX error (well, really a XtoMDL error).

In 3DS I'm simply going to the Export as a P3Dv4 .X model. It prompts me there's a mix of FS9 and FSX materials and I just export as FSX. I stick with the default P3D export options, click OK, and the .X is exported without any errors I can see. I then import that .X file into MCX. It pulls it in, showing all the textures. I then go to Export Object, select P3D v4 MDL, and Save. That's when I get the error.

I have tried two different models. One I know used to convert. The other is a new one. I have not tried a simple model. I'll try that next and see what happens. There are no animated parts in my model. Not sure why it's thinking there are.

It's likely something I've done wrong (or misconfigured), but for the life of me I can't seem to figure out what it is.
 
The problem has nothing to do with your x file, xtomdl is missing some depandancy on your system.
 
Seems like it. Because I just tried the same thing with a simple box created in 3DS. No textures. Imported into MCX, tried to export, and same XtoMDL error. I'll keep looking to find what dependency is missing and report back if I figure it out.
 
In the meantime I was able to successfully export the model directly from the P3D tools > Export and LOD menu in 3DS thus bypassing the 3DS export to .X feature altogether. Once the model was exported I was able to import it successfully with all textures into MCX.

Initially when I tried to export through the P3D tools menu I did get an XtoMDL error, stating it couldn't find the modeldef.xml file in the "program files/autodesk/bin folder", which didn't exist. I created the folder and copied the modeldef.xml file into it and all went well after that. Makes me wonder if the MCX error is related somehow.
 
Check and see if any and all of these are installed: Microsoft Visual C+ 2008, 2010, 2015, 2017. The x86 and / or x64. One them could be needed.
 
I was only missing the 2015 x64 one on my desktop. They were all there on my laptop. Regardless, I uninstalled all VC distributables on my desktop and reinstalled both x86 and x64 from 2005 all the way up to 2017. Still the same result.

It was worth a try.
 
What do you have MCX (within Options) pointed to, which of the XtoMdl? Also, could you get a screen shot of your model filename along with the pathname.
 
Thanks. I have MCX pointed to a D:\SDKFiles folder. To that I copied the XtoMDL, and other necessary files from the SDK. That way when the SDK is updated and the folders (version numbers) change I don't have to go and remap everything. I just copy the needed files from the SDK to the SDKFiles folder. Not sure what the standard practice is for others, but this seems to make the most sense to me unless, obviously, it creates problems for some reason.

Screenshot attached. You can see the file name and paths at the bottom.

FYI, I did try copying everything over to my C:\Temp folder and importing/exporting from there just in case the underscore was the problem, but that didn't do it.

EDIT: Added a screen capture of the export options window of MCX.
 

Attachments

  • capture.PNG
    capture.PNG
    547.9 KB · Views: 460
  • capture2.png
    capture2.png
    99.6 KB · Views: 470
Hello....

The Dropbox folders... where you have the textures at.... there appears to be leading underline ( "_" ) in front of the folders names.

This could cause problems with XtoMdl. Eliminate the _ within the folders names.
 
Back
Top