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

Max2012 animation woes

Messages
227
Country
germany
I'm ready to bite chunks out of my office table.

I designed a US ww2 60inch search light position and want the light to be animated. The light corpus rotates slightly around the y axis, nothing complex. Everything is fine in 3dsmax. However, I can't get the animation to work in sim or ModelconverterX.

Tools:
3dsmax 2012 64bit
P3D SDK 64bit
MCX latest dev version

In order not to cause further entropy in the search light model I made two simple cubes for testing. The top cube is supposed to rotate around the z axis. Same problem, the model looks and animates OK in Max, shows in MCX, the animation shows as tagged there. The animation slider shows and can be started, but alas, nothing moves.

Here's what I did in Max:

- align the pivot axis of the object to world
- set the object transformation (position, rotation, scale) controllers to linear (default)
- animate the model with 0-100 keyframes (key 0 and 100 is set)
- tag the object with "Ambient" in the P3D SDK AnimationManager, keyframes set 0-100
- check the "ANIM_Start...END) entries in the Max track view dope box (looks good to me)
- check entries in the track view curve editor (looks ok to me, but the curve is not visible - a curve is only visible when the Euler transformation is used. Is this normal?)
- export the model with the P3D SDK tool (animation ticked etc)

The result is a proper x file, xanim file, and the compiled mdl. I checked the xanim file and can not see anything awkward here. In MCX the model shows fine, as stated above, with animation tag but it won't move. In the MCX animation editor I wonder about the max animation frame value of 32767, shouldn't there be the maximum number of keyframes in set in 3DSMax (100)?.

I don't know where I should look further into. The only thing that strikes me funny is the absence of the linear curve in Max (which might not be problem related) and the strange value of the keyframes in MCX. I don't know where MCX got these from, because the xanim values look OK.

Maybe I overlook something... help would be appreciated.

Cheers,
Mark
sl-insim.png anim-file.png anim-manager.png dope-sheet.png mcx.png max.png max2.png
 
Clutching at straws.

Is there a modeldef.xml file available when you compile your mdl?

Does the Xtomdl.exe parse produce any errors?
 
1. Yes
2. No

I activated the p3d sdk tools in 3dsmax (the modelfdef is referenced). The xanim file shows the proper guid for the anim name "ambient", so the compiler finds it.
No errors at all in the parse. I also washed the object through the verify in the SDK exporter. No errors or warnings. This is the cleanest file I ever produced :-)

Bummer.

Cheers,
Mark
 
Two (Euro) cents:

1) Try to set the anim controller to: Position Bezier, Rotation TCB, and Scale Bezier. Re-do the animation and test.

2) Try your rotation on another animation definition, say aileron (0-100) or rudder or wingfold. Just to see whether ambient may be the problem.
 
Leave all controllers set to Linear. The SDK is quite explicit that only Linear is supported, although from experience sometimes animations will work with Euler or Bezier transforms...

Personally I'd try adding a few more keys. For some reason, neither FSX nor P3D seem to work with only start and stop keys.
 
Thanks for the advice, Manfred, I'll check it tomorrow.
The requirements for the animation defs are a bit confusing, some say stick to linear on all transformations, other posts say TCB is OK. I'll find it out.

Cheers,
Mark
 
Indeed, the SDK says "All rotational animations should be Linear, and not Euler or TCB". But guess what, half of the animations in the sample DC-3 are TCB and work fine. Actually, I do all my rotations as TCB because I prefer the TCB menu. Never had a problem. Could be another SDK glitch, such as restricting texture size to 1024 and requiring _t suffixes for textures.

That said, Mark, perhaps, before you try TCB, create intermediate frames at 25, 50, and 75. This is especially needed if you turn 360 dgerees.
 
Erm, why haven't you entered start and end keyframe numbers in the Animation Manager (third screenshot)?
 
Tom, I entered the start/end keys when I created the tags and they show up in the animation manager summary, but not in the fields where you miss them. Once the animation manager is closed and opened again the fields are blank.
But the data seems not to be lost.

@ Manfred, Bill : There are 11 keys in the animation, see the xanim snippet / dope sheet in my first post. My statement in the first post was a bit unclear, I meant that I defined the first and last key in the anim manager.

Thanks for your input everyone! It gives me a few things to try tomorrow.
 
Would you be willing to post the x file and xanim files? If so I or someone else could have a look at them for you.

It might help having another dev try to compile the model. It may help to narrow down if the problem is in the x file, xanim, modeldef or passing it to xtomdl.

My money is on the anim tag in the x file not matching the name in the xanim.
 
I'm under the impression that something is wrong with my installation.

I took Manfreds teapot mdl and checked it in MCX. Rotates beautifully. Then I took the max file and compiled it. Same old problem. In MCX it shows 32767 keyframes instead of 100 and no rotation.

I also tried the sample oilrig in the SDK. Same thing.

@manfred: do you have the .x file and the anim file for the teapot? If I could have a look at them I could compare the entries and search for differences. Also, which version of the SDK tools are you using?

Attached is my rotating testbox with the x and xanim files.


