Saturday, 30 October 2010

Finished converting to XNA 4.0

At last I have done the final bit so that I can say I have everything in XNA 4.0 that I had in XNA 3.1

This final part was not a code change to the game but is a way to get animations from my models created in Blender in to XNA. In XNA 3.1 the FBX importer could read multiple takes from one FBX file and I took advantage of that to import all the animations. That is no longer built in to the FBX importer.

I am rather pleased with my solution. It is much more elegant than before. I have created myself a WinForm based application that can read FBX files created from Blender.  It can split them in to one file per take and export the animation key frames in to the format I need.

Compared to games it is not a very pretty presentation.  Functional with a text status window.

I can create a config file per model so that the extraction, conversion and renaming of takes, to match my in game requirements, is reproducible.  I should probably have done it this way in the first place.

If you are interested the source code can be downloaded from:

I can now remove a lot of redundant code from my game editor.

Edit: I spoke too soon.  The animations do not work properly from XNA 4.0 so I still need an XNA 3.1 utility just to get the animations right.  The game will still be in XNA 4.0!  I'm trying to find an alternate exporter for Blender or other method to be able to use only XNA 4.

No comments: