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

Max 2012 Multi-MDL-Composites; Workflow Solution

Messages
10,159
Country
us-arizona
Hey all,

I thought I would share this workflow idea I am running presently to get models into FSX/P3D from Max 2012.

What this does is create 2+ BAT files for exporting your plane faster. I use 4 BAT files, one having the Pilot, so I can quickly create a interior and exterior plane, one without the pilot.

For those that need the full breakdown; Max 2012, with the Prepar3D SDK, 'cannot' export models bigger then 65,000 Polygons, which today is incredibly small. Its a major issue. Not only that, the 32bit version of Max cannot handle large exports and usually crashes.

To work around this for now, thanks to Kai, I am using the MCX route and using its ability to add other MDL's to the MDL. (Yes, thats correct, you can add other models to an existing model in MCX, originally designed for doing this for scenery projects, like buildings and trees and cars).

NOTE: Visibilities will not function and will be stuck 'on' when doing this, so its only good (presently) for doing test planes with.
Here is a how to on how this is done;

Normal workflow:
* Export your model in sections, under 65,000 Polygons each, into FSX MDL format
* Open one in MCX
* Click 'Merge' icon (looks like an upside down Y), and locate your next MDL in that folder, attach and merge.
* Continue till you have all sections joined.
* Export as MDL and you are done. The plane's Visibilities will not be functioning, such as all props showing up at once, fast and slow discs and the stopped blades, etc.


For those that want some SPEED in exporting all of these, try this new method.

SETUP:
* Create BAT files using Manfreds system of making BAT files. You will need as many as you have export sections. If you have 4, then 4 BAT files are needed.

CREATION OF BAT FILE:
* Open Notepad and paste the following in;

//////////////////////////////PASTE BELOW STARTING HERE/////////////////////////

rem Move this file to C:\Program Files (x86)\Lockheed Martin\Prepar3D SDK 1.4.4747.0\Environment Kit\Modeling SDK\3DSM2012\Plugins\
rem Move F24.x and F24.xanim to same location.
rem Execute this file.

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml F24.x > F24.log

pause


//////////////////////////////END PASTE HERE/////////////////////////


Above; Change the name of your file to what you have. Mine is F24.x, so change yours to yourplane.x.

Change the location of the compiler folder to what you have. It must use the modeldef that you are using, and the general Max 2012 exporter, so the Max 2012 Plugins folder in the Prepar3D SDK center is where I have mine.

* Copy/paste the following above into a new Notepad file. Make the changes to show your directory where it is at and your new plane file name.
* Save as something like 'MyplaneMain.txt'
* Rename the file to 'MyplaneMain.BAT'
* Drop this file into the Max 2012 Plugins folder in the Prepar3D SDK

TEST: Drop in yourplane X file and Xanim files into the Plugin folder, double click the BAT file and see if it kicks out a MDL file. It should also produce a build log file. If it doesnt, you did something wrong on the text in the BAT file. Rename it back to TXT to edit it, redo, retest.

If it works, move on to part two here.

Highspeed Workflow;
* Make copiles of the BAT file, rename them per their sections, but starting with the name. You can rename them whatever you like that is simple to save you speed, such as 'F1Main.txt, F1_2.txt, F1_3.txt, etc.
* Go into each TXT file and reset the file input and output names to the new name for each new part.
* Rename all TXT files to BAT files.

TEST: Having all of your X and Xanim files for your model (2 or more) and all named properly (such as F1Main, F1_2, F1_3, etc), drop those in the Plugins folder noted above. Start clicking on each BAT file, one at a time, letting each one run until it is finished.

You will know when its done when the DOS screen says 'hit any key to end'.

You should now have new MDL files created. Check that each file has bytes, such as 450KB, 2 megs, etc. If you have a 0bytes file, you did something wrong on the BAT file text. Go back on that BAT file text, find the error, change, retest.

If all worked, you now assemble them in MCX. See above under 'Normal Work Flow' for how you run multiple MDL files through MCX to produce single composited MDL files.


Have fun! This makes it much faster to compile models. No typing in the DOS windows, etc.


NOTE: You cannot use my stock BAT file text content. You must change the name of the file import name and file export name, and also note the location of where your Prepar3D SDK Plugins folder is. If you 'do not' do this, the BAT files 'will not work' and this is why.
Example:

////////////////////////////////////////

rem Move this file to C:\Program Files (x86)\Lockheed Martin\Prepar3D SDK 1.4.4747.0\Environment Kit\Modeling SDK\3DSM2012\Plugins\ CHANGE TO YOUR LOCATIONrem Move F24.x and F24.xanim to same location. CHANGE TO YOUR NAMES
rem Execute this file.

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml F24.x > F24.log CHANGE TO YOUR NAMES

pause


//////////////////////////////////////////////
 
Last edited:
You can also have multiple XtoMdl command lines in one bat file -- such as e.g.

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml F24_1.x > F24_1.log

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml F24_2.x > F24_2.log

XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml F24_3.x > F24_3.log


.. just like that, all in one .bat. Now one click should do them all, one after the other.
 
Back
Top