RMS "it"
|
Introduction
Pixar's Image Tool ("it") has a scripting interface based on TCL (Tool Command Language)
and a language called IO. This page presents a few TCL scripts the reader might find useful. The
reader should review the tutorial, Present Working Directory
The Image Tool has a console that will accept commands, either those that are native
to "it" or custom commands defined in
To change directory use the
|
Saving "it" Images as JPEG files
The script in listing 1 enables an image to be saved as a jpeg. A description of the basic way the
script can be used is given in the tutorial
"RMS:Setup for Mel, Rman, Slim & the Image Tool".
The proc ( % saveJPG "test.jpg" Aternatively, as shown in figure 3, the gamma and quality may be explicitly set.
Listing 1 (saveJPG.tcl)
|
Saving All ImagesThe script in listing 2 enables all the images in a "it" catalog (figure 4) to be saved as a sequence of number jpeg files. The script automatically saves the images in a date and time stamped directory. For example,
would result in the creation of a directory, within the present working directory, with a name of the following form, Catalog_Jan31_13_06
This script also sets gamma to 2.2 and jpeg quality to 100%. Those default values may also be explicitly set as shown in figure 5. |
|
Listing 2 (saveAll.tcl)
|
Resizing an Image
The script in listing 3 implements a proc named % resizeImage
The resized image is added to the catalog.
% resizeImage 500
The resized image is added to the catalog.
% resizeImage 450 "image_name.ext" The resized image is added to the catalog and saved to disk. |
Listing 3 (resizeImage.tcl)
|
Creating a Stereo AnaglyphListing 4 provides a script that reads two tif files and combines them into a anaglyph (figure 6).
It is assumed the tifs were rendered using Maya's dual cameras. The script expects to
read and combine tifs contained in directories named
/stereo |_ renderman |_ jack |_ images |_ left | |_ jack.0001.tif | |_ right |_ jack.0001.tif
Renaming the shape nodes of the Maya's dual camera, figure 7, will ensure the
"left" and "right" directories will be created within the
Before using the script check the % mayaStereo jack 1 The number following the command tells the script which frame you wish to read. To combine a sequence of tifs use the following command, % mayaStereo jack -1 Since -1 is not a valid frame number the script "knows" you wish to read all the tifs from the "left" and "right" directories. |
Listing 4 (mayaStereo.tcl)
|
© 2002- Malcolm Kesson. All rights reserved.