See the future linked post for more up to date information:
The following is a bit out of date. If you want to know how to get models from Blender to XNA read the above linked post not this one.
It's been a while since I posted because I have been struggling with a problem since I finished the conversion to XNA 4.
As mentioned in my previous post, animated models from Blender would no longer display properly in XNA. If I had imported the animation in XNA 3.1 they would still work in 4.0 but when I tried to save new animations from the models using XNA 4, the animations were distorted.
I tried fixing the FBX exporter from Blender but the FBX file format is not documented making it difficult. To cut a long story short I have ended up with a solution that uses separate files for the animations.
The model, bones and bind pose are loaded in to XNA using FBX. Each animation is exported from Blender as a list of bone transform matrices. Those can then be imported in to XNA and converted to the AnimationClip format used by the Microsoft Skinning Sample. Edit: I now have FBX working see my next post.
The process takes a few steps but works with the models I have been using. It needs more testing with other models.
The package with several exporters for Blender 2.5 can be downloaded from:
The most recent instructions are on the Blender Wiki:
The XNA sample and model viewer demonstrating how to import the animations can be downloaded from:
Both are on Google Code, if the links do not initially work, wait an hour and try again. Google appear to have frequent outages but none so far have lasted longer than an hour.
There are still several limitations with the pipeline some are the same limitations as with earlier versions of XNA and Blender:
- All parts (Blender Objects) of a model must have the same centre (Origin, ideally at Zero)
- All parts of the model must have a scale of 1.0
- Every vertex must be weight painted or added to the bone vertex group for animation.
- The model has to be loaded in XNA before the animations can be converted to AnimationClip format.
At the moment the animations cannot be rotated in the content pipeline! [Fixed, see future posts] My next job is to work out the maths to rotate the animations as they are imported.
Please make sure you read my future posts. I have done a lot more work to get it all working properly.