Chal

Command Line Processing with Chal

Chal is the command line renderer for Chalice. To execute a grail file or files from a UNIX shell or from an NT Command Prompt, without invoking the Chalice interface, use the following command at the prompt:

chal file.grail

...where " chal " informs the system that you want to run a grail script and " file.grail " is the name of the grail file that contains the process you want to run.

This command will run every process attached to the Exec node in the specified file. If you are not in the directory in which this file is located, you must either

  • change directories before invoking the chal command or
  • include the absolute pathname of the grail file in the command.

If the grail file contains more than one Exec node, chal will notify you of the Exec nodes it found in the file and ask you which Exec you want to run. Use the [-e node] modifier (see below) to specify which Exec node to process.

Chal Options

Chal offers a number of optional commands to modify a script by using this format:

chal [options] file.grail

For example, the following command, which uses the "-f" modifier, would process the first 50 frames (by specifying start, end, and increment values of 1, 50, and 1) of the first input to the Exec node in a grail file named "file.grail":

chal -f 0 1 50 1 file.grail

Note:
The first input to the Exec node is specified by the 0 after the "-f." Exec inputs are numbered sequentially starting from 0 for the top input. However, you can also use the name of the Exec input with this modifier, as described in the Options List.

Options List

The list of bracketed, optional commands below is complete as of publication of this document. The most up-to-date list is always available by entering the following command at the system prompt:

chal2.0 [IRIX]

chal2.0.lnk [NT]

-d ...rescans the hard disk or other storage device to update image files for all Disk Input nodes in the grail file.
-e [node] ...specifies a particular Exec node you wish to run. You must use this option when your grail file contains more than one Exec node, to specify which Exec chal should process (e.g., type "-e exec1", where "exec1" is the unique name of the Exec node).
-f ...specifies an Exec input and start, stop, and increment. Use this option to specify a particular input to an Exec node when the Exec node has more than one input. The input can be specified by its name, if you know it, or by number. For an Exec node with two inputs, "0" would signify the first, or top, entry in the node panel and "1" the second entry. You can also specify frame start, stop, and increment with -f.
For example, "-f 0 1 130 1" would process frames 1 to 130 of the first input to an Exec node, while "-f smoke_layer 1 10 1" would process frames 1 to 10 of an Exec input named "smoke_layer."
-i ...specifies the interleave option, which will process frame 1 of the first input to the Exec node, then frame 1 of the second input, and so on, until all frames of all Exec inputs are processed.
-j ...specifies sequential processing, in which every frame of the first input connected to the Exec node is processed before processing begins on the subsequent input.
-k ...instructs chal to continue processing when it encounters an error. It will skip the current frame and attempt to process the next one. Note that for preview renders (-P option, below) you can use the -M option instead, which fills missing frames with the color you specify (see -M, below).
-p [numProcs] ...runs the script on more than one processor (by default, chal will run on only one CPU). For example, to specify that chal use four processors while running the script (assuming your workstation has at least four CPUs), type "-p 4".
-q ...specifies "quiet mode," which prevents feedback from appearing on screen while the script is running.
-r ...creates a temporary "restart" file, in which chal will save information for each successfully completed frame until the entire chal job is done. If chal is aborted (by a render queue system, e.g.) during a "-r" render, you can use the exact same chal command that started the original job to restart the job where it left off. If the command varies at all, however, chal will start the job from the beginning.
When using the restart option, be sure that two (or more) chal renders do not write to the same restart file.
-s [numSlices] ...specifies the number of slices to use ("-s 4" would specify 4 slices).
-t ...displays the average rendering time per frame for each Exec input processed.
-v ...validates the grail script instead of rendering.
-D [global def] ...defines global variables, and overrides the definition of the global in the grail file with the value specified on the command line. For example, "-D JOB usr/people/richard" would define the $JOB global for the grail file or files currently being processed by chal to be "usr/people/richard" regardless of the definition specified in the grail file itself.
-F [filename] ...creates a list of files opened for reading filename.
-M [rgbVals] ...instructs chal to replace any missing input frames with a frame of a solid color and continue processing, You specify the color to use by entering an RGB value after the -M option. This option works only in conjunction with the preview render option (see below). So, to specify a low-quality, half-resolution preview render and fill any missing frames with red, you would type "-P l 50 -M 1 0 0."
-P [level size] ...specifies that chal render at a specific quality level and resolution. The quality level is set by typing the letter l for low, m for medium, or h for high. The resolution is set as a percentage of the full size of the image. To specify a preview execute at low quality and half of full resolution, for example, you would type "-P l 50."
-T [tag] ...defines the process tag.
-V The "chal -V" command displays the version number of chal that you are currently using,

Chal Caching Options

By default, chal will use all available RAM and assume that disk space is unlimited (however, chal will only use as much disk space as is actually needed to complete the job). The following optional commands modify the default RAM and disk cache settings used by chal to process the grail file:

-C r [ramsize] ...sets the RAM cache to use for the chal script. For "ramsize," use a number representing the total size of the RAM cache in bytes, or use a number followed by one of these four options: k, m, G, or p.
k ...specifies kilobytes (multiply value by 1024)
m ...specifies megabytes (multiply value by 1024 * 1024)
G ...specifies gigabytes (multiply value by 1024 * 1024 * 1024)
p ...specifies percent (value is the percentage of RAM to use)
For example, "-C r 10p" would specify that chal use 10 percent of the total RAM to run the script.
-C d [disksize] ...sets the disk cache size to use for the chal script. For "disksize," use a number representing the total size of the disk cache in bytes, or use a number followed by one of these three options: k, m, or G (see above).



Table of Contents | Index



Copyright 1996-1999 by Silicon Grail Corporation