PostMeridian

Hi, i have a .x model with a single texture skin and using the basic code to display it in xna shows only the model with no texture applied. I can load and see the model properly in blitz3D which was the package i was using before xna.

The spacewar models work fine and I can't see anything obviously wrong, especially as it works in both dxviewer and blitz3d.

Does anyone have an idea what could be wrong

Thanks.



Re: XNA Game Studio Express Texture not displaying on 3D model

Shawn Hargreaves - MSFT

Could you post the code you are using to display this, maybe along with a copy of the model itself





Re: XNA Game Studio Express Texture not displaying on 3D model

PostMeridian

Hi, a link to the model + texture is on my website, it's still under construction so there's only the one link.

The code I used is straight from the help files for displaying a model, no modifications at all. The model is loaded into the content pipeline and the texture is located in the same directory etc.

Thanks.





Re: XNA Game Studio Express Texture not displaying on 3D model

Shawn Hargreaves - MSFT

The model actually seems ok, but the lighting properties are set rather strangely in your material: specifically the specular power is 0.1. Specular power should typically be somewhere 4 or up (the higher it is, the tighter and more focused the light glints will be). Having it so low creates crazy flickery lighting that makes it hard to see the texture, but when I changed the specular power to 16, everything looked ok.

I just hand-edited the X file to alter this, it's the number on its own on the second data line in this part:

Material {
0.588235;0.588235;0.588235;1.000000;;
0.100000;
0.900000;0.900000;0.900000;;
0.000000;0.000000;0.000000;;






Re: XNA Game Studio Express Texture not displaying on 3D model

PostMeridian

You're a class act shawn, that's brilliant.

Thanks very much.