UPDATE: It is apparently the BasicEffect that is the culprit here. I tried to use another effect (which I coded myself) and then it works!?!? )I kinda like the EnableDefaultLighting, though...)
So this question is now rephrased to: "what in the model exported by Blender can cause BasicEffect to fail to render the texture?".
I have imported this model into Blender and exported it to an .fbx file and imported it into my XNA project. The problem is that the model is pitch black (just as it is in Blender when I look at it in object mode) when drawn in XNA. I have verified that the texture really is there (and that only one iteration is made):
foreach (var mesh in _model.Meshes)
foreach (var part in mesh.MeshParts)
if (part.Effect is BasicEffect)
{
var be = part.Effect as BasicEffect;
using ( var stream = File.Create(@"c:\test.jpg") )
be.Texture.SaveAsJpeg(stream,2048,2048);
}
I have followed exactly the same procedure with other models and it has worked. Since the model looks good in Blender and the textures really makes it into XNA... what can be wrong here?
For what it's worth: one difference from what I'm used to is that these textures are not stored inside the .fbx but in a separate subfolder, but the XNA content importer finds them (I get an error if I try to remove them).
UPDATE: it may be important to mention that this model actually has three textures: diffuse, specular and normal maps. However, ONE of them should be projected by the BasicEffect, right?
UPDATE: a screen shot from Blender.
N
to bring up the transform-panel, scroll down to "Normals" and enable "Face" normals. That way you'll see if normals point in the right direction. Otherwise you might want to do a "Recalculate normals"). \$\endgroup\$