TIM Textures

Classic TIM

These are the classic PlayStation TIM type. Detailed info about the format is available at wiki.qhimm.com, but let's have a brief run-through here, as this will help us compare the classic TIM format to the abnormal TIM format used in Chrono Cross battle models.

The basic structure of a classic TIM is HEADER CLUT IMAGE. The HEADER gives basic info about the file. It is directly followed by the CLUT, or color lookup table. Then comes the IMAGE data, which is usually going to be a series of offsets into the CLUT.

HEADER...
10 00 00 00 ?? ?? ?? ??

  ?? ?? ?? ?? specifies bit depth and whether a CLUT is present. For more, see 
  http://wiki.qhimm.com/PSX/TIM_file
CLUT...
CL CL CL CL CX CX CY CY - CW CW CH CH RG BS RG BS
RG BS .. ..

 Where...
  *CL = CLUT Length in bytes.
  *CX, CY, CW, and CH are beyond the scope of this entry; for more, see
   http://wiki.qhimm.com/PSX/TIM_file
  *RG BS are the red, green, blue, and special transparency values for each color in the CLUT.
   Note that these byte pairs are read as their constituent bits, so one nybble (half-byte)   
   doesn't necessarily correspond to each color specification; one letter is used to represent 
   each nybble for ease of labeling.
IMAGE...
IL IL IL IL IX IX IY IY - IW IW IH IH I1 I2 I3 I4
.. ..

 Where...
  *IL = Length of the IMAGE data in bytes.
  *IX, IY, IW, and IH are beyond the scope of this entry. Once again, check the qhimm wiki for 
   more in-depth info.
  *I# = Offsets into the CLUT. One byte (8 bits) is required for each pixel because the TIM 
   header specifies 8 bits-per-pixel.
  • Warning: Some TIMs lack an internal CLUT, and the IMAGE data simply refers to a CLUT outside of the file. This is the case with room background graphics.

Altered Format TIM

The .TIM files used for battle model textures differ from the classic format, preventing tools like TIMViewer and PSicture from detecting them. Like the classic TIMs, the altered format TIMs consist of a HEADER, CLUT, and IMAGE data -- only the headers for each element are different. Thus it should be possible to run a bitmap through TIMViewer and turn it into a classic TIM, then take the "flesh" of the CLUT and IMAGE data from that classic TIM and insert it around the "skeleton" of an existing altered format TIM's headers. The resulting chimera TIM should be usable by the game for battle models. This method will be attempted for the Compendium's Make Your Magus project.

HEADER...
02 00 00 00 ?? ?? ?? ??
CLUT...
CL CL CL CL ?? ?? ?? ?? - ?? ?? ?? ?? ?? ?? ?? ??
?? ?? ?? ?? RG BS RG BS

 Where...
  *CL = CLUT Length in bytes.
  *?? appear to express all the information contained in a classic TIM CLUT header, but with  
   an additional 8 bytes of unknown function interspersed. 
  *RG BS are the red, green, blue, and special transparency values for each color in the CLUT.
   Note that these byte pairs are read as their constituent bits, so one nybble (half-byte)   
   doesn't necessarily correspond to each color specification; one letter is used to represent 
   each nybble for ease of labeling.

For quick reference, the RG BS CLUT data in an Altered Format TIM typically occurs between addresses 0x1C and 0x21C.
IMAGE...
?? ?? ?? ?? ?? ?? ?? ?? - ?? ?? ?? ?? ?? ?? ?? ??
I1 I2 I3 I4 .. ..
Absolutely nothing is known about the IMAGE header at this time; it does not seem to  
communicate any of the same information as the IMAGE header in a classic TIM -- not even the
length of the IMAGE element seems to be specified. 

For quick reference, the I# image data in an Altered Format TIM usually follows address 0x22C.

Original content and layout Copyright © 2003, 2004, 2005, 2006 Chrono Compendium

Official copyrighted material from Square Enix used without permission.

Powered by MediaWiki

User Login