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

FSXA Animation oddiity

Messages
468
Country
ca-ontario
I've run into an issue that has me stumped and I can't fix it no matter what I've tried. I was hoping someone might be able to help with a bit of insight or suggestions. Here's the scenario:

A few days ago MAX9 crashed on me with a message saying something had gone wrong and did I want to try to save the file which I did. I then opened the '.recover' file and carried on working. A couple of days later I started to notice animation issues and they have continued despite all my best efforts. The problem only happens to new animations made since the crash and only to rotary animations that have an attached mouse rectangle, linear animations (i.e. like prop pitch, mixture etc.) are fine as are rotary animations without a mouse rectangle (like gauge needles). It's only 'knobs' with a mouse rectangle that refuse to move in the sim (they look fine in MAX). Oddly any rotational animation with a mouse rectangle made before this issue came up still work perfectly (like heading knob, radio knobs etc), the error only happens to new animations created in the last few days.

I have tried all the obvious things like going back to an earlier save, starting a new file and merging in all the parts etc. with no luck. If I start an all new file, make a cube and animate it then tag it with a mouse rectangle it still refuses to turn in the sim. If I do it in the main aircraft file and tag it with something like the heading bug code as if it was the heading knob then the knob/cube doesn't turn but the heading bug on the gauge rotates in response to the mouse inputs.

I've even resorted to deleting and re-installing both the SDK and MAX (twice) and I still have the same issue.

Recent tests have also revealed that if I open a test file sent by a friend, add his custom code to the default modeldef XML file (i.e. from a new, clean install of the SDK with no additional custom code) and create a new part (a simple cylinder) and animate it just like his part with the same animation tag and mouse rectangle then I can get it to turn in the sim. If I then delete the animation tags and mouse rectangle and redo them with stock code from the modeldef file (i.e. heading knob code) then I lose the ability to turn the cylinder but the original knob (the 'control' part if you like) still turns as it should. When mousing over the cylinder the tooltip text does indicate that the heading bug is changing but the cylinder does not go round.

It's very odd behaviour and believe me it's doing my head in as nothing I've tried has corrected the issue.

Anyone have any thoughts/suggestions on what I can try next?
 
Hey Larry,

Man, what a bummer...

So, rescaling has probably already been tried.

The animations that are put into the model go through the SDK. That is all SDK, except for actual animation.

Are you totally sure you replaced 'all' SDK data? Did you redownload it, 'pure' new?

Make sure you do not have extra 'scripts' in there, as one might be corrupt and causing all of this. These will be 'ms' files.

I hope you figure it out soon. Man, i hope this doesnt happen to me. I wonder what in the world the crash was? Can you check logs? Maybe you can find the log somewhere on your computer and see what it says.


Bill
LHC
 
So, rescaling has probably already been tried.
Yes it has plus when I made my last cylinder I made sure it was not resized in any way from the original dimensions used to create it.

Are you totally sure you replaced 'all' SDK data? Did you redownload it, 'pure' new?
You can't actually download the FSX SDK just the service packs for it. I uninstalled the SDK, cleaned out all remaining files then ran CCleaner to clear all references to the SDK in the registry. I then re-installed the base SDK from my FSX Deluxe DVD, then installed the SDK SP1a and finally the Acceleration SDK as per the usual methodology.

Make sure you do not have extra 'scripts' in there, as one might be corrupt and causing all of this. These will be 'ms' files.
I cleaned everything out as explained above. I even deleted all the MAX 'macro' scripts found after the re-install at one point and as soon as I started MAX again the files re-appeared instantly (I was watching the folder at the time to see if it would rebuild them).

Can you check logs? Maybe you can find the log somewhere on your computer and see what it says.
There was a log file but it didn't make much logical sense nor show anything obvious but it disappeared in the uninstall, wipe all traces, re-install process unfortunately.
 
Larry, just for the sake of sanity, check your Animation Controllers and made sure they are all set for "Linear". It is possible that Max has defaulted back to Euler types.
 
They have been checked multiple times Bill and they are linear (I have that set as default).

Another oddity that's shown up is on the dope sheet. Friends/fellow developers using MAX9 have the actual scale showing on the dope sheet for the part (100, 100, 100 or 75, 75, 75 etc.) where as mine says nothing or 'Linear' depending on which install of MAX 9 I was on. Not sure if that's just a local settings/options thing or not.

