Skip to main content
GameDev.net gamedev.net
🔒 Locked

Texture question

Started by alex_dergian Dec 13, 2005 at 12:40 PM 2 replies 500+ views
Original Post
alex_dergian
alex_dergian
Is there a way to extract texture data from a x file mesh without useing the matiral buffer, like filename, cut posstions wrap vortexs ect.?
Armadon
Armadon
If you are really anxious to get the texture information without using the conventional way of loading the x file you could just open the file using some FileStream object or something else and then looking for extensions such as .jpg, .gif and many more and then using D3DXGetImageInfoFromFile() to get the texture information without "loading" the x file.

I hope this helps.
Take care.
alex_dergian
alex_dergian
But that only really helps with file name still donsn't clearify how to extract the points in the texture file that are used and what vortex they should go to on the mesh
jollyjeffers
jollyjeffers
You will have to load the .X file if you want to see the materials/textures it represents. The textures are references inside an .X file, but the actual texture data is contained seperately.

Loading it doesn't necessarily mean you have to load all the geometry - you could manually parse the .X data and extract only the material headers if it were important. The stock implementations provided by Microsoft load all or nothing as far as I'm aware.

I'm not too sure about the other parts of your question though. If you want to know which pixels are used (or which aren't) then that can get very complicated very quickly - and there isn't a built-in way to compute this.
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.