Maketx is a command-line utility to convert images to tiled, MIP-mapped textures, similar to txmake in Pixar Renderman. It is part of OpenImageIO (http://www.openimageio.org) and was developed by Larry Gritz at Sony Pictures Imageworks.

The maketx command with verbosity, converting from a tif to a tx.

A tutorial that shows the workflow involved when working with .tx files can be found here.

When pre-processing your texture files with maketx make sure you add the --oiio flag which will generate TX files optimized for Arnold that can render even faster by forcing the tile size to be optimal for OpenImageIO (64x64). It also stores channels interleaved (RGBARGBA...) making them faster to read and enables constant color detection: if the image is a constant color it will convert it to a tiny single color .tx file.Additional metadata and an image hash (fingerprint) are embedded by default. The fingerprint lets OIIO detect duplicate images (not tiles) when opening new files. Generally using maketx will result in better texture I/O performance than using txmake.

Note also that if you need your textures to stay compatible with renderman, there is a --prman switch that will ensure the tile size matches what renderman expects.

If the output color space is not the same bit depth as input color space, then the data format needs to be set to the proper bit depth using the -d option.

The best workflow is to always generate .tx files using maketx as a last step before rendering, and use those .tx files just for rendering. This will ensure the best performance. Also ensure that your textures are in linear color space before converting them with maketx.No information is lost when converting High Dynamic Range images to the .tx format.

Embed SHA-1 hash of pixels in the header (deprecated. hashes are always computed).

--prman-metadata

Add prman specific metadata

--constant-color-detect

Create 1-tile textures from constant color inputs

--monochrome-detect

Create 1-channel textures from monochrome inputs

--opaque-detect

Drop alpha channel that is always 1.0

--stats

Print runtime statistics

--mipimage %s

Specify an individual MIP level

Basic modes (default is plain texture)

--shadow

Create shadow map

--envlatl

Create lat/long environment map

--envcube

Create cubic env map (file order: px, nx, py, ny, pz, nz) (UNIMP)

Color Management Options

--colorconvert %s %s

Apply a color space conversion to the image. If the output color space is not the same bit depth as input color space, it is your responsibility to set the data format to the proper bit depth using the -d option. (choices: linear, sRGB, Rec709)

--unpremult

Unpremultiply before color conversion, then premultiply after the color conversion. You'll probably want to use this flag if your image contains an alpha channel.