Sign in to follow this  

mystery directx texture file

This topic is 3728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i have a mystery directx texture file, i know it has somethign to do with directx and I know this header file structure of it: I'm reading every 4 bytes, thats 32 byte header in total: [4] initiate code [4] dimX [4] dimY [4] image size (minus 32 byte header) [4] type [4] mipmaps [4] alpha [4] value thats always 0 (filler?) I want to be able to extract the image part of it, and edit in some kind of editor. Any ideas? Here are a couple samples of this mystery texture file all following this same format: http://tzfiles.com/users/helloagain/mystery1.file http://tzfiles.com/users/helloagain/mystery2.file http://tzfiles.com/users/helloagain/mystery3.file http://tzfiles.com/users/helloagain/mystery4.file http://tzfiles.com/users/helloagain/mystery5.file -thank you

Share this post


Link to post
Share on other sites
Hi there dude can you say anything more about this file? Can you post a picture or code or something? From what you have posted there isn't much to go on? Is it an LPDIRECT3DTEXTURE, or bitmap file etc? Are you using some picture library or something like a png library. The DimX & DimY are probably the texture's izes, but I can't think of a DirectX function where you actually need the size of the file in bytes.

Also probably not a good idea to have it as a direct download esp' as we don't realy know anything about it.

Share this post


Link to post
Share on other sites
Hi I did not create this texture file, I am simply trying to figure out how to edit the texture inside of it, by figuring out how to decompress it and edit it, the above information is all I know about the file, thats it.
-Consider this a hacking type question, I give you all the information known about the file, some sample files, and using all your knowledge about programming/directx/textures/whatever, figure out how to extract the texture out of it. This is my question.


from my understanding let's say a texture has these dimensions:
64 by 64
well that would be 8 mipmaps

and the size of the first mip map should be:
64 * 64 * bpp (bytes per pixel)

one of my smaller mystery files I provided has a size of 32 by 32, and 7 mipmaps, well obviously the size of the first mipmap with at least a byte per pixel of 1 would be 32 * 32 * 1 = 1024

but the file itself is only 728 bytes long.. or something like that..

obviously it is being compressed somehow, maybe in one of the DXT1-5 formats
this is where i would any of your insights


I know the header's file structure just by analyzing it and comparing other files in hex, so I was hoping some of you could read this information and it could yield any insight to how it is compressed, or what type of directx texture it is... how I can ulitmately extract the largest mipmap from it and edit it.

-thank u

Share this post


Link to post
Share on other sites
If it's a texture file to be used in a game then there aren't too many formats to choose from: raw RGBA, DXT1, DXT2/3, DXT4/5, etc. Just brute force it with an image viewer like IrfanView or editor like GIMP, these apps support opening raw image formats without the header.

Share this post


Link to post
Share on other sites
Hi i downloaded both programs, I tried doing file=>open as-> RAW file
in IrfanView but it game me an error of not having enough memory....
I did this on mystery4.file


I opened a file with GIMP, and it simply displayed some kind of line picture, like a scribble of lines, how do I determine what type of compression it is with GIMP, other than just displaying it?


Could you try opening mystery4.file (only the raw part without the header) in IrfanView and tell me what happens since I can't or tell me how?

thank you

here is mystery4.file without the header:
http://tzfiles.com/users/helloagain/mystery4.raw

Share this post


Link to post
Share on other sites
wotsit.org is a good place to start. Cross reference your known patterns against some common file formats.

If you're very sure it's a DirectX-specific format then you need this: DDS File Reference.

Also, if you got this file from a commercial game it could be a bespoke format optimized for their technology. They may not want you 'borrowing' their assets as well...

Jack

Share this post


Link to post
Share on other sites

This topic is 3728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this