EGG-PALETTIZE(1)

NAME
egg-palettize - pack textures from various .egg models into palette images

SYNOPSIS
egg-palettize [opts] file.egg [file.egg ...]

DESCRIPTION
egg-palettize attempts to pack several texture maps from various models together into one or more palette images, for improved rendering performance and ease of texture management. It can also resize textures and convert them to another image file format, whether or not they are actually placed on a palette, and can manage some simple texture properties, like mipmapping and rendering format.

egg-palettize reads a texture attributes file, usually named textures.txa, which contains instructions from the user about resizing particular textures. Type egg-palettize -H for an introduction to the syntax of this file.

The palettization information from previous runs is recorded in a file named textures.boo (assuming the attributes file is named textures.txa); a complete record of every egg file and every texture that has been referenced is kept here. This allows the program to intelligently manage the multiple egg files that may reference the textures in question.

OPTIONS

-noabs
    Don't allow any of the named egg files to have absolute pathnames. If any do, abort with an error. This option is designed to help detect errors when populating or building a standalone model tree, which should be self-contained and include only relative pathnames.

-af filename
    Read the indicated file as the .txa file. The default is textures.txa.

-a filename
    Deprecated option. This is the same as -af.

-as script
    Accept the script specified on the command line as the contents of the .txa file, instead of reading a file on disk. This implies -nodb and -opt.

-nodb
    Don't read or record the state information to a .boo file. By default, the palettization information is recorded so it can be preserved between multiple invocations of egg-palettize. If you specify this parameter, all the egg files to be palettized together must be named at the same time. This also implies -opt, since there's no point in not making an optimal packing if you won't be preserving the state for future adjustments.

-tn pattern
    Specify the name to generate for each palette image. The string should contain %g for the group name, %p for the page name, and %i for the index within the page. The extension is inferred from the image type. The default is '%g_palette_%p_%i'.

-pi Do not process anything, but instead report the detailed palettization information written in the state file.

-s  Do not process anything, but report statistics on palette and texture utilization from the state file.

-R  Remove the named egg files from the previously-generated state data file.

-d dirname
    The directory in which to write the palettized egg files. This is only necessary if more than one egg file is processed at the same time; if it is included, each egg file will be processed and written into the indicated directory.

-dm dirname
    The directory in which to place all maps: generated palettes, as well as images which were not placed on palettes (but may have been resized). If this contains the string %g, this will be replaced with the 'dir' string associated with a palette group; see egg-palettize -H.

-ds dirname
    The directory to write palette shadow images to. These are working copies of the palette images, useful when the palette image type is a lossy-compression type like JPEG; you can avoid generational loss of quality on the palette images with each pass through the palettes by storing these extra shadow images in a lossless image type. This directory is only used if the :shadowtype keyword appears in the .txa file.

-dr dirname
    The directory to make map filenames relative to when writing egg files. If specified, this should be an initial substring of -dm.

-g group
    The default palette group that egg files will be assigned to if they are not explicitly assigned to any other group.

-gdir name
    The "dir" string to associate with the default palette group specified with -g, if no other dir name is given in the .txa file.

-all
    Consider all the textures referenced in all egg files that have ever been palettized, not just the egg files that appear on the command line.

-egg
    Regenerate all egg files that need modification, even those that aren't named on the command line.

-redo
    Force a regeneration of each image from its original source(s). When used in conjunction with -egg, this also forces each egg file to be regenerated.

-opt
    Force an optimal packing. By default, textures are added to existing palettes without disturbing them, which can lead to suboptimal packing. Including this switch forces the palettes to be rebuilt if necessary to optimize the packing, but this may invalidate other egg files which share this palette.

-omitall
    Re-enables the flag to omit all textures. This flag is normally on by default, causing nothing actually to be palettized, until the first time egg-palettize is run with the -opt flag, which turns off the omitall flag and thenceforth allows textures to be combined into palettes. Specifying this flag restores the original behavior of keeping every texture as a separate image (which is convenient for development).

-H  Describe the syntax of the attributes file.

-o filename
    Specify the filename to which the resulting egg file will be written. This is only valid when there is only one input egg file on the command line. If you want to process multiple files simultaneously, you must use either -d or -inplace.

-inplace
    If this option is given, the input egg files will be rewritten in place with the results. This obviates the need to specify -d for an output directory; however, it's risky because the original input egg files are lost.

-cs coordinate-system
    Specify the coordinate system to operate in. This may be one of 'y-up', 'z-up', 'y-up-left', or 'z-up-left'.

-inf filename
    Reads input args from a text file instead of the command line. Useful for really, really large lists of args that break the OS-imposed limits on the length of command lines.

-h  Display this help page.