Animation all wrong in XNA.

Started by
0 comments, last by Reb1rth 11 years, 10 months ago
Hi,
I have just made my first ever skeleton animated model in Maya with a simple walking animation, and exported it as an FBX file. I can import it into XNA 4.0 using the SkinningModelProcessor, but the orientation of the joints are all wrong, even though they work fine in Maya. I am sure I did something wrong, but not sure what.

On the left is how it looks in Maya, and the animation runs fine. But on the right, in XNA, it just all looks wrong. It is animating, but the tranformations are bugged.

svlysi.jpg2a68407.jpg


The steps I took:

Made the model out of a number of primitives (many meshes are seperate, in order to use rigid skinning for a simple robot animation).
Made the skeleton (I have a root node, and it was my third attempt to get the hierarchy correct).
BInded each mesh to the correct joint (all meshes are binded to a joint).
Animated a simple sequence.

I deleted history and freeze transformation before binding.

Any help would be appreciated, as I am not sure where to begin.

P.S. excuse the model, it is just a basic placeholder I made to learn animation. smile.png
Advertisement
Although there is a lack of interest, someone else might encounter a similar problem, so i'll share what went wrong.

Two things.

One, the bind pose wasn't set. Frame 0 - 1 (Maya usually starts at frame 1, but you can set it to frame 0 and set a keyframe to it).

Two, I am using a a single time line, in which all animations are in one long animation time line, and I wasn't setting the keyframes for certain bones for each segment. This caused problems in the hands when jumping to a specified time range, as it skipped the keyframes that set them to close.

Also, the Skinned example for XNA (or the FBX format) doesn't appear to support animation 'clips', but I got round this problem by using an XML file to store the position of the start and end keyframes. Note, this should be handled before the Skinned example does its stuff, as it doesn't handle interpolation like most animation systems.

Oh, one last thing. I changed Rigid skin bind to Smooth skin bind. It still functions the same if the weights aren't altered and the parts are binded like I did before. I believe the Skinned example doesn't like Rigid binding, but I only heard that on the grapevine. :)

This topic is closed to new replies.

Advertisement