problems with textures showing properly

Jul 17, 2008 at 10:49 PM
Hello, thanks for the library, I'm just starting to play with it now.  I created an object in Blender with a texture and bones, and exported it to .fbx.  I used the code from one of the samples, but excluded the optional code, the one with Material.DiffuseColor, SpecularColor, and SpecularPower.  I also left out the part of the code with the lights.  When I run it, my model is all gray, so I thought it was the lights.  I added all the code for the lights from the sample and it is still all gray excpet with a light glare. 

I then added the diffusecolor, specularcolor, and specularpower, adding variables in place of the hard-code so I can manipulate them in realtime.  I added some key states within the Update() so i can play around with the settings in-game but I cannot find the right combination to properly match my original texture.  Could you please help me so I can just display my model with textures without going through the whole Material.(things) and playing with all the light settings?  Thanks in advance.
Coordinator
Jul 18, 2008 at 4:08 PM
Hi. If I understand it correct, neither the material properties (diffuse, specular, specular power) or the diffuse texture are being correctly assigned to the model's material. When the model is processed its textures are get by name, in this case, the processor looks for a diffuse texture named "Texture", a normal texture named "Bump0" and a specular texture named "Specular0". Then, it assign these textures to the model's effect. I tried .FBX and .X models exported from Max and Maya, and their material were loaded correctly.

Your problem could be due to Blender isn't exporting the materials of your model, or because Blender is exporting it using different texture names. However I believe that the texture key name is assigned by model importer (the default FBX model importer), and if it is true, I'm not sure how it assign key names to the textures that were exported.
Nov 16, 2008 at 1:35 PM
Hi,

seems I am having a similar problem as mamba. I also made an object in Blender and the texture links did not get exported in the .fbx file. I then used the commands

basicEffect.DiffuseMapEnabled = true;
basicEffect.DiffuseMap = diffuseTexture;
basicEffect.NormalMapEnabled = false;
basicEffect.SpecularMapEnabled = false;

in the MeshPart Loop within the Draw function of XNAnimationsample to manually override the textures in the loaded model with the one fitting to the Blender model. On the playermarine.fbx Model, the overridden diffuse texture shows up as expected (not fitting due to messed up UV coordinates, but with the correct color tones). On the Blender exported model, the colors are very light and a total black is shown as a light gray. Everything else works fine and the UV mapping is also correct on the Blender derived model. Any ideas?

Mamba: did you manage to solve your problem,yet?

Thanks in advance.