Switching from txmake to OpenImageIO

RenderMan ships with two OpenImageIO binaries, rmanmaketx and rmanoiiotool. They are named such so as to not conflict with any other maketx or oiiotool binaries you may have in your path. RenderMan currently ships with a custom build of OpenImageIO v2.4.12.

Note that the location of flags is different between txmake, maketx, and oiiotool:

txmake

txmake <flags> input output

maketx

maketx <flags> <input> <output>

oiiotool

oiiotool <input> <flags> -o{tex,env,bump}<:flags> <output>

Here is a concordance of txmake and OpenImageIO command flags. maketx and oiiotool have many other features (documented in their documentation), this only covers flags with txmake equivalents:

txmake flag

rmanmaketx / maketx equivalent

rmanoiiotool / oiiotool equivalent

Notes

none

--prman

:prman_options=1

txmake will automatically include appropriate metadata

-envlatl

--envlatl

-oenv

 

-mode <mode>

--wrap <mode>

:wrap=<mode>

 

-smode <mode>

--swrap <mode>

:swrap=<mode>

 

-tmode <mode>

--twrap <mode>

:twrap=<mode>

 

-byte

-d uint8

-d uint8

 

-short

-d int16

-d int16

 

-half

-d half

-d half

 

-float

-d float

-d float

 

-resize <mode>

--resize, --keepaspect

:resize=1, :keepaspect=1

Resizing should always be enabled to produce proper RenderMan-compatible textures. OpenImageIO’s resize flag matches the behavior of txmake’s -resize up-. Adding the keepaspect flag will match the behavior of -resize up

-filter <name>

--filter <name>

:filter=<name>

OpenImageIO does have independent control for the resizing and mipmapping filter. The filter set here will be used for both. OpenImageIO supports a different set of filters than txmake does, see the tools’ respective docs for details.

-mipfilter <name>

--filter <name>

:filter=<name>

OpenImageIO does have independent control for the resizing and mipmapping filter. The filter set here will be used for both. OpenImageIO supports a different set of filters than txmake does, see the tools’ respective docs for details.

-compression <type>

--compression <type>

--compression <type>

 

-compressionlevel <level>

--compression <type>:<level>

--compression <type>:<level>

 

-format <format>

--format <format>

:fileformatname=<format>

If not specified, an attempt will be made to infer from the filename

-ocioconfig <name>

--colorconfig <name>

--colorconfig <name>

Will also read from the OCIO environment variable

-ocioconvert <inspace> <outspace>

--colorconvert <inspace> <outspace>

--colorconvert <inspace> <outspace>

 

-ociodither

none

--dither

 

-bumprough

--bumpslopes

-obump:

 

-verbose

-v

-v

 

-blur

none

--blur <width>x<height>

 

-sblur

none

--blur <width>x<height>

 

-tblur

none

--blur <width>x<height>

 

-checknan

--checknan

--fixnan error

 

-fixnan

--fixnan box3

--fixnan box3

 

Example texture command in txmake, maketx, and oiiotool:

txmake

txmake -float -mode periodic -resize up -format tiff -filter catmull-rom -compression dwaa -compressionlevel 45 input.png output.tex

maketx

rmanmaketx --prman -d float --wrap periodic --resize --keepaspect --format tiff --filter catmull-rom --compression lzw input.png output.tex

oiiotool

rmanoiiotool input.png -d float --compression lzw -otex:prman_options=1:wrap=periodic:resize=1:keepaspect=1:fileformatname=tiff:filter=catmull-rom output.tex

Example environment map command in txmake, maketx, and oiiotool:

txmake

txmake -float -mode clamp -resize up- -format openexr -filter gaussian -compression dwaa --compressionlevel 45input.png output.tex

maketx

rmanmaketx --prman --envlatl -d float --wrap clamp --resize --format openexr --filter gaussian --compression dwaa:45 input.png output.tex

oiiotool

rmanoiiotool input.png -d float --compression dwaa:45 -oenv:prman_options=1:wrap=clamp:resize=1:fileformatname=exr:filter=gaussian output.tex

Example bump roughness map command in txmake, maketx, and oiiotool. Note the following differences:

  • Bump roughness maps created by txmake will have slope values twice as high as those created by OpenImageIO. Multiply the scale value by 2 when using OpenImageIO. The Texture Manager UI will do this for you.

  • Bump roughness maps created by OpenImageIO default to the inverse of maps created by txmake. The Texture Manager UI will handle this for you.

  • OpenImageIO’s default slope filter is sobel, which may cause some ringing artifacts. txmake uses centraldiff. The Texture Manager UI will handle this for you.

  • OpenImageIO does not yet have a Gaussian Refit flag.

txmake

txmake -float -mode periodic -resize up- -format openexr -compression zip -bumprough 2 0 0 0 0 0 input.png output.tex

maketx

rmanmaketx --prman -d float --wrap periodic --resize --format openexr --compression zip --bumpslopes --bumpscale 4.0 --bumpinverts --bumpinvertt --slopefilter centraldiff input.png output.tex

oiiotool

rmanoiiotool input.png -d float --compression zip -obump:prman_options=1:wrap=periodic:resize=1:fileformatname=exr:bumpscale=4.0:bumpinverts=1:bumpinvertt=1:slopefilter=centraldiff output.tex

(note that the invert s and invert t values are swapped between txmake and OpenImageIO)