txmake reads an image file (or multiple image files) called foo.format and creates a RenderMan texture file called foo.tex. The previous contents of foo.tex (if any) are silently overwritten. The following formats are supported for input files: BMP, DPX, GIF, HDR, JPEG, MayaIFF, OpenEXR, PIC, PNG, PPM, Pixar DeepData, Pixar Texture, SGI, TGA, TIFF, XPM, Z-File

txmake was written based on the IceMan image compositing engine, adding support for the following features: the ability to operate on large input images, all image computations are performed in floating point, multiple channels can be selected, and filters can now be applied as each successive level in a MIPmap or RIPmap are computed.

Texture

Wrap Mode

-mode <m>   Applies the <m> setting choice to S and T
-smode <m>  Applies the <m> setting choice to S
-tmode <m>   Applies the <m> setting choice to T

<m> Controls the texture values returned for texture coordinates outside the first ST tile.

The default is 'black'.

Image Resize

-resize <r>  Applies a resize operation to the nearest power-of-two size.

For simple textures or environment textures the resolution of the texture file is determined from the height and width of the image file and the operation specified by the resize option. If either the width or the height of the image is an exact power of two, that dimension is left unchanged. Any dimension that is not an exact power of two will be adjusted according to the resize operation. If the image is already a power of two in dimension, its size will be unchanged. There is no size limit for conversion other than the file type used and the machine resources performing the conversion.

Note that many file formats may have limitations on their storage type and size independent of txmake. TIFF and EXR are the most common types.

  • TIFF files converted to .tx may have better performance than other formats but are limited to the maximum size of 4GB
  • OpenEXR files may be larger and potentially slower but these have the fewest restrictions when converted to .tx as -format openexr 


<r> The resize operation may be one of the following:

Image credit NASA

The default is 'up'.

Resize Filter

 -filter <f>  Applies one of the follow filter choices when resized.

<f> Filter used to resize the image. The below options are available for resizing an image. Sharpening filters tend to be preferred for enlargements.

The default is 'catmull-rom'

Image Blur (-blur <f> / -sblur <f> / -tblur <f>)

-blur <f>    Applies the blur to both S and T directions
-sblur <f>  Applies the blur to S only
-tblue <f>  Applies the blur to T only

<f> Values greater than 1.0 blur the image.

The default is 1.0.

Bleed Alpha

-bleedalpha

Radially dilate pixel values around alpha mask, useful for texture baking. This gutter helps avoid sampling artifacts around ST seams.

Mipmapping

Mipmapping is used to improve texture aliasing and rendering performance by automatically choosing an appropriate texture resolution level from a pyramid based on viewing size and angle of the texture on screen. This can reduce processing time at the cost of details that would go unnoticed.

Mipmap Pattern

-pattern <p>

<p> can be one of the following: 

The default is 'diagonal'

Mipmap Source 

-mipfrom <s/n>

<s/n> can be one of the follow where using n is an integer.

The default is 'source'

User Mipmaps

-usermipmap <picnames>

The files in <picnames> correspond to the levels in the pyramid (first name in picnames = highest resolution level of the pyramid). Note that there are several rules for generating these "user mipmaps":

Mipmap Filter

-mipfilter <f>

<f> is the pixel filter used for mipmap creation. Select from the below:

The default is 'box'.

Environment Map

Lat-Long Map

-envlatl

Make a lat-long environment map.

Diffuse Convolution

 -diffconv <brdf,res,mip>

Txmake can produce side-band data for use in the control variates method of Monte Carlo integration. The side-bands are the convolution of a diffuse BRDF with an environment map. Only lat-long maps are supported. OpenEXR and TIFF files are supported.

Cube Map

-envcube

Make a cube environment map from 6 images, e.g.

txmake -format openexr red.png yellow.png green.png cyan.png blue.png magenta.png cubemap.exr

Environment cube maps are created with format specific layout:

Filed of View 

-fov <f>

<f> is a cube map field-of-view in degrees.

Ptex Cube Map

-penvcube

Make a ptex cube environment map from 6 images

Spherical Harmonic Bands

-shbands <n>

Embed <n> spherical harmonic bands.

Format

Image Format

-format <f>

<f> corresponds to the underlying texture image format (openexr is required for large, >4GB, resulting images):

A default of tiff is specified as a configuration option in the renderman.ini.

Data Compression

 -compression <c>

For the Pixar format <c> is:

For OpenEXR format <c> is:

The TIFF format always uses LZW compression. Pixar format defaults to 'lossless' compression while OpenEXR defaults to 'zip'.

Data Type

-byte / -short / -half / -float

Control the file format datatype.

Channel

-ch <#,#:#>

By default, the number and order of channels in the texture file depends directly on the set of channels in the image file. An RGBA picture will generate a four-channel texture, an RGB picture will generate a three-channel texture, and an R picture will generate a one-channel texture. The -ch option can be used to select and reorder the channels of the image file. The channel #'s are used to select the channels of the image file. Channels indexing begins at 0. For RGB, `-ch 1` will select only the green channel of the image file and puts it into channel 0 of the texture file. A list of numbers can be used to select multiple channels, for example, `-ch 0,1,2` and `-ch 0:2` will select the RGB channels of an image file while `-ch 2,1,0` will select those same channels but in order blue, red, green.

Display Window

-extraargs displaywindow

displaywindow only for exr input


Bump To Roughness

Bump to roughness requires all bump or normal maps to be converted to a *.b2r texture.

b2r textures contain 5 channels and are always generated in OpenEXR format as it provides the best compression ratios for half-float data.

-bumprough <f> <i> <n> <iu> <iv> <i>

A typical txmake invocation for a bump map:

txmake -resize round- -mode periodic -filter box -mipfilter box -bumprough 2 0 0 0 0 1 bump.tif bump.b2r

For a normal map:

txmake -resize round- -mode periodic -filter box -mipfilter box -bumprough 2 0 1 0 0 1 normalmap.tif normalmap.b2r

The filter and MIP filter need to be set to "box" to ensure the math works correctly.

Shadow Map (deprecated)

Shadow

-shadow

Make a shadow map from a z-image.

Min/Max Shadow Map

-minmaxshadow

Make a minmax shadow map.

Pyramid Shadow Maps

-pyramidshadow

Make a pyramid shadow map.

Command Line

Newer 

-newer

Do nothing if source is older than target texture.

Directory Map

-dirmap <s> -dirmapend

Apply dirmapping to input and output files. Multiple dirmaps can be specified. Syntax for <s> should look similar to RiOption "searchpath" "dirmap", e.g.:

[\"NFS\" \"z:/\" \"/mnt/\"] [\"NFS\" \"Z:/\" \"/mnt/\"]

Threads

-t:X

Use X threads. The default uses all threads.

Verbose

-verbose

Print updates as txmake executes.

Version

-version

Print version and exit.

Help

-help

Print usage and exit.