• 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 P3D XtoMDL problem (x64)

Messages
22
Country
norway
Hello everybody :)

I've just started experimenting with 3ds Max 2012 64bit, and making models for FSX/P3D but I'm encountering an error after exporting to .X

The cmd-windows first error is: "Is this a valid flight simulator ".X" file"

I'm trying to export something as simple as a box with no textures on it (have also tried with textures), but no matter I get that error, and thereafter a 0kb sized MDL file.

How ever, if I try to convert using the FSX SDK, 3ds max 7, XtoMDL it works...

The other funny thing is that if I try to convert the sample Oil Rig from the P3D SDK it works using the P3D XtoMDL :confused:

FYI I have set up my XtoMDL using the wiki and the SendTo-folder, and this is working with the sample.

Anybody have an idea what might be wrong here?
 
Hello sailor! I assume that you are trying to use the 64-bit export module from the P3D SDK?
 
I would belive so..

I downloaded the patch from LM, namely "Prepar3D_Modeling_SDK_1.4.6787.0.zip", cut&paste the content into the original SDK install folder. I see that this has updated every folder in the Modelling SDK. to 18th of april 2013.

The 64bit folder does however not contain the XtoMDL so I am linking to the 3DSM2012 folder for this.

My 3ds Max is pointed to the following location: "E:\Flight Simulator\Utvikling\SDK\Prepar3D SDK\Environment Kit\Modeling SDK\3DSM2012_x64\Plugins"


Anyway it's still pretty wierd that the 3DSM7 from the FSX SDK can make the MDL-file from my exported .X-file..
 
Okay, so in this exiting continuation I have reinstalled the SDK into "E:/Prepar3D_SDK" to avoid these long paths.

I have updated my shortcut and 3DS Max to this location.

still getting the following error when using "SendTo" or dragging and dropping the .X-file over the XtoMDL.

Code:
Found dictionary file: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\bin\modeldef.XML
OutputFile: C:\Users\Bj›rn Helge\Desktop\Gr›nn›ra\Bygninger\modeller\box.MDL
Output file after modification: C:\Users\Bj›rn Helge\Desktop\Gr›nn›ra\Bygninger\modeller\box.MDL
Creating output MDL file: C:\Users\Bj›rn Helge\Desktop\Gr›nn›ra\Bygninger\modeller\box.MDL
error : Error loading .X file: (C:\Users\Bj›rn Helge\Desktop\Gr›nn›ra\Bygninger\modeller\box.x).  Is it a valid FLIGHT SIMULATOR '.X' file?
(0): error : XToMdl.exe Unhandled Application Exception
(0): error : SlimDX.Direct3D9.Direct3D9Exception: D3DXFERR_FILENOTFOUND: File not found (-2005531767)

(0): error :    at Microsoft.FlightSimulator.XToXmlLib.XFileLoader.LoadFromModelFile(ModelFile FileInfo)

(0): error :    at Microsoft.FlightSimulator.XToXmlLib.ModelFile.LoadFromXFile()

(0): error :    at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.LoadAllFileData()

(0): error :    at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.Process(ModelFile[] InputFiles, Hashtable[] AnimationLinkage, String[] AnimationFileRef, XPartDict PartDictionary)

(0): error :    at Microsoft.FlightSimulator.XToMDL.XToMDL.ProcessInputs()

(0): error :    at Microsoft.FlightSimulator.XToMDL.XToMDL.RealMain(String[] args)

(0): error :    at Microsoft.FlightSimulator.XToMDL.XToMDL.Main(String[] args)
(0): error : 
(0): error : D3DXFERR_FILENOTFOUND: File not found (-2005531767)
(0): error : 
(0): error : Stack Trace:
(0): error :    at Microsoft.FlightSimulator.XToXmlLib.XFileLoader.LoadFromModelFile(ModelFile FileInfo)

(0): error :    at Microsoft.FlightSimulator.XToXmlLib.ModelFile.LoadFromXFile()

(0): error :    at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.LoadAllFileData()

(0): error :    at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.Process(ModelFile[] InputFiles, Hashtable[] AnimationLinkage, String[] AnimationFileRef, XPartDict PartDictionary)

