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

/WRITETOFILE? How?

Messages
64
Country
unitedkingdom
Hi all,
We have run into the usual system.outofmemory nonsense that always seems to blight our high-poly models. However, we weren't expecting to see this again as we are using all the latest tools, i.e. Max 2014 64bit with the P3Dv2 plugins and the P3Dv1.4 XtoMDL exporter. But here we are again, exports result in either vertex buffer errors or system.outofmemory errors.
It would appear from reading other posts on the subject here that the /WRITETOFILE is the magic bullet to make all these problems go away. However, adding it to the compiler command line causes it to spit out a 0kb MDL in a under a second, so it's obviously falling over before it begins to compile anything.
Anyone know why adding the /WRITETOFILE line causes it to fall over?

This is the full command line, run via a bat file:
"D:\Prepar3D SDK 1.4.4747.0\Environment Kit\Modeling SDK\3DSM2012\Plugins\xtomdl.exe" /XANIM /WRITETOFILE "D:\Tornado GR1\TornadoGR1.X" /dict:"D:\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml" > D:\Compile\buildlog.txt

It works fine without the /WRITETOFILE instruction.

This is the buildlog output:
Found dictionary file: D:\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
OutputFile: D:\Tornado GR1\TornadoGR1.MDL
Output file after modification: D:\Tornado GR1\TornadoGR1.MDL
Usage: XToMDL.exe /KEEP /NOGUI /BATCH /NOCRASH /BMP2DDS /XMLSAMPLE /XANIM /BULLET /DICT:DictFileName /OUT:OutfileName Filename.X

Any input gratefully received...
 
/writetofile does work here. Perhaps you are exceeding the max line length permitted for .bats? You could try shortening "> D:\Compile\buildlog.txt" to something like "> x.txt", or even copying your .x and .xanim file to where your modeldef is. In which case all those long path prefixes can be reduced to nothing.
 
Thanks. Unfortunately that hasn't done it. Reduced all the paths down to the drive roots and still the same issue.
 
Why are you using the 32bit xtomdl.exe compiler? "..\3DSM2012\Plugins"

Try using the 64bit xtomdl.exe compiler instead "..\3DSM2012_x64\Plugins"
 
Ha! couldn't make my own suggestion work. Sorry! Instead try this:

(1) copy your model.x and .xanim to bin\ where your modeldef is.

(2) execute this batch file:

..\3DSM2012\Plugins\XtoMDL /WRITETOFILE /XANIM /DICT:modeldef.xml TornadoGR1.X > log.txt

This does work here, just tried it. Ultimately consider moving modeldef to a much shorter path\folder.
 
Bill,
I don't think there is a 64bit version of the XtoMDL compiler in the P3D1.4 tools? There is in the P3D v2 version, but it was my understanding that those won't compile for FSX?

mjahn, thanks. I'll give it a go.
 
Unfortunately no good even with massively shortened paths and consolidated paths. Also had a colleague try it and they are getting the same problem. Frustration all around!
 
Confirm a smaller model (or an export-selected of just a few parts) compiles OK w/o the /writetofile switch? Please test.

Just a thought, zero size models are often due to Windows using the comma as a decimal separator. Better check your system hasn't changed anything behind your back.

Try your original batch without the "> D:\Compile\buildlog.txt", also on just a few parts.
 
Thanks for the link, Tom. It's been so long I had completely forgotten that the 64bit XToMDL.exe compiler is a "patch" and not part of the full SDK.
 
Should there be a 64bit MAX 2012 version of XtoMDL.exe? The patch I downloaded only contained the files for exporting directly from 3DS 2012. As a lot of the model has already been built in MAX 2014 our modeller is currently sweating about porting it backwards into 2012 to get it to compile.
 
No sweat, export to .X with P3D 2.x and compile with XtoMDL.exe 64-bit from P3D 1.4
 
I think I'm missing a piece of the puzzle here, or I'm not following correctly. I've downloaded the P3D 1.4 patch, but the contents of my new 3DSM2012_x64\Plugins folder only contains the following files:
Max2012_FSModelExp_x64.dle
Max2012_MaxUtils_x64.gup
Max2012_MaxXML_x64.gup
SetupAcesRoot.ms

So no 64bit version of XtoMDL.exe for FSX/P3D. Is that correct or can I find a 64bit version of XtoMDL that will compile to FSX somewhere?

At the moment we are exporting the X file from MAX 2014 and then compiling with the old pre-patched 32bit version of XtoMDL.exe, at which point it falls over due to the vertex buffer errors, or System.outofmemory errors when the vertex buffers are fixed.

Thanks all, I really do appreciate the help.
 
Back
Top