TXI files, or TeXture Information files, are text files that control and add special effects, shaders, animations, blending etc. for an assocated texture. I.E. pmbmm01.TXI would hold the information for pmbmm01.TGA.
An example for a txi is this(below example used for "animated" textures):
proceduretype cycle defaultwidth 128 defaultheight 128 numx 3 numy 3 fps 24 blending additive decal 1 // you can use this marker to make comments
Known TXI Code[edit | edit source]
|Code||Does it use alpha? (Y/N)||Type of code||Description||Example code||Example texture||Notes|
|blending||Yes & No||Parameter||Adjusts the blending options||
|cube||No||Definition||Defines that the texture is a CubeMap||
|Decal||No||?||Forces black areas of a texture to not appear.||
Changes the Environmentmap texture
(or "CubeMap_" texture)
The variable texture must be
a declared CubeMap.
(See cube above.)
Like envmap, but applies over the images bumpmap, making the reflection bumpy.
Adjusts the bumpmap texture
Defines that the texture is a<br\/> bumpmap (it is actually a normalmap<br\/> but game developers called it a bump)
for bumpmapping to actually work,
this texture has to be a normalmap
|bumpmapscaling||No||Parameter||scales the bumps? Presumably by ratios. So
1 is 1:1, 2 is 1:2, 3 is 1:3 etc.
must be used on a texture declared
as a bumpmap. (see above.)
ANIMATING TEXTURES[edit | edit source]
Although this might sound like quite something for this game, it isn't exactly as it seems. In the vanilla games, the
"animation" is only used for simple things, like blinking lights on computer terminals, or malfunctioning screens(such as the tutorial of TSL). While it can be used for things more advanced, it almost requires keeping the size of the frames to a minimum, since if the size of a single frame is 256x256, with say 8 frames, then the total texture size will be 2048x2048. It certainly is possible to go higher, although doing so might cause issues(say if a single frame of 1024x1024 is wanted).
Aside for what must be done to a texture to have this work, a few lines must be added to the associated txi file as well.
proceduretype cycle - makes the frames cycle.
defaultwidth 256 - the width of one frame.
defaultheight 256 - the height of one frame.
numx 2 - how many frames across.
numy 2 - how many frames up and down.
fps 6 - how fast the frames will cycle(i.e Frames Per Second).
Animated textures can also use some of the commands shown above, so long as it is set up correctly, i.e the texture has an alpha/transparency channel if the effect requires it - although the alpha layer must apply to every frame, unless the effect is supposed to change on each frame.
Notes[edit | edit source]
-Textures aligned as the photo above will cycle through each frame, going left to right, then doing the same for the bottom row. Frames aligned in a single row(such as if the entire texture has a height of 512, a width of 2048 and a frame size of 512x512, the frames will cycle in the same way, left to right.
-A problem that exists within the vanilla(i.e the 'animated' textures the game uses) textures, is that they cannot be edited, or even added to the override folder unedited, since this causes the game to misread them, since the frames are not aligned how the game reads them usually. If one would want to edit these, they would need to be almost completely redone for the game to read them correctly. In some cases, the txi information would be need to be redone as well, although some information can be gained from selecting a tpc file, and then clicking "Hex Viewer" in KotOR Tool. Then, in the box that appears, click the "ANSI" option. Some of the text will be the same as what is displayed above.