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

Animations... What comes next?

Messages
361
Country
us-indiana
Okay, this is probably going to sound dumb, but I'm stuck here and not sure how to continue. I've looked through the SDK and no answer there, that I can find and I can't seem to find a tutorial on this. I have keyframed my animations, attached the tags, exported my model and gotten X-files (and converted them)for xanim.mdl and x.mdl. Then I changed the name to the donor plane and copied over the files. I get my model, but no animations. Neither are 0 size files, so I guess they exported correctly, but what do I do with them now?

I cannot seem to find the next step anywhere...

Thanks,
Kevin
 
Keep in mind that modeldef.xml gets read THREE separate times... and it must always be the same modeldef.xml file that's read...

Make certain that you have one - and only one - modeldef.xml file and it's in the SDK's ..\bin folder.

1. When Attach Point tool and/or Animation Manager is run.

2. When exporting .X and .XANIM files.

3. When compiling with XtoMDL.exe

Since you get both .X and .XANIM files, I suspect that the compiler isn't "seeing" the modeldef.xml file.

How are you calling the compiler? I use a Desktop Shortcut that I've placed in my "SendTo" folder, so all I have to do is select the .X file, right-click and "SendTo Compile Aircraft."

Properties/Shortcut Tab
Target:
Code:
%windir%\system32\cmd.exe /K E:"\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe" /XANIM /DICT:E:"\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML" > buildlog.txt
Note that part of the command line string is an explicit path to modeldef.xml file!

Start In:
Code:
"E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins"
 
So do I check 'Export Animations' when exporting, or is it automatically baked into the mdl?

I just save the X-files to the plugins folder, then drop them onto the compiler...
 
Last edited:
So do I check 'Export Animations' when exporting, or is it automatically baked into the mdl?

I just save the X-files to the plugins folder, then drop them onto the compiler...

Two things:

Yes, you must check both "Export Animations" and "Skinned Mesh" (if you have any) manually, every time!

You must pass all of the command line switches and data to XtoMDL.exe, which is why either a batch file or a Desktop
Shortcut works best.

Because you are not doing this, none of the animation' control script is being included in your compiled model... :yikes:

From the SDK:
The XtoMdl Tool
To create models, aircraft or scenery, a new tool, XToMdl, has been introduced. The previous tool, MakeMDL, is now deprecated as are all models created from the ASM source. Models created with MakeMDL will still continue to function with Flight Simulator X. For backwards compatibility, XToMdl will read .x files from previous versions of Flight Simulator and produce a model for Flight Simulator X. Conversion of materials from ealier models may result in issues related to specular power and color. This is usually due to these values being zero in the .x file.

XToMdl.exe is a command line tool and is in the Modeling SDK\3DSM7\Plugins folder. To make the tool easy to use, save the model .X file and .XANIM file (the default location of these is C:\Program Files\Autodesk\3dsMax7\meshes) into the Modeling SDK\3DSM7\Plugins folder.

If all the appopriate files are moved to the Plugins folder, then normal use of the XtoMdl tool would be to enter the following in a command line window:

>XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml /XMLSAMPLE filename.x

The .X file contains the vertex information for every object in your scene.
The .XANIM file contains animation information that has been extracted from the modeldef.xml file

When the compiler is run, it combines the vertex information from the .X file, the animation information from the .XANIM file, and then parses the modeldef.xml file again to insert the actual XML control scripts!

Since you aren't telling the compiler to include parsing the modeldef.xml file, none of your XML control scripts are being included in the compiled .mdl file...

...so of course you have no animations... :D
 
Last edited:
You must pass all of the command line switches and data to XtoMDL.exe, which is why either a batch file or a Desktop
Shortcut works best.

I'm not sure how to do a batch file, and I think by 'pass all to' you mean running it through XtoMDL?

XToMdl.exe is a command line tool and is in the Modeling SDK\3DSM7\Plugins folder. To make the tool easy to use, save the model .X file and .XANIM file (the default location of these is C:\Program Files\Autodesk\3dsMax7\meshes) into the Modeling SDK\3DSM7\Plugins folder.

That's what I've been doing.

When the compiler is run, it combines the vertex information from the .X file, the animation information from the .XANIM file, and then parses the modeldef.xml file again to insert the actual XML control scripts!

Since you aren't telling the compiler to include parsing the modeldef.xml file, none of your XML control scripts are being included in the compiled .mdl file...

So the XtoMDL takes the Xanim file and uses that to read the animations from Modeldef.xml?


So here is what I am doing as it stands.

I export and get the x-file and xanim
I run both through XtoMDL and get my mdl and an Xanim.mdl files

so what do I do with the Xanim.mdl?

Please keep in mind that what I don't know here outnumbers what I do know by about 100 to 1... ;)
 