(0): error :    at Microsoft.FlightSimulator.XToMDL.XToMDL.ProcessInputs()

(0): error :    at Microsoft.FlightSimulator.XToMDL.XToMDL.RealMain(String[] args)

(0): error :    at Microsoft.FlightSimulator.XToMDL.XToMDL.Main(String[] args)

Then if I run the sample Oil Rig from 3DSM7 folder I get the following result:

Code:
Found dictionary file: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\bin\modeldef.XML
OutputFile: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM7\samples\OilRig\TestX.MDL
Output file after modification: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM7\samples\OilRig\TestX.MDL
Creating output MDL file: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM7\samples\OilRig\TestX.MDL
CRASHTREE no granularity specified
CRASHTREE completed in 00:00:00.0180011
<!-- ++++ Processing Animation : Ambient ++++ -->
<!-- ++++ Processing Animation : Ambient2 ++++ -->

If I now put my box.x into the 3DSM2012/Plugins and use "SendTo", it suddenly works. I get this result from XtoMDL:

Code:
Found dictionary file: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\bin\modeldef.XML
OutputFile: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM2012\Plugins\box.MDL
Output file after modification: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM2012\Plugins\box.MDL
Creating output MDL file: E:\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM2012\Plugins\box.MDL
CRASHTREE no granularity specified
CRASHTREE completed in 00:00:00.0080005

and I get a box.MDL at 4kb which I can view in ModelconverterX, I also get a box_placement.xml file.

So this statement from the XtoMDL WIKI:
NOTE: The chief advantage of the "Send To" method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.
isn't working for me :confused:


FYI my "Compile Scenery" shortcut have the following paths:

Target:
%windir%\system32\cmd.exe /K E:"\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM2012\Plugins\xtomdl.exe" /XANIM /DICT:E:"\Prepar3D_SDK\Environment Kit\Modeling SDK\bin\modeldef.XML" /XMLSAMPLE > buildlog.txt

and Start in:
"E:\Prepar3D_SDK\Environment Kit\Modeling SDK\3DSM2012\Plugins"
 
The only difference I see is that in the first example there are some really weird characters in the path:

C:\Users\Bjrn Helge\Desktop\Grnnra\Bygninger\modeller\box.MDL

Since it apparently does work if you don't try to use the Desktop, I'd suggest exporting your .x file directly to a ..\scenery folder like I do.

Perhaps I should edit the Wiki to read "almost anywhere," eh?
 
Last edited:
Well whaddya know :P

There it was. Seems that Xtomdl doesn't like the norwegian characters " Æ, Ø, Å" :P

Used a new directory whitout my local characters and bingo, it works straight away :)

Thanks alot, Bill. I think I might have been trying for ages figuring this out on my own, it's not always easy to remember that ones own language screws up the programs coding :P
 
It seems that all of the SDK tools are American-English-centric...

I've lost count of the number of folks who've discovered that none of the tools recognize the "comma" when used as a "decimal point..."

...so they are forced to reconfigure Windows to use the period (.) character instead of the comma (,) in numbers! :eek:
 
Im very sorry to reopen a necrothread, but i got same problem with xtomdl.
I put period as decimal separator in windows language settings, but xtomdl still writes commas in the .xanim file :( and animation naturally does not work.
This is driving me crazy. Thanks for any help

EDIT: im sorry, the problem actually is not xtomdl, but the .x writer of 3ds max p3d plugin, which wirte the .xanim file as well, with commas.
how can i solve this?
 
Last edited:
I know you said you did it above, but (System 7): Control Panel/Region and Language/Additional Settings/Decimal Symbol must be set to the period (.). Have you *double checked* that?
 
yep. looks like a x exporter plugin for 3ds to be bugged. sometimes the xanim have commas some other times dot.
completely randomly
 
yes i always check the *.xanim with notepad++ and replace commas with dot, but beware, some parameter HAVE to be with commas, like typeParam="AutoPlay,Random".
save, and use xtomdl that will take the corrected *.xanim
 
Back
Top