Sign in to follow this  
DarkZoulz

Skinned meshes in XNA (.X format)

Recommended Posts

Hello, How can I load and play animated meshes in XNA? I have seen the skinned mesh sample at the creator's club, but it only uses FBX meshes? I want to be able to use X meshes that I have exported from truespace. Any help would be much appreciated!

Share this post


Link to post
Share on other sites
XNA seems mainly geared towards the FBX format, but as I recall it also supports X. Why not simply give it a try and see how it works out?

Share this post


Link to post
Share on other sites
I actually got a X file with animation running with the skinned mesh sample on creator's club. But it seems to mess up the model rather badly. It looks like some kind of snake or something. Pretty nasty polygon soup. :(

I have also looked into the collada loader in Dungeon Quest (http://benjaminnitschke.no-ip.info/), but it's so tightly integrated into the game. It will take some time to extract it into a seperate lib.

I have started looking into Blender now, but it really isn't our artists first choice. He is used to truespace and won't be as productive with blender. I found a nice article about creating content for XNA with blender though: http://www.stromcode.com/2008/03/10/modelling-for-xna-with-blender-part-i/

I can't believe it is this hard to export content from a 3D package into XNA. It's always animation that seems to be the problem. Static geometry is easy to export.

Share this post


Link to post
Share on other sites
Quote:
I can't believe it is this hard to export content from a 3D package into XNA.


Well, it is indeed tailored to Autodesk's products, but at least it's a step up from the old X approach. Perhaps the FBX converter might work for truespace file formats?

Share this post


Link to post
Share on other sites
Quote:
Original post by remigius
Quote:
I can't believe it is this hard to export content from a 3D package into XNA.


Well, it is indeed tailored to Autodesk's products, but at least it's a step up from the old X approach. Perhaps the FBX converter might work for truespace file formats?


Ah, an official converting tool from autodesk. It only seems to support 3ds, dxf and obj files though. Truespace can export to 3DS, but does that format support skeletal animation?

Btw, are there any guidelines that graphics artists should follow when rigging a model for use in games. I know about the limit on bones and influences per vertex. Does anyone have any experience setting up a functioning art pipeline for their game? Would be very interesting to know.

Share this post


Link to post
Share on other sites
Quote:
Ah, an official converting tool from autodesk. It only seems to support 3ds, dxf and obj files though. Truespace can export to 3DS, but does that format support skeletal animation?


According to this thread it supports only keyframed vertex blend animations and isn't a particularly good format. From my limited knowledge DXF and OBJ also aren't suitable for skeletal animation, so you might be stuck with X for Truespace.

A start would be to export to textual X (so non-binary) and see if the bones and animations are exported correctly. Next, try looking at the world transforms generated by the animation player to see if those make sense. Maybe that'll help in tracking down the problems you're having with X.


Quote:
Btw, are there any guidelines that graphics artists should follow when rigging a model for use in games. I know about the limit on bones and influences per vertex. Does anyone have any experience setting up a functioning art pipeline for their game? Would be very interesting to know.


We've got two distinctly different XNA based pipelines set up for two projects right now, which goes to show how much the pipeline depends on what the project calls for. There is no "right way" to do it afaik. In fact, I realize I haven't really come across anything like best practices yet. If anyone has something to share on this, please go right ahead [smile]

For all its complexities, this is where the XNA content pipeline really shines though. You can start off with the built-in FBX loading for static meshes and drop in additional content processors as the project requires more custom functionality. The ability to manage the content and processors directly in the IDE takes another good bite out of the difficulties in creating art pipeline tools from scratch.

As for the art guidelines, these depend on what your XNA pipeline supports and can be extended by customizing the XNA content pipeline. In theory you could add processors and importers for just about anything, but mostly we found the default stuff works out fine. We had little to no problems animating some models that weren't designed for XNA, or even realtime rendering in the first place.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this