How to Best Optimize up Model Transforms, Import 3DS Animations Into XNA 4.0?

Posted by Jason R. Mick on Game Development See other posts from Game Development or by Jason R. Mick
Published on 2012-04-12T17:33:28Z Indexed on 2012/04/12 17:42 UTC
Read the original article Hit count: 407

Relative beginner to XNA, but trying to build a multi-purpose (3D) game frameworking in XNA 4. Been using the Reed (O'Reilly) and Cawood/McGee (McGraw Hill) guides.

My question is multi-faceted and involves how to most efficiently handle models.

I'm using 3DS Max 2010 with kw-Xport to ship out my models as .X files.

Solved an early problem by using my depth stencil state. My models are now loading properly (yay!) and I have basic bounding working, I just want to optimize transforming models and get animations working as a next step.

My questions on models are:

1. Do you have any suggestions for good resources on exporting 3DS animations to XNA?

I've seen some resources on how to handle animations in XNA, but most skimp on basic topics of how to convert multi-animation 3DS files. For example how do I take one big long string of keyframed animations (say running, frame 5-20, climbing frames 25-45, etc.) and turned them into named XNA animations. To my understanding every XNA animation has to have a name, but I haven't seen any tutorials on creating a new named animation from a subset of frames.

2. Is it faster to load a model once and animate/transform that base model on the fly @ draw time, or to load multiple models?

My game will have multiple enemies, and I've already seen some lagginess in XNA, so II want to make my code efficient...

3. I've heard people on app hub talking about making custom content processors for models-- what is the benefit of this? Does it speed up transforming or animating the models?

If so, can you point me towards any good (model-centric) tutorials? (I've built a custom height map content processor to generate terrain, following Cawood's examples, I'm just a bit confused as to how a model content processor would be implemented.)

© Game Development or respective owner

Related posts about XNA

Related posts about xna-4.0