Animated .X file refuses to move

Topics: User Forum
Apr 10, 2007 at 2:37 PM
Edited Apr 10, 2007 at 2:37 PM
I modified the DwarfModel demo to load in my own .X files, and while some work, others won't and I was wondering why that is.

I have uploaded 2 .X files (and corresponding .XMLs) at

In the zip are two folders: snake and guy, the snake works with ACL but the guy doesn't...

Both were exported with blender, if you want .blend files, I can provide them.

Both load properly into the project, and both are processed without errors, it is simply that when the project is run, guy refuses to move while snake does his coiling and uncoiling and finally his spasm thing.

If this was addressed in a previous discussion you can point me that way, I may just be really bad at searching...
Apr 10, 2007 at 3:22 PM
Hi. First of all, you don't need those xml files since you only have one anim per model. The xml is meant to split a single animation into multiple.

Your problem is that the keyframes in the guy.x file are all identical. For example, here is a snippet:

Animation {
{ LegL }
AnimationKey {

Apr 10, 2007 at 10:51 PM
Edited Apr 10, 2007 at 11:02 PM

dastle wrote:
Hi. First of all, you don't need those xml files since you only have one anim per model. The xml is meant to split a single animation into multiple.

Your problem is that the keyframes in the guy.x file are all identical.

Thanks for the reply, check the ArmR Bone, however, it has varying keyframes, the rest are identical though, yes.

Also, the only changes I made to the DwarfModel Demo would be:
Model model = content.Load<Model>("guy"); // guy rather than dwarfmodel
// and futher on...
idle = new AnimationController(this,
                    dwarfAnimator.Animations[0]); // 0 rather than "idle" or something
Finally, I am using the XNA Importer with the ACL Processer, NOT the ACL Importer but that hasn't made much of a difference so far. (in other words, importer hasn't mattered, snake moves with either, dude is solid with either)
Apr 11, 2007 at 1:38 AM
Indeed. You are correct. The problem is that your guy.x file has about 25 frames, and no AnimTicksPerSecond node. The default ticks per second is around 1000, so the animation runs too fast.


1. Delete your guyanimation.xml file.
2. Add
AnimTicksPerSecond {

To guy.x right before the first Frame node (well, you can it put it most places)
Apr 11, 2007 at 3:10 AM
Edited Apr 11, 2007 at 3:11 AM

dastle wrote:
Indeed. You are correct. The problem is that your guy.x file has about 25 frames, and no AnimTicksPerSecond node. The default ticks per second is around 1000, so the animation runs too fast.

Wow, that explains a lot, thanks. (This information was probably posted somewhere more obvious no doubt, and I just somehow over-looked it)

I tend to remember seeing something similar with my Snake file when I made it 2 weeks ago, but I could not for the life of me remember what it was, and thus have been throwing bricks at blender... I suppose it's time for a new monitor now ;)

I should compile a list of all the stupid mistakes I made modeling things in blender and exporting so that others can learn from all of them... off the top of my head they are having more than one root bone (parent-less bone if you will), leaving vertex groups empty, forgetting to bake my animation, and this: forgetting to export an animation speed out of haste/eagerness to get it going.
Apr 11, 2007 at 6:49 PM
When exporting from Blender you must ensure to select the speed button (else you get no animtickpersecond node).

Jun 26, 2007 at 1:45 AM
I have a similar problem. I've exported an animation file from Blender using the ACL exporter. Even though I only have one animation I do use the animation.xml file and set "idle0" to the total number of frames in the animation 0-50. I have ensure there are AnimTicksPerSecond in both the X and XML file. And finally, I have ensured that the keyframes are not identical. Yet my model is not animating. This is what my animation.xml looks like:
and this is an excerpt of my keyframes in the X file:

Animation {
{ BoneTLeg2 }
AnimationKey {

Any thoughts?

Jun 28, 2007 at 3:26 PM
You mentioned forgetting to bake your animation. Is that required to export from Blender correctly? How exactly is that done in Blender? Thanks for your help,
Jun 29, 2007 at 3:28 AM
Baking is necessary from what I can tell (if you don't, things tend to move jerkier / faster than you may want)

Essentially, you need the Action Editor Pane open, and there is a Bake Button for your Action. You need to press this. This button will create a copy of the animation that is baked. It will have a suffix of ".baked". Here are some quick screen shots. The Exporter will grab the Active Action (from what I can best tell), so make the Baked Action active and have fun with it in XNA!

I hope this helps. If you have any other questions about Blender and the like I suppose you can pm me if you like... I'm no expert, but I know enough to get by and do some fairly nifty things.
Jun 29, 2007 at 4:41 PM
Thanks for the tip. I hadn't used the action editor yet but everything you described worked for baking. I noticed the exported X file changed to include every frame in the animation - so it looked like it work. Still, my model is not animating with ACL. Very frustrating!
Thanks again,
Jun 30, 2007 at 12:27 AM
Edited Jun 30, 2007 at 12:31 AM
If I were you, I'd grab a model I know works, and modify the DwarfDemo (see my above posts) to make sure you have a working C# code-base, then begin trying to diagnose your .X file issue.

The most common mistakes for me when exporting were (in order of frequency)
1) Forgetting to check Frames Per Second (default of 25) is set to export,
2) Forgetting to check that each vertex has a bone and each bone at least a vertex
3) Forgetting to bake my animation.
4) Having a Parent-less bone
Jun 30, 2007 at 4:18 PM
Yeah, my example program does load and animate the Dwarf correctly, so the problem is definitely with my exported model. I was beginning to wonder if the vertices were being exported as "skinned" to the bones. I'm just learning the X file format and it is so large I wasn't sure how to tell. Going through your checklist, I think #2 is a possibility. What did you see if some vertices were not attached to a bone? I'm confident each bone at least has some vertices and of course everything animates correctly in Blender? Also, is there a baking process (similar to the animation) for skinning the mesh before export?
Thanks for your help,
Jun 30, 2007 at 10:49 PM
What I would do if you think some verts don't have bones is go through each vertex group in edit mode, and click "select", if some vertices are still not selected after you have done this for each vertex group, you need to assign those vertices to a group, and of course each group needs to belong to a bone (I think errors result otherwise, I forget... I haven't had as many issues lately... just forgetting to check the FPS button happens to me now)

How are you referencing the animation to be played? Are you using strings or integer indices? Specifying Animation index 0 will let you randomly load in models and play back the first animation without having to type in the name of it.

As for baking skinned animation into vertex keys, there may be a method, but I don't use it as it isn't necessary for ACL. I wonder though, what settings are you using when you export? I doubt this is an issue if you are getting Animation Frames exported into the .X file

The reason I had such small files in my first post was because I was having issues fixing larger files (and troubleshooting them).

Let me know if I'm way off base.