Last edited:
So here is what I am doing as it stands.

I export and get the x-file and xanim
I run both through XtoMDL and get my mdl and an Xanim.mdl files

No, no, no!

You MUST follow directions precisely. You don't do anything with the .xanim file. That is passed to XtoMDL.exe via the command line /XANIM flag!.

Do yourself a HUGE favor and simply set up a Desktop Shortcut at the very least...

...otherwise you will have to be typing a whole lot of crap into a DOS Command Box every time you want to compile a model!

Code:
XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml /XMLSAMPLE MyFilename.x MyFilename.mdl

I wrote this Wiki article over a year ago to help explain the process:

http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL
 
Ok, there's a language barrier here I think. Tech language, that is, and I'm not used to the terms. There are some basic things I am missing here and I'm not sure what they are. Sorry about that, that's my fault... :confused:

Working on it..
 
Last edited:
Ok, there's a language barrier here I think. Tech language, that is, and I'm not used to the terms. There are some basic things I am missing here and I'm not sure what they are. Sorry about that, that's my fault... :confused:

Let's start simple with the shortcut.

I made a shortcut to:

"C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins" and after that, I am to put '/XMLSAMPLE' after this address in the target line?

This is the exact text that should be in your Target: line of the shortcut. You can copy paste directly from the following:
Code:
%windir%\system32\cmd.exe /K C:"\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe" /XANIM /DICT:C:"\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML" > buildlog.txt

By the way, the quote marks are critical, because DOS Command Box doesn't like spaces in path names!

The first part:
Code:
%windir%\system32\cmd.exe
is what opens the "Command Box" and keeps it on screen.

The next part:
Code:
C:"\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe"
is what calls the compiler, xtomdl.exe

The remainder are the "switches" that're sent to xtomdl.exe telling it what you want it to do:
Code:
 /XANIM /DICT:C:"\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML"

The very last part:
Code:
 > buildlog.txt
is a redirect ">" of the compiler's report to a text file cleverly named "buildlog.txt" so you can read it if necessary to see what -if anything- might be in error... :teacher:

You also need to add this to the Start in: section of the Desktop Shortcut:
Code:
"C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins"

and put it in my 'Send To' folder and the reason for this is so I can just right click and send my x-file to Xto MDL, yes?

One issue that I am seeing is that you keep referring to the command box being open, but I have never seen it stay open before.

Yes. If you drag the Desktop Shortcut to your SendTo folder, then all you need to do is rightclick on your .X file, and choose SendTo CreateAircraft (assuming you renamed the Desktop Shortcut as "CreateAircraft" of course)...

The best part of this is that you only have to do it ONE TIME, and once it's working properly, you can save your .X file anywhere at all and it will always compile perfectly! :D
 
Last edited:
Okay then! I have the shortcut all set up and managed to get one aileron working in FS, so from here on out, it should be relatively easy (I hope). :)

Thanks Bill, I could not have gotten anywhere without your help and I know it must have been a bit frutrating on your end.

Kevin
 
Okay then! I have the shortcut all set up and managed to get one aileron working in FS, so from here on out, it should be relatively easy (I hope). :)

Thanks Bill, I could not have gotten anywhere without your help and I know it must have been a bit frutrating on your end.

Kevin

No problem at all, Kevin. Keep in mind that I've been working with computers since the ancient days of the HUGE mainframes! Quite possibly I'm one of the handful around here who actually remembers EDLIN, much less the DOS command line switches!

In any case, what this technique allows me to do is compile my aircraft .mdl directly into my ..\model folder in FSX...

I simply export from Max using the name I wish for the xxx.mdl file to use, and keep Windows Explorer pointed to that ..\model folder. Once I see the .X and .XANIM files have been created, I then select the .X file, rightclick and SendTo CompileAircraft! :D
 
Ok, I have my animations set up except for the prop, which seems to be a different animal, but I'll research that a bit before I start crying for help. One thing, for some reason the distance to the plane seems to have increased by about a half mile. I didn't change anything, so I have no idea how it happened...

Kevin
 
Props require "tagging" twice:

Animation Manager to provide the link to the XML script's animation code

Attach Point Tool to provide the "visibility" condition.

It is possible you have a 'rogue vertex' which is causing the compiler to incorrectly scale the default "view distance"

Try selecting all objects in the scene, then check the "bounding boxes" to see if any object has an abnormally large one...

In any event, there is a very handy tool that Arno wrote called RADitor which will allow us to reset the apparent size of the model's radius... :D
 
No problem at all, Kevin. Keep in mind that I've been working with computers since the ancient days of the HUGE mainframes! Quite possibly I'm one of the handful around here who actually remembers EDLIN, much less the DOS command line switches!

That takes me back... EDLIN? ack ack hhh..ack! :D
 
Back
Top