Apply bone tranforms when importing FBX in XNA

Posted by hichaeretaqua on Game Development See other posts from Game Development or by hichaeretaqua
Published on 2012-11-27T15:12:01Z Indexed on 2012/11/27 23:32 UTC
Read the original article Hit count: 267

Preconditions: I have some models, that does only contain some meshes and one texture. There is no animation within the model. An example: a model of a table.

I want to draw the Model with a custom effect, so I have to swap the effect after loading the model. In order to draw them correctly, I have to apply the bone transformation manually on each draw for each mesh and effect as can be seen here. So there are two questions:

  1. Is there a option during import that allows my to apply the bone transformation on all vertices, so that during draw call I should not have to do this?
  2. Is there a option during import that merges all vertices into a Vertex- and IndexBuffer, that allows me to draw the whole model with just one call?

I'm pretty sure that the build-in "Autodesk FBX - XNA Framework" does not support this features, but maybe there is an other imported available or an other possibility I missed.

The aim is to speed up rendering a little bit especially by using instancing. So having one VertexBuffer to draw at one time would be pretty nice.

© Game Development or respective owner

Related posts about XNA

Related posts about models