Archived

This topic is now archived and is closed to further replies.

Prairie

Texture mapping an .X file

Recommended Posts

I have created an object in a 3d modeler and converted it to an X file. But, when I load it into my program it is all white?? I''m confused because when I look at it in the X file viewer it is gray. I''m using the D3DFile.h utility for the loading. And I was also wondering how to wrap a texture around an x object. I''ve done it with shapes I coded in, but never something I''ve loaded. Thanks in advance for any advice Prairie

Share this post


Link to post
Share on other sites
The white and gray issue is clear. The color of the shape depends on its material and the lights you set. The texture thing is different. It depends on the fact whether you store your texture coordinates in the .x file or not. When you store the texture coordinates in the .x file just call SetTexture for the shape and render it. If you don''t store the texture coordinates you have to compute them which is quite another story.

The last truth is that there is no magic(Feist)

Share this post


Link to post
Share on other sites