Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help IWI Header
#1
Is there any way to see what format of DDS is in a IWI file (Like DXT1 or DXT5) ? Well if anyone know please tell me.
Reply

#2
Sure,

here is snippet from my code.


Code:
    struct IWIHeader{
        BYTE DTX_Type;
        BYTE flags;
        short x;
        short y;
        short misc;
        int blockoffsets[4];
    };

    struct IWIHeader_MW2{ // mw3 also
        short dunno;
        short dunno1;
        BYTE DTX_Type;
        BYTE flags;
        short x;
        short y;
        short misc;
        int blockoffsets[5];
        int dunno2;
    };

Code:
    enum{
        IWI_ARGB8 = 1,
        IWI_RGB8,
        IWI_DTX1 = 11,
        IWI_DTX3,
        IWI_DTX5
    };
Reply

#3
Code:
IWI (Infinity Ward Image) File Format
Length     | Position | Description
---------------------------------
0x3    | 0x0       | Contains the text 'IWi' in ASCII form
0x1    | 0x3       | The version of the IWI 0x5 = COD2, 0x6 = COD4, 0xD = BO (I think), 0x8 = MW2/MW3
0x1    | 0x4       | Unknown, not sure.
0x1    | 0x5       | The flags of the data [If (flags & 0x3) == 0x3, this image has mipmaps]
0x1    | 0x6       | The usage flag. [0x0 = Color image, 0x1 = Skybox collection, 0x4 = Normal Map, 0x09 = Skybox collection (w/ alpha)
0x1    | 0x7       | Unknown, not sure.
0x2    | 0x8       | True format. [0x1 = ARGB8, 0x2 = RGB8, 0x3 = ARGB4, 0x4 = A8, 0x7 = JPG, 0xB = DXT1, 0xC = DXT3, 0xD = DXT5] // Credits to Denton Woods
0x2    | 0xA       | The width of the image (in pixels)
0x2    | 0xC       | The height of the image (in pixels)
0x2    | 0xE       | Unknown, not sure.
0x4    | 0x10      | The file size of the of the file (including header)
0x4    | 0x14      | The offset to the texture
0x4    | 0x18      | Offset to the 1st mipmap
0x4    | 0x1B      | Offset to the 2nd mipmap

Credits to master131, Denton Woods and Matej Tomk.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#4
Thanks both im just trying to make a iwi fixer/header creator so if the size or resolution of the iwi file is more then the game doesnt crash. What does that mean? well its not much useful, but if developed correctly with this we could do a plugin to create iwi's directly or do a HD texture pack.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help IWI Header (help again please) kokole 6 3,171 07-20-2012, 23:05
Last Post: kokole
  ItsMods (mini) header IMTHEBOSSS 19 10,021 01-24-2011, 15:47
Last Post: IMTHEBOSSS
  [Release] ItsMODS Xmass Header [MPGH]House 7 3,555 12-24-2010, 00:58
Last Post: Cgallagher
  [GFX] its mods header d0h! 3 3,307 11-07-2010, 02:20
Last Post: Cgallagher

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.