Previous File TypeTXMP FILENext File Type
Texture Map - Level, Character and Message File

HexTranslationMeaning
01 1F 00 003100031-rl_1.TXMP
01 00 00 063level 3
rl_1name of the texture
000texture options 1; it's a bitset; the following bits are possible (values in dec):

0 - nothing
1 - MIP-mapping
2 - unknown; not used in Oni; (only used at runtime)
4 - U wrapping disabled
8 - V wrapping disabled
16 - unknown; seems to have no effect
32 - unknown; not used in Oni; (you will get a white image if you use this bit; only used at runtime)
64 - plays an animation back to back (frames 0 to n then n-1 to 0)
128 - plays an animation in random order (only used by an "electric arc" texture)

1016texture options 2; it's a bitset; the following bits are possible (values in dec):

0 - nothing
1 - changes the time reference for an animation (used f.e. for the "w1_case" texture)
2 - shade vertex; reads the high byte as env map (0x00 is "little", 0xFF is "much")
4 - transparency if the background color is black; reads the high byte as alpha (0x00 is transparent, 0xFF is opaque)
formula: TextureColor * TextureAlpha + ExistingScreenColor * (1 - TextureAlpha)
8 - adds the TextureColor to the ExistingScreenColor (used to make "light sources" like explosions and glares)
formula: TexureColor * TextureAlpha + ExistingScreenColor
16 - read from raw file byte swapped (only used for 16-bit uncompressed textures)
32 - used only at runtime to mark if the texture has been loaded or not
64 - unknown; looks like TXAN looping ON/OFF
128 - 16 bit blue (only SHIELD uses it)

000texture options 3; it's a bitset; the following bits are used (values in dec):

0 - nothing
1 - 16 bit alpha (only INVIS uses it)
2 - 16 bit red (only DADOAN_SHIELD uses it)

The last three bits have no effect on the texture itself but the colors of the 3D model to which the texture is applied. Each point gets a color based on current time and some coefficients for each color component. For example for invisibility green has 0.15, blue has 0.3 and red 0. (Thanks to Neo who figured that out.)

000unused bitset; always zero
80 00128width (= 128 pixel)
80 00128height (= 128 pixel)
01 00 00 001texture format; the following formats are possible:

0 - 16-bit uncompressed, with alpha (ARGB4444)
1 - 16-bit uncompressed, without alpha (RGB555; alpha bit not used)
2 - 16-bit uncompressed, with alpha (ARGB5551; only Iteration001/KS_shoulder uses it)
8 - 32-bit uncompressed, without alpha (RGB888; alpha bits not used)
 9 - compressed four times (S3TC/DXT1)

00 00 00 00not usedlink to a TXAN file; only used if the texture is the first pic of an texture animation
00 00 00 00not usedlink to a TXMP file; only used in connection with shade vertex effects
20 00 00 0032at this position starts the texture part in the raw file (PC only)
00 00 00 00not usedat this position starts the texture part in the sep file (Mac and PC demo only)
AD DEdeadnot used

Below you can see the pictures for this example. The first picture shows how it's stored in Oni, the second how you'll see it in the game.


Previous File TypeBack to File TypesNext File Type

Back to main page