There are two basic methods for telling rpiece which piece(s) of a picture to render. The explicit method is to write on the standard input the X and Y position of the desired piece(s), where X runs from zero to xdiv-1 and Y runs from zero to ydiv-1. (The lower left piece of a picture corresponds to (0,0) in this system.) Alternatively, the implicit specification method uses a synchronization file to determine which piece is to be rendered next. Specified with the -F option, syncfile initially contains the values for xdiv and ydiv, so the -X and -Y options are unnecessary. (However, they are used if syncfile does not exist.) The first rpiece process puts a lock on syncfile and modifies its contents before starting work on the first piece of the image. It writes the X and Y position of the piece it will work on, so the next rpiece process to modify syncfile will start on the next piece. (When it finishes with its piece, it appends the index to the end of syncfile.) This procedure continues until all the pieces are done, at which point all of the rpiece processes will terminate.
The -R option may be used instead of -F if some of the pieces were not properly finished by previous (killed) runs of rpiece. This option should be used by at most one rpiece process, since multiple recover processes would likely rerender the same pieces.
The -v flag switches on verbose mode, where rpiece reports to the standard output after each piece begins and after each piece is finished.
Options may be given on the command line and/or read from the environment and/or read from a file. A command argument beginning with a dollar sign ('$') is immediately replaced by the contents of the given environment variable. A command argument beginning with an at sign ('@') is immediately replaced by the contents of the given file.
goober% echo 1 8 > syncfile
goober% echo -F syncfile -x 1024 -y 1024 -vf view -o picture octree > args
goober% rpiece @args &
Second rpiece processes is started on the machine "sucker":
sucker% rpiece @args &
The output picture is not run-length encoded, and can be quite large. The approximate size (in kilobytes) can be computed by the simple formula:
filesize = xres*yres/256
Make sure that there is enough space on the filesystem to hold the entire picture before beginning. Once the picture is finished, the ra_rgbe(1) program with the -r option may be used to convert to a run-length encoded picture for more efficient storage, although pfilt(1) or any of the other Radiance picture filters will do the same thing.
The ALRM signal may be used to gracefully terminate an rpiece process after it finishes the current piece. This permits other currently running or subsequently started rpiece process(es) to continue rendering the picture without loss. The -T option will send the ALRM signal to rpiece after the specified number of (decimal) hours. This is the best way to force a time limit on the computation, since information will not be lost, though the process may continue for some time afterwards to finish its current piece.
Table of Contents