TexConv

Overview

TexConv converts an image file in the Truevision Graphics Adapter (TGA) format into a TPL file according to the specifications in a script file.

Using the Tool

TexConv is executed by the following command.


TexConv (TCS file) (TPL file)

A TGA file is not directly specified as an argument to TexConv. Instead, specify a texture conversion script (TCS) file, which contains the path of the TGA file to convert as well as other settings.

Texture Conversion Script File

An example texture conversion script (TCS) file is given below. For more information, see the Revolution Texture Palette Library (TPL) (Graphics_Programmer's_Guide/TPL.pdf).


					; Comments start with a semicolon and continue to the end of the line

path = c:/level1/mario/			; Sets the path of the directory in which files exist
					; If path is NULL, the full path is required in the filename
					; path will be attached to all of the filenames that come after
					; path can be set on any line
					; path can be an absolute or relative path

file    0  =  marioHead_rgba8.tga
					; The complete filename is
					; c:/level1/mario/marioHead_rgba8.tga
image   0  =  0, 0, RGBA8		; With image0[RGB]=file0 and image0[A]=file0, convert into RGBA8
					; 
texture 0  =  0, x			; With TPL file texture 0, the image index is image0
					; This is not a color index texture, so the CLUT index is "x"
					; 
					; 

path       =  d:/temp/mario/		; Change the path
file    1  =  marioArm_rgb565.tga
					; The complete filename is
					; d:/temp/mario/marioArm_rgb565.tga
image   1  =  1, x, RGB565, 0, 3, 0
					; Generate mipmaps 0 to 3 (four levels of detail) and remap to 0
texture 1  =  1, x

file    2  =  marioFoot_ci8.tga
image   2  =  2, x, CI8			; Convert to CI format
palette 0  =  2, RGB565			; Create palette 0 from image 2
					; Convert palette entries into RGB565 format
texture 2  =  2, 0			; texture 2[RGB] = image 2,
					; texture 2[CLUT] = palette 0

path        = NULL			; No path setting
file    3   =  c:/marioBody_i8.tga
					; The full path is required here
image   3   =  3, x, I8, GX_REPEAT, GX_REPEAT
					; TexConv automatically converts RGB input into intensity output.
					; The wrapping mode can be configured for S and T to repeat.
					; The wrap mode can be set in the same way as the mipmap arguments.
					; 
					; 
					; 
texture 3   =  3, x

Basic Formatting Rules

Script files have the following basic rules.
- Spaces are ignored. Both "image1=1" and "image 1 = 1" are considered to be identical.
- Text is parsed line by line. A line ends with a newline character and cannot contain more than 255 characters.
- Images, textures, and palettes can be listed in any order, as can their indices. TexConv sorts each list in ascending order before converting them.
- Comments start with a semicolon and continue to the end of the line.
- Unspecified elements are written as "x". For example, "image 1 = 1, x, RGB565" would describe an image without an alpha plane. Writing "texture 1 = 1, x" would describe a texture without a palette.
- The directory path name is specified as either an absolute path or a relative path from the current directory.

Revision History

2008/07/29 Initial version.


CONFIDENTIAL