I really do apologise if this question has been asked before, but I recently created a model in Blender 2.63, exported it to an FBX file, and tried to display it in XNA (using 4.0 Refresh), but all that shows up is the standard XNA blank screen. My code for drawing the model is:
void RenderModel(Model model, Matrix world, Matrix view, Matrix projection)
{
foreach (ModelMesh mesh in model.Meshes)
{
foreach (BasicEffect fx in mesh.Effects)
{
fx.World = world;
fx.View = view;
fx.Projection = projection;
//fx.Texture = untagged;
//fx.EnableDefaultLighting();
}
mesh.Draw();
}
}
where
world = Matrix.CreateTranslation(Vector3.Zero);
view = Matrix.CreateLookAt(new Vector3(0, 0, 10), Vector3.Zero, Vector3.UnitY);
projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45), 800f / 600f, 0.1f, 100);
The above code worked for some other models I tried, so I'm pretty sure it's something wrong with the exported model. I exported the model from Blender using the XNA strict settings, and there are no animations, just a texture, which seems to be connected properly to the FBX from the text in the FBX file.
If anyone can tell me how I can create a simple model in Blender and make it usable for XNA, that would be great. Thanks a lot!
EDIT: Added program versions for Blender and XNA