Just the heads up for people using blender to get their models into XNA:
If you use a static mesh: use the directx exporter, it worked fine (so far) for me.
If you want to use an animated mesh the XNA .fbx export mod python script can be found here:
the following is probably not correct ((see Ideasman42’s post as to why):
it’s the best way to go untill the .fbx exporter that comes with blender is updated to the 2006-11 .fbx sdk compliance. Currently the .fbx exporter version that comes with blender is 2006-10-01, while XNA is using 2006-11, thus creating a few hiccups.
We’ll have to ask Robotron how and why he changed the script.
Errors: -bone weight error
When you export your animation, make sure every single vertex in your mesh has been weight painted, leaving it to the default value (dark blue color) 0 will result in errors.
-SkinnedModelPipeline “Input Skeleton not found”
the armatures need to be joined using [ctrl+j]
The skeleton root, “Spine”, has been pulled out of the scene hierarchy and made into a child of the root node. One of the skeleton root’s old parents, “Armature”, has an animation named “Move” which will not be reflected on the skeleton root. Fragment identifier “Armature”. Animtest.fbx SkinningSampleWindows
Remade the armature, changed the code in XNA ( AnimationClip clip = skinningData.AnimationClips[“Move”]; ) to reflect the action name in the .blend, ignored all errors and it shows up in the skinningsamplewindows.
-my question isn’t in this faq:
feel free to post your problem or a solution you have found in this thread.
to make sure we all use the same test tools (it might be your code messing things up, and not the xna importer):
USe the skinned model sample to test animations:
The Xna exporter can be found here:
(taken from Terloon’s post here http://xna-uk.net/forums/p/596/1635.aspx#1635)
So far my methods are pretty simple. Steps I should be able to describe to a 3d artist some time down the road of my project. Here goes:
Create model to animate.
Add armatures. So far my armatures have been pretty basic. Enough to make a few blocks wave.
Set weight values by weight painting.
Create animations in the Action Editor.
Name this armature.
Add an armature modifier to the mesh object and make sure it references the armature I named.
Use the FBX exporter made by RobotronHer which can be found here. www.triplebgames.com
In the SimpleSkinned XNA application, add an existing content item and select that exported FBX file.
Select the imported fbx file properties and make sure it uses the SkinnedModelProcessor for the Content Processor property.
In the SkinnedSample code, make sure you on the line:
AnimationClip clip = skinningData.AnimationClips[“Walk”];
That “Walk” was an animation action in blender that you made.
Compile and run.
All this have been by memory, but that should be the general steps I’ve been doing. The model loads, renders, and animates, but, as always, I’ve met another snag. The orientation of the model is incorrect. In Blender, I have the top of the model going towards Z+, but when it renders in SkinnedSample, the top of the model renders towards Y-.
Added test tools and pipelines.
feedback from Ideasman42 added
added Stormcode’s tutorial site
SkinnedModelPipeline “Input Skeleton not found”
The skeleton root, “Spine”, has been pulled out