Thanks for the help and inspiration,
Mark
 

Attachments

Sorry, unable to open your max file because I am on Max2011.

But I have a hunch. That 32767 number seems to be a clue. Open the Animation Mgr. Click the button "Summary", bottom right. Check your part shows with keys 0 to 100 - not 32767, or some other absurd number, which I believe you have there.

If that is the case then proceed as follows in precisely this order:

1) clear the animation from the part.
2) Type in start: 0, end: 100
3) Select ambient from the list.

Recheck the result in the "Summary" list. If you get 0 and 100 then you are OK.

I believe the error comes up when you do 3 before 2.

Edit, Here are the x and xanim files for the teapot -

https://dl.dropboxusercontent.com/u/51024107/reapott-xanim.zip
 
Last edited by a moderator:
Hmmm. I did it exactly as you described, and the SDK suggests.
The animation mgr. summary displays what it should. Also, in the xanim file I have the correct keys, hence they are defined.

I ran the xanim file of the teapot and the yy.xinam you have sent me through a file compare tool and they are identical. Also the matching .x files, which only show differences that are normal (creation time, etc).
That suggests that the 3dsmax side of the process is without fault.

Now I have another suspect. I use MCX extensively as post design validation tool and only move the objects further into the sceneries when they pass that stage. Maybe the culprit is there and not in 3dsmax / p3d sdk after all. It could be that MCX has a problem reading p3d v2.2 animations.

I'll open a thread in the ModelconverterX section.

I'll be back!

Cheers,
Mark
 
I checked with Arno and MCX is off the hook.

However, it seems like the original 3dsmax installation has a problem after all. When I compile the test object in another 3dsmax installation (same version same P3d SDK v2.2) it works in MCX.
I also can compile the p3d x and xanim manually with the FSXA xtomdl + ref files and it works.
Further, manually compiling the x and xanim files with the p3dv2.2 xtomdl is also successful.

So there must be something wrong within 3dsmax or more specifically the SDK plugin, precisely after the x and xanim file is generated (since they are OK) and they are passed to xtomdl for compilation.

I guess I delete and reinstall 3dsmax, most likely something is screwed up there.


Cheers,
Mark
 
Hi Mark

I've had no problems compiling the testbox.x file into animating MDL files that work in MCX (didn't try it in FSX or P3D).

Here is what I did.

Downloaded the testbox.zip and unzipped it.

Dragged and dropped testbox.x onto a shortcut to xtomdl.

The shortcut I made by finding Xtomdl in the SDK (the full address is below) and sending a shortcut to the desktop. I then modify the properties of the shortcut so that the "target" looks like this:

"C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\XToMdl.exe" /XANIM /DICT:..\..\bin\modeldef.xml

The file location will already be there so I just add the /XANIM switch (to tell xtomdl there is an animation) and the /DICT switch (which tells xtomdl where to find the modeldef.xml, ie two folders up and in the bin folder)

I was then able to load the mdl file (which is produced in the same folder as the x and xanim are) into MCX and the animations worked fine from 0 to 100.

Once that was tested as working I then tried to make a P3D V2.2 version. Again I made a shortcut to the Xtomdl and edited the properties target to (note that your location may not be the same as mine):

"C:\Program Files (x86)\Lockheed Martin\Prepar3D v2 SDK 2.2.10437.0\Modeling SDK\3DSM2014_x64\Plugins\XtoMDL.exe" /XANIM /DICT:..\..\bin\modeldef.xml

Dragged and dropped the x file onto the shortcut which again produced a mdl file which once tested in MCX the animations work fine.

I have attached a zip with both mdl files (one for FSX and one for P3D) which you can try in MCX. If they don't animate in your copy of MCX then there is a problem with your copy of MCX ( a while ago MCX crapped out on me for no apparent reason and wouldn't load any models at all. I ended up downloading the latest version to get it working again). You can also compare (in file size) to the MDL files you are generating.

MCX version I am using is 1.4.0.0 r2740 24/03/2014
 

Attachments

I guess I posted at the same time as you Mark and it seems you found the same things I did.

I am wondering if the P3D plugin is not setting the modeldef path correctly or maybe not setting the XANIM properly.
 
Thanks for the input, Tom.
I'm not sure, but MCX can be definitely ruled out. The process seems to be OK up to and including the point where the x and xanim file is created. Modeldef - I think xtomdl would throw an error if it's not referenced during compilation.
It must be something that is only related to the specific installation, since it is OK on my other workstation. Oh well!

Cheers and thanks for taking your time,
Mark
 
Now for a final (far) shot - check whether your Windows system decimal separator is set at "." (period) and not "," (comma). Open Windows Control Panel > Region and Language > extended settings,
 
Oh well. What shall I say.
I took it for granted that the decimal separator was set to dot, but it was not. I switched it back some time ago to comma because if it is set to dot other applications don't work.

Now it's back to dot and the searchlight happily throws it's light arc around.
Thanks for the hint, Manfred.

On the positive side I have pretty good understanding of how animations work now and got to read the SDK docs :-).


Cheers,
Mark
 
Back
Top