In addition to all the above I have also tried making a part in GMAX and animating/exporting as usual and that fails too so that points me to the SDK as the culprit as that is the only thing common to both modelling programs.

Tonight I even tried uninstalling the SDK (again!), cleaning out remaining files, cleaning out the registry and then re-installing to a non-standard location on the c: drive instead of inside 'program files (x86)' and it still failed when I tried a new export in the sim. I did this in case there was something somewhere that had become corrupted with the default location.

I have also made sure it's not something going on with my install of FSX as I sent a model file containing just two knobs to a friend and he reported that one turned and one didn't just like I saw.
 
Larry, there are actually only three programs/files in any of the SDKs that is used by Max:
  1. Max9_FSModelExp.dle (or equivalent)
  2. XtoMDL.exe
  3. modeldef.xml
GMax of course has its own export module and XToMdl.exe in the FSX_GmaxGamePack folder.

What I now suspect since you mentioned that even a GMax example is failing is that there is something wrong in your modeldef.xml file that is causing a failure to completely parse the file, since it is the only file that is common to Max and GMax!

In short, a syntax error in any entry will cause subsequent entries in the file to be ignored.
 
What I now suspect since you mentioned that even a GMax example is failing is that there is something wrong in your modeldef.xml file that is causing a failure to completely parse the file, since it is the only file that is common to Max and GMax!

In short, a syntax error in any entry will cause subsequent entries in the file to be ignored.

I have been thinking the same way Bill ....but... a completely new modeldef.xml direct from a fresh install of the SDK with only one additional piece of custom code added at the very end still fails with a default animation (like the heading knob code for example) while the custom code works perfectly. Even a new install modeldef.xml without any additional code fails.
 
While getting no further forward today I tried an experiment based on discussions I was having on my usual TS server.

I took a working part and cloned it (as a copy) and then stripped off the existing animation and tags and then re-animated the new part and tagged it with stock code for the animation and mouse rectangle. I then exported the two parts individually (using 'export selected') as separate .x files and compared them. Interestingly the files seem to cross reference the other part in the scene even though only one part was selected and exported each time. What is perhaps more significant is that my new part (the cloned part) carries a warning remark that the original part does not, it says:

'// Node not selected, so no mesh exported.'

I have no idea what that means or if it is related to my non-animation of parts.

If anyone is interested in taking a look I have attached the two .x files and two .xanim files in a zip file. 'Paul_Knob' is the original part while 'Larry_Knob' is the cloned part with the error message.

I'm really clutching at straws now as nothing I've tried has produced a result so far. I'm even considering a total wipe of my C: drive with a complete re-install of everything but I really don't want to do that unless it's a true last resort.
 

Attachments

Just a quick observation on the xanim. I don't know if this will fix anything or is related to anything but it would be worth investigating before you start wiping and reinstalling.

Code:
    <AnimStream name="Position" id="2" partName="Kollsman_test" length="360.000000">
      <Keyframe time="0.000000" type="Vector" data="0.000000;0.000000;-0.000000;0.0"/>
      <Keyframe time="360.000000" type="Vector" data="0.000000;0.000000;-0.000000;0.0"/>
    </AnimStream>

This vector (straight line movement) anim goes nowhere. I know that if you do this on a simple animation then FSX doesn't like it all but in your case you also have a rotation animation on this part.

I'd be interested in seeing the full xanim for the model. It might be worth checking this to make sure there are no anomalies. Sometimes you can get a model that will compile but only have half the parts animating.
 
Those are the full xanim files for the two parts Anthony, that's all that were in the scene as it was a simple test to see if I could get the second part to rotate in the sim.
 
I just checked the animation and it turns out I had a single linear key at the start of the animation of the second part. I removed it, exported the .x file, compiled the .mdl file and tested same in the sim but got no rotation again.

I then decided to look at the new xanim file and noticed this oddity:

Code:
<Keyframe time="180.000000" type="Quaternion" data="0.000000;1.000001;-0.000000;-0.000000"/>

I have been told recently that 'Quaternion' math can only have values between -1.000000 and +1.000000 and yet I see that odd additional 1 value in there. A friend had noticed similar occurrences in an earlier xanim file he had asked to look at which came from a much larger export of both good and bad parts from my aircraft model. In every case the extra 0.000001 value occurred at the mid-point keyframe just as above but I didn't check if every occurrence was on a 'bad' part.

I have no idea where that extra 0.000001 is coming from but could that be the underlying cause of all these troubles?

Tomorrow I will export from my aircraft model and check to see if all the bad parts have this additional value.
 
Last edited:
I just exported a selection of working and non-working parts from my aircraft model and then checked the xanim file for instances of the 1.000001 value and found literally dozens of them, including on parts I used on my previous aircraft model which have been re-used in this model (it is an earlier variant of the same aircraft) and they all worked fine so I don't think this extra 0.000001 value is an issue after all. :mad:

I have noticed something while doing this test too. Down by the animation key settings buttons in MAX9 there is an icon which expands into a menu list when clicked. At the moment mine is set to the last option. It looks like a sine wave with a horizontal line top and bottom (see attached image) but I can't remember if it's always been that option or if it has changed at some point. I checked in the 3ds MAX9 Bible and it says the first one (a line with two dots) is the default method so now I'm not sure just which method/icon I should be using for modelling to FSX standards.

Could someone with MAX9 (or later maybe) take a look at their icon and see which they are using as I'm now wondering if mine got changed and that could be the cause of all my animation issues.
tangent_choices.jpg
 
Do you have your Windows regional decimal separator set to a period and not a comma?
 
Just a quick observation on the xanim. I don't know if this will fix anything or is related to anything but it would be worth investigating before you start wiping and reinstalling.

Code:
    <AnimStream name="Position" id="2" partName="Kollsman_test" length="360.000000">
      <Keyframe time="0.000000" type="Vector" data="0.000000;0.000000;-0.000000;0.0"/>
      <Keyframe time="360.000000" type="Vector" data="0.000000;0.000000;-0.000000;0.0"/>
    </AnimStream>
Oh snap! :yikes:

The two are identical because they refer to the same absolute Vectors. Your problem is that you do not have any intermediate frames with keys, so the sim has no way to interpolate the movement, hence it doesn't move!

You must set at least three more keyed frames: 90, 180, and 270 for proper rotation. For example:
Code:
<Animname="cylinder_wiskey_compass"guid="F5BC2BFE-C3CA-4365-B2E2-96EAB46FB0D8"length="360.000000"
     type="Sim"typeParam="AutoPlay"typeParam2="cylinder_wiskey_compass">
  <AnimStreamname="Rotation"id="0"partName="Whiskey_Compass"length="360.000000">
     <Keyframetime="0.000000"type="Quaternion"data="0.000000;0.000000;0.000000;1.000000"/>
     <Keyframetime="90.000000"type="Quaternion"data="0.000000;0.000000;-0.707107;0.707107"/>
     <Keyframetime="180.000000"type="Quaternion"data="-0.000000;-0.000000;0.999963;-0.008726"/>
     <Keyframetime="270.000000"type="Quaternion"data="0.000000;0.000000;0.707107;0.707107"/>
     <Keyframetime="360.000000"type="Quaternion"data="0.000000;0.000000;0.004363;0.999990"/>
   </AnimStream>
</Anim>
Setting only a key at 180 still won't work because then the direction of rotation is still ambiguous. While setting a key at frame 90 would resolve the ambiguity, not having a key at 270 leaves accuracy of interpolation between frame 180 and 360 inaccurate.
 
All my rotational animations have at least a mid-point key as well as start and end keys Bill. I was under the impression that rotational animations required a mid-point key as a minimum but I must admit I do usually add the quarter turn ones too. Maybe I got lazy with the last couple of knobs and just added the mid-point ones. I will add more and see what happens.

Bottom one for me, Larry.
Thanks I will leave mine as it is then.
 
OK that's it, I can finally say that senility has set in! :yikes:

I took Bill's advice and double-checked my latest animations and lo and behold I just have just three key frames. I added two more at the quarter and three-quarter points and my knobs turn!

That's a whole week of development lost with untold amounts of frustration and a lot of effort put in on my behalf both here and on TeamSpeak all because I was an idiot! :banghead:

I will now go and stand in the corner and hang my head in shame. :(

Sorry for all the trouble guys.
 
Now that you have undergone the "forgot that bit" trial that so many of us have endured already the first drink is on me!
I'm glad you are back on track.
 
Back
Top