Jump to content
  • Advertisement
Sign in to follow this  
Reb1rth

Animation all wrong in XNA.

This topic is 2265 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 Edited by Reb1rth

Share this post


Link to post
Share on other sites
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. :) Edited by Reb1rth

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!