PhotoRealistic RenderMan 3.9
User's Manual

Pixar
September, 1999

ABSTRACT

This document describes how to use the software provided in the PhotoRealistic RenderMan 3D rendering system. The preparation of scene descriptions for submission to the PhotoRealistic RenderMan software running on a host system is discussed.

Section 1 provides a brief overview of the basic ingredients needed to use the software and attempts to clear up any confusion about the relationship between the RenderMan Interface and all of the different file types and utilities present in PhotoRealistic RenderMan.

Section 2 describes the level of conformance of PhotoRealistic RenderMan to the RenderMan Interface Version 3.1 Specification.

Section 3 describes how to run PhotoRealistic RenderMan, including the preparation of input files.

Section 4 covers the RenderMan Interface options and attributes that are specific to PhotoRealistic RenderMan, as well as other RenderMan Interface extensions implemented in it.

Section 5 describes the features and limitations of the Shading Language as it applies to PhotoRealistic RenderMan.

Section 6 discusses some helpful hints to get you started.

Section 7 discusses how to directly link the renderer to your application.

Finally, in Section 8 there are a few pointers as to where to go from here.


1. Introduction

PhotoRealistic RenderMan is a rendering system that generates high-quality 2D images from 3D scene-description information. Scene descriptions are created through the RenderMan® interface and are typically comprised of: The scene description may also specify the destination for the output image (e.g., a file or a frame buffer), as well as miscellaneous parameters that control the operation of the rendering system: how much effort to devote to avoiding aliasing, for instance.

A scene description is usually supplied to PhotoRealistic RenderMan in a file. This file is created by a modeling system that makes calls to the interface routines specified in the RenderMan Interface. The format of this file is defined by the RenderMan Interface Bytestream protocol, RIB, and can be a mix of ASCII and binary data.

The files and utilities described below, are defined in the Reference Documentation portion of this manual. Refer to that portion of the manual for further details and information.

1.1. The RenderMan Interface

The RenderMan Interface is currently specified in two forms: the C language binding, which was first published in Version 3.0 of the specification, and the RenderMan Interface Bytestream (RIB) protocol, which appears in Version 3.1. These two forms of RenderMan correspond directly wherever possible, except for a few limitations imposed by the one-way nature of RIB.

Because there are two forms of RenderMan, there are also two ways to use PhotoRealistic RenderMan. The renderer can be linked directly into a C program, or it can be run from the command line and given a RIB stream as input. One advantage of the latter method is that it supports a client-server system model, making it easier to distribute rendering among machines. Furthermore, RIB streams can be stored in files, which facilitate rendering at later times or on different systems.

If PhotoRealistic RenderMan is to be run as a separate program, the user must have some way to create a RIB stream. Though it is possible to do this directly (with an editor, for example), we recommend using the RIB client library by linking your program with librib.a. This library links into a C program the same way the rendering library does, but instead of performing the rendering at run-time, it creates a file containing the RIB stream produced by the RenderMan calls in the program.

If, on the other hand, you wish to use the direct rendering capability, link your program with libprman.a. This is necessary if your program relies on two-way communication with the renderer. Note, however, that this produces large executable files.

1.2. The RenderMan Interface Bytestream

The most compact form of the RenderMan Interface Bytestream is a binary encoded version of the human-readable ASCII form, which in turn translates directly to the C language binding. The renderer can use these forms interchangeably, but there is a utility shipped with PhotoRealistic RenderMan named catrib that converts RIB files from one version to the other for your convenience. Although there is no file-naming convention enforced by the software, we recommend that you use the suffix .rib to denote RIB files.

1.3. PhotoRealistic RenderMan

The executable renderer that takes a RIB file as input is called prman. Though it is possible to use prman directly, we recommend using the command script render, which handles all of the niceties of streams and file concatenation required by your operating system before it invokes prman.

When the renderer runs, it sends output pixels to a display server, which contains a display device driver for the particular hardware device or file which should receive the pixels. Beginning in version 3.8, display servers can be in the form of dynamically-linked libraries, or DSOs. If you want to use a non-standard frame buffer or image file format, you will have to write and install your own display driver. See the Display Driver Guide for further information.

If you have, through the RenderMan Interface, set the renderer to output to an rgb or rgba image file, the default display driver will output a TIFF file. As with RIB files, there is no naming convention, but we recommend using .tif as a suffix. The renderer also knows how to display images in other file formats, and on the standard color framebuffer for each type of machine.

1.4. The RenderMan Shading Language

The RenderMan Interface contains a description of the Shading Language. Using the Shading Language, it is possible to write your own routines for several types of operations that take place during the rendering process. The source code for a shader is written in a file, which is then compiled using the utility shader. The compiler makes no assumptions about input file names, but we recommend using the suffix .sl to denote shading language source code. The compiler produces one file for each shader or function in the source. Each file is named with the name of the shader or function followed by the suffix .slo. Note that the name of the source file does not necessarily have anything to do with the name of the shading language object files.

During rendering, the renderer must be able to find a .slo file for every shader that is used. There is a PhotoRealistic RenderMan dependent RiOption called searchpath that tells the renderer where to look for shader object files. See Section 4.1.11 for details. Configuration files can also control the shader search path. See Section 3.8 for details.

1.5. Texture Files

There are currently three shading language functions that are used to access texture data: texture, environment, and shadow. In order to use these functions, the renderer must be able to find the appropriate texture files. You can either provide the full path name of the file when you give it as an argument to the shader function, or you can give just a file name and use the RiOption searchpath or configuration file to tell the renderer where to look (see Section 4.1.11 and Section 3.8 for more details).

Texture files are created with the utility txmake, which takes image files or zfiles as input. There are various command line options to txmake that specify the type of input and the type of texture file to be created (see Section 3.3 for details). In general, a shadow map is produced from a zfile, a texture map is produced from a TIFF file, and an environment map is produced from either one or six TIFF files, depending on the environment type. Zfiles are produced by the renderer, but input TIFF files can either be produced by the renderer or brought in from some other software (such as a digitizer). Texture files contain a great deal of information and can easily become very large. However texture files are created using various data compression schemes to keep the files from getting too large. The size of the file depends on the data in the input image. Don't be surprised if you use up large amounts of disk space when you try to use txmake on a large image.

There are also RenderMan calls that create texture maps from inside the prman renderer, which is equivalent to calling txmake. Modeling programs which compute and create texture maps on the fly may wish to use these calls, but it is often more appropriate to create texture maps prior to running renderer.

Though there is no enforced naming convention for the different types of texture files, we recommend .tex, .env, and .shd for texture, environment, and shadow maps respectively. If you need to get information about a texture file, there is a command line utility called txinfo that prints out the type, size, and other useful information about a texture file.

1.6. Display Utilities

Previous releases of PhotoRealistic RenderMan had multiple applications that made use of the display server. In PhotoRealistic RenderMan version 3.8, most of these applications (such as bktdspy, picdspy, tiffdspy, txdspy, and tgadspy) have been replaced by an improved version of sho.

sho
This utility automatically figures out what image file format is contained in a file and displays it. It can recognize all of the file formats supported by PhotoRealistic RenderMan and quite a few more.

tiffdiff
This utility compares two TIFF files and outputs a graphic representation of the differences between them.

2. RenderMan Interface Compliance

PhotoRealistic RenderMan is intended to be compatible with the RenderMan Interface Version 3.1. Therefore, the RenderMan Interface Version 3.1 Specification (dated September 1989) provides a significant part of the documentation on the use of the PhotoRealistic RenderMan software. This section details the capabilities and limitations of PhotoRealistic RenderMan, in terms of the optional capabilities described in the RenderMan Interface Version 3.1 document.

Optional capabilities are those features specified in the document that are not required to be supported in all implementations of compatible renderers. The subroutines which would normally implement the interface to these capabilities must exist, but need not do anything. The level of support of an optional capability by a specific renderer implementation can be divided into three categories: fully implemented, in which the renderer supplies the features in all of their generality; incompletely implemented, in which the renderer supports a subset of the feature, but has certain restrictions on the parameter values which can be handled correctly; and unimplemented, in which the renderer has no support for the feature. The RenderMan Interface Version 3.1 document specifies what the default action of a renderer should be if unimplemented capabilities are requested.

The following capabilities correspond to those discussed in Section 1 of the RenderMan Interface Version 3.1 specification (pages 5 and 6).

Solid Modeling
The Solid Modeling optional capability is fully implemented.

Trim Curves
The Trim Curve optional capability is fully implemented.

Level of Detail
The Level of Detail optional capability is fully implemented.

Motion Blur
The Motion Blur optional capability is completely implemented beginning in version 3.8. PRMan 3.8 permits a piecewise linear interpolation of positions within a single frame. The RIB file syntax is exactly as described in the RenderMan Specification. Each motion-block specifies a sequence of times, and there is one version of the transformation (or object specification) that corresponds to each time value. The shutter specifies the range of these times will appear in the frame, and the motion is piecewise linearly interpolated between the knots at the given times.

For example:

describes a ball that is moving around violently in 3-D.

As with previous versions of motion-blur, transformations and object deformations are both legal inside the motion block. There is an arbitrary limit of no more that 6 unique time values specified throughout in the RIB file as a whole. That is, you can use up to 6 time values in any motion-block, as long as it's always the same 6 times.

The shutter open and close times are not required to match any of the specified time values, and if they do not, the objects and transformations will be correctly clipped to the shutter's range. For example, the shutter in the above example could run from 0.1 to 0.9, and the "right thing" would happen. If the shutter extends outside the range specified in the motion block, two things happen. Transformations are clamped to their endpoints. In the example above, the ball is considered stationary at (0,10,0) prior to time 0.0, and stationary again at (0,0,0) after time 1.0. Geometry, on the other hand, is non-existent outside of the motion-block's time range. Therefore, one may have a geometry appear in the middle of a frame, or similarly vanish intraframe.

Rotations are not divided into segments automatically. Rotations that need more temporal resolution must be specified by the model (or the RIB generation program) as follows:

In the current implementation, shading of each segment of the object's motion is calculated independently, at the time value that represents the beginning of that segment. However, shading parameters can not yet be interpolated through time. Therefore, any shading differences that are due only to position will be visible on the various segments of the motion path (for example, specular highlight location). Note that shadows are evaluated only at shutter open time. Users should be aware that large amounts of blur can significantly increase both rendering time and memory usage, and should refer to Section 6.5 for usage notes.

Depth of Field
The Depth of Field optional capability is fully implemented.

Programmable Shading
The Programmable Shading optional capability is incompletely implemented. Surface, light, volume and displacement shaders can be written using the Shading Language as described in the RenderMan Interface Version 3.1 Specification. Shading Language imager shaders are not supported. All of the Shading Language constructs and predefined functions are available. There are certain limitations on the use of user-programmed shader functions (see Section 5 for details). There are also a number of extensions to Shading Language which were not described in the RenderMan 3.1 specification (see Shading Language Extensions).

Special Camera Projections
The Special Camera Projections optional capability is not implemented. Only the standard orthographic and perspective projections are available.

Deformations
The Deformations optional capability is not implemented. Deformation shaders are ignored.

Displacements
The Displacements optional capability is fully implemented. Users should refer to the description of the displacementbound attribute (see Section 4.2.2) for notes on using displacement shaders correctly.

Spectral Colors
The Spectral Colors optional capability is not implemented. The implementation converts all input colors to RGB before they are used internally.

Texture Mapping
The Texture Mapping optional shading capability is fully implemented.

Environment Mapping
The Environment Mapping optional shading capability is fully implemented.

Bump Mapping
The Bump Mapping optional shading capability is not implemented. Requests for this type of image mapping returns 0.0 (no bump). The RiMakeBump call which makes bump maps does nothing.

Shadow Depth Mapping
The Shadow Depth Mapping optional shading capability is fully implemented. However, PhotoRealistic RenderMan requires shadow depth files to have a resolution which is exactly a power of two (see Section 3.3 for details).

Volume Shading
The Volume Shading optional capability is incompletely implemented. Atmosphere shaders work properly, but Interior and Exterior shaders are ignored. The incident and opposite Shading Language functions always return 0.0.

Global Illumination Models
Neither the Ray Tracing nor Radiosity optional capabilities are supported by PhotoRealistic RenderMan. Calls to the trace Shading Language function return 0.0.

Area Light Sources
The Area Light Sources optional capability is not implemented. Calls to RiAreaLightSource cause a point light source to be created, just as though RiLightSource had been called.

3. Rendering Images With PhotoRealistic RenderMan

To render an image a complete scene description must be supplied. The majority of the information is given either in a file that contains RenderMan Interface requests specified with the RenderMan Interface Bytestream protocol, RIB, or by an application that makes RenderMan Interface requests directly. For shading, however, this description may reference functions written in the RenderMan Shading Language. These functions are maintained separately, in ASCII files that must be preprocessed by the RenderMan Shading Language compiler before they can be used. In addition, if the shading calculations use texture files, these files must be made available to PhotoRealistic RenderMan. Many textures are created from previously rendered images, in which case the rendered images must first be converted to a format optimized for efficient access as a texture.

3.1. RIB

RenderMan Interface scene descriptions for PhotoRealistic RenderMan may be specified with RIB. RIB is basically a language-independent specification mechanism for calls to the RenderMan Interface. This specification can be created in ASCII or, for efficiency, in a compressed binary format. The modeling system used to generate scene descriptions is expected to output RIB, usually by using the RIB client library, librib.a, that is described in The RenderMan Interface Bytestream Protocol Library.

PhotoRealistic RenderMan supports compressed RIB files, in either binary or ascii forms. See Section 4.1.12 for details on controlling the format of RIB files.

One tool that can be useful in dealing with RIB files is the program catrib. Catrib can be used to convert between binary and ASCII formats, and as a means of transmitting RIB data to a rendering server. For example, if the file binary.rib contains binary RIB data, then the following will create an ASCII version of this data in the file ascii.rib:

By default the output generated by catrib is sent to the standard output. Thus the following might be used to compare the ASCII output to a previously created file: The format of the output generated by catrib can be specified as binary or ASCII by using the -binary and -ascii options, respectively. Alternatively the environment variable RIFORMAT can be set to "binary" or "ascii". Beware, however, that this environment variable is also used by the client RIB library that applications use to generate RIB data. Thus setting this environment variable may also affect the operation of your modeling system.

3.2. Shaders

Shaders are routines written in the RenderMan Shading Language. These routines have a number of functions in the rendering process. Shaders can be used to perturb geometry, describe light sources, define surface characteristics, etc.

Each shader must be compiled before it can be used by PhotoRealistic RenderMan in the rendering process. This is done with the shader program. For example, to compile the constant shader into a shading file suitable for use by PhotoRealistic RenderMan the following command would be used:

Each shader must be compiled into a separate file and the file that holds the compiled object must have a name that corresponds to the name of the enclosed shader. For example, the file constant.slo holds the shader named constant. A file named foo.sl might contain the shader surface marble. Its corresponding output file (created by the compiler) would be marble.slo and not foo.slo. This file naming convention is automatically enforced by the shader compiler; you need only be aware of this if you have source files whose names do not match the name of the enclosed shader.

The standard shaders defined in the RenderMan Interface specification are located in the directory /usr/local/prman/lib/shaders. (See Table 1.) PhotoRealistic RenderMan automatically searches this directory to find shaders that are referenced in a scene description. Any user-defined shaders must be referenced either through absolute path names (i.e., path names with a leading slash) or by using the PhotoRealistic RenderMan-specific searchpath option. See Section 3.8 and Section 4.1.11 for details about search paths.

3.3. Texture Files

Texture files contain data that may be used in the shading process through the texture, environment, bump and shadow operators. PhotoRealistic RenderMan requires that texture files be created in a special format that is optimized for the access patterns typically seen during rendering. To create a texture file from a picture file the txmake program can be used. For example: A manual page for this program is provided in the PhotoRealistic RenderMan Reference Documentation section of this volume. This is a useful alternative to the RiMakeTexture routine. In either case, texture files must be created before they are used.

The source picture files that txmake and RiMakeTexture use to create texture maps can be in TIFF, Alias or Pixar's picio format. Source images for texture maps or environment maps can be any resolution; however, the texture making process causes these files to be resized into various other resolutions for fast filtered access, each being some even power of two resolution in both width and height. The user has some control of this filtering process with the -resize option of txmake (or equivalently, the resize parameter of RiMakeTexture). By default, the file is first resized up to the next highest power of two resolution in each direction, using a high-quality Catmull-Rom filter. Other possibilities include resize down to the next lower power of two resolution, and round the resolution to the closest power of two. In all three cases, information about the original image aspect ratio is retained within the file so that the texture is not stretched when it is applied to simple surfaces. (The behavior of previous releases of PhotoRealistic RenderMan to fill images with black pixels, rather than resize them, can be requested with resize value of none.)

Source images for shadow depth maps must be power of two resolution, as this resizing functionality is not implemented for shadow depth maps. If the source depth files do not have an even power of two resolution, the shadow maps will not produce correct shadows.

Texture file names should either be given as absolute path names or through the PhotoRealistic RenderMan-specific searchpath option. See Section 3.8 and Section 4.1.11 for details about search paths.

PhotoRealistic RenderMan provides two utility programs (in addition to txmake) to manipulate texture files. Manual pages for these programs are provided in the PhotoRealistic RenderMan Reference Documentation. The programs are: sho, used to display texture images using the PhotoRealistic RenderMan display server, and txinfo, used to print descriptive information about a texture file.

3.4. Running PhotoRealistic RenderMan

PhotoRealistic RenderMan is designed to be portable; it runs on a wide variety of machines and under a number of different operating systems. PhotoRealistic RenderMan typically functions as a single self-contained program, except for some display services. The rendering algorithm, texturing facilities, shading language interpreter, etc. are all integrated into a single program that runs as a single process and allocates memory through the standard system facilities.

3.5. The render Shell Script

PhotoRealistic RenderMan is usually used through the render shell script. This command provides a simple front-end to the actual PhotoRealistic RenderMan system, hiding any system-specific details such as path names. To render a model file containing RIB data, simply use: It is often convenient to store options, camera specification and the world block in separate files. The render script can be given multiple file names and it will process them in the order given:

3.6. Renderer Output

The images created by PhotoRealistic RenderMan can be placed into a file or onto a frame buffer device via an appropriate display driver. PhotoRealistic RenderMan is shipped with display drivers that support image output in various file formats and display devices. These drivers are described in the Reference Documentation. The default file format is TIFF. The default framebuffer is an X11 window on the system display. To select one a driver that is not the default file or framebuffer driver use RiDisplay as follows: Where driver is the name of the display driver. The driver may or may not use the filename argument. When output is directed to a file, the name of the file is the name specified in the RiDisplay command. If the file name is not an absolute path name, the file is created in the directory in which rendering is performed.

RGBA, RGB, or single channel (R) pixels can be generated with the precision selected by the appropriate RiQuantize request. For example, to output 8-bit RGB data in a file named foo.tif:

Beginning in version 3.8, the users are not limited to displaying rgba or z but can arrange to have arbitrary variables displayed from shading calculations. For instance, to display the shader variable N, one can issue the Display call:

The ASCII plus sign indicates that this display is in addition to the normal display. The mode is set to N, indicating the normal is to be output. The mode may in fact be any external variable, or any variable defined as an output variable by a shader. If a shader does not define such a variable, the default value of zero is output.

The RiQuantize call has also been extended. By default, all extra output variables are unquantized, and sent to the display system as floats. If we wished to quantize the normals listed above, we could say:

which would quantize all normals to the range 0 to 255.

More complete documentation, with some application ideas can be found in the application note Using Arbitrary Output Variables in PhotoRealistic Renderman With Applications

Other drivers may be written and/or installed by users. See the Display Driver Guide for details. See Section 4.1.10 for more options that can be specified with RiDisplay.

3.7. Environment Variables

Several environment variables are used to control the operation of the PhotoRealistic RenderMan system. The values of these variables are modified with the UNIX setenv command. The following is a list of these variables and how they are interpreted.

RMANTREE
This specifies the root of the file tree which contains the RenderMan Toolkit release. All programs in the RenderMan Toolkit check this variable to search for executables, shell scripts, data files, etc. If this variable is undefined, the software defaults to /usr/local/prman. If the release is installed at some other location, this variable must be set to point at its new location.

RIFORMAT
This controls whether the output of the RIB library is in binary or ASCII. Setting RIFORMAT to binary causes binary output and setting it to ascii causes ASCII output. If RIFORMAT is undefined, the output is in ASCII.

RISERVER
This specifies the name of the file to which the RIB library will write its output. If RISERVER is undefined, and no name is specified to RiBegin (see Section 4.1.12), the output is written to standard output.

RMANFB
This overrides the name of the default framebuffer device. By default, RiDisplay "framebuffer" will use the generic X11 device driver. This variable can be used to force the default framebuffer device to be a machine-specific or site-specific device driver, instead.
Some of the display drivers also use environment variables. See the documentation for the individual drivers in the Reference Documentation.

3.8. Configuration Files

Many of the internal defaults of PhotoRealistic RenderMan can be controlled by configuration files. Configuration files are read at the time of the call to RiBegin, before any other Ri calls are processed. For defaults which correspond to an Ri call, the Ri call, if present, will override the default value.

The initial configuration file is rendermn.ini in the directory /usr/local/prman/etc (or ${RMANTREE}/etc, if the RMANTREE environment variable is set, see below). After the initial configuration file has been scanned, additional configuration files will be scanned and the default values set therein will override any values set in the initial configuration file. Additional configuration files are searched for as rendermn.ini in both the directory defined by the environment HOME and in the current directory, in that order. (The file in the HOME directory can optionally have a leading "." to make it a hidden file.)

The configuration file format is a set of lines containing strings. The first string on the line is the name of the default and the rest of the line specify its default value. Environment variables may be referenced inside the configuration file using the following special syntax:

${environment-variable-name}
Undefined environment variables default to the empty string, except for ${RMANTREE} which defaults to /usr/local/prman. Lines beginning with a # are ignored. The following is a list of the defaults that can be set in configuration files which are relevant to PhotoRealistic RenderMan. Other programs, such as Vector RenderMan and the various display drivers also read defaults from this file, and those defaults are documented in the Reference Documentation.

/errorpath
Sets the directory where the error message files are to be found. The renderer and tools will look in this directory when reporting errors. If set, this directory overrides the compiled default of ${RMANTREE}/etc/messages.

/displaytype/displaytype
Allows a one level translation of the display type displaytype, as specified in an RiDisplay call, to an alternate display type. The only display types with default translations are file, which translates to tiff, and framebuffer translates to X11.

/display/displaytype/xres
Overrides the default x resolution (width) of the display type displaytype.

/display/displaytype/yres
Overrides the default y resolution (height) of the display type displaytype.

/display/displaytype/par
Overrides the default pixel aspect ratio of the display type displaytype.

/display/displaytype
Now obsolete. For backwards compatibility, if this specifies the name of an external display driver (something other than internal), the new display system will attempt to open it and write to it using the old display protocol.

/display/dsomapping/
Translation from a driver name to a file name before the search paths for the display driver DSOs are used. %s is replaced with the driver name.

/display/standarddsopath/
Path to the display driver DSOs.

/display/dsopath/
Secondary path to the display driver DSOs.

/display/dso/displaytype
Overrides the /display/dsopath with the path name for a specific DSO display driver.

/display/tiff/compression
Sets the compression algorithm to be used for the internal tiff driver. The default value is lzw. Alternate values are packbits, zip, pixarlog or none.

lzw
provides Lempel-Ziv & Welch compression as defined in TIFF 6.0 specification Section 13. Lempel-Ziv & Welch compression is covered by a patent owned by Unisys and is no longer recommended for use in TIFF, according to the writers of the TIFF 6.0 spec. At the moment, LZW is still supported by most readers so it is still a good choice for portability, however, be aware that Pixar will probably be forced to desupport LZW compression in some future release.

zip
provides compression with the algorithm used by the popular gzip program. Output files are usually smaller than those produced using lzw compression. zip is purported to be unencumbered by patents and is supported by the libtiff library available for free from Silicon Graphics. The actually zip compression is implemented using a freely available library written by Jean-loup Gailly and Mark Adler.

pixarlog
If TIFF files with more than eight bits per pixel are required and portability is not an issue, sixteen bit or floating point pixel data can be written using pixarlog compression. pixarlog compands the input data preserving more data that is usually detectable by the human eye while creating files that compress much better than regular sixteen bit data. Pixar is donating pixarlog compression to the libtiff library maintained at Silicon Graphics so it will be available for use in other software.

packbits
provides Macintosh PackBits compression as defined in the TIFF 6.0 specification Section 9. This compression very portable. It is handled by most readers of TIFF files. Its drawback is that it does not compress as well as the other compression choices.

none
stores the file without compression. Output files can be quite large, but virtually any valid TIFF reader should be able to read them.
If image files must be exported from PhotoRealistic RenderMan to other software packages which do not support all of these compression schemes, then packbits or no compression may be most convenient. If files are only occasionally exported, it might be more convenient to use zip and use the utility program tiffcopy to change the compression of files to be exported.

/display/displaytmp/dir
When using an external file driver which requires the image in scan line order, the dspyserver requires a temporary file whose size depends on the size of the image being rendered. This configuration value sets the directory location for this file, which defaults to /usr/tmp.

/shaderpath
Sets the file search path for shader files. This is equivalent to the call:
RiOption("searchpath", "shader", (RtPointer)&spath, RI_NULL);
except that the configuration file changes the search path before any shaders (including defaultsurface) are loaded. See Section 4.1.11 for details of the path format.

/standardshaderpath
Sets the string which will be the translation of the `@' character for the /shaderpath default or RiOption call. The default value is ${RMANTREE}/lib/shaders. See Section 4.1.11 for details of the path format.

/texturepath
Sets the file search path for texture files. This is equivalent to the call:
RiOption("searchpath", "texture", (RtPointer)&tpath, RI_NULL);
See Section 4.1.11 for details of the path format.

/standardtexturepath
Sets the string which will be the translation of the `@' character for the /texturepath default or RiOption call. The default value is ${RMANTREE}/lib/textures. See Section 4.1.11 for details of the path format.

/prman/bucketsize
Sets the default bucketsize used by the renderer. The value should be two decimal numbers separated by a space. This is equivalent to the call:
RiOption("limits", "bucketsize", (RtPointer)&bs, RI_NULL);
See Section 4.1.2 for more details.

/prman/gridsize
Sets the default maximum gridsize used by the renderer. This is equivalent to the call:
RiOption("limits", "gridsize", (RtPointer)&gs, RI_NULL);
See Section 4.1.3 for more details.

/prman/texturememory
Sets the default size in kilobytes of the texture memory cache used by the renderer. This is equivalent to the call:
RiOption("limits", "texturememory", (RtPointer)&tm, RI_NULL);
See Section 4.1.4 for more details.

/prman/shadingrate
Sets the default shading rate used by the renderer. This is equivalent to the RiShadingRate call. See Section 6.1 for more information about RiShadingRate.
Following is an example configuration file:

4. PhotoRealistic RenderMan Options and Attributes

Every implementation of a RenderMan-compliant rendering program has certain implementation-specific features which are accessed through the functions RiAttribute and RiOption. Table 2 summarizes the options available in PhotoRealistic RenderMan. Note that some of the defaults listed in Table 2 can be overridden by configuration files (see Section 3.8). The following sections describe the many attributes and options available to control the operation of PhotoRealistic RenderMan. Each section gives an example of the use of the option as it would appear in RenderMan Interface. In addition, PhotoRealistic RenderMan implements certain extensions to other parts of the RenderMan Interface, as described in the RenderMan Interface Specification Version 3.1. These extensions are described in Section 4.3.

4.1. Options

Options are parameters that affect the rendering of an entire image. They must be set before calling RiWorldBegin, since at that point options for a specific frame are frozen.

4.1.1. Imager Shaders

General purpose imager shaders written in the RenderMan Shading Language are not supported by PhotoRealistic RenderMan. However, two built-in imager shaders are available through the RiImager call.

clamptoalpha
takes no parameters, and merely assures that all color values are less than the value of the alpha channel prior to output. This is true even if the display mode of the image being generated is not an rgba image. Shaders that produce color values greater than one, as well as the pixel dithering process, can occasionally produce color values greater than the alpha value, potentially resulting in errors when the image is later composited over another image by programs that do not anticipate this possibility.
RiImager("clamptoalpha", RI_NULL);

background
takes a single parameter, background, of type uniform color. The rendered image is merged over the specified background color and all the alpha values are set to one.
RtColor bg = {0.4, 0.4, 1.0};
RiImager("background", "background", (RtPointer)bg, RI_NULL);

4.1.2. Bucket Size

PhotoRealistic RenderMan subdivides the screen into blocks of pixels termed buckets when resolving the visible surface calculations. Large buckets are more efficient and permit larger grids to be used (see below). Large buckets however require more memory. The bucketsize option is used to specify the n-by-m size of a bucket, in pixels; for example:

4.1.3. Grid Size

The gridsize option determines the maximum number of micropolygons that can be shaded at one time. This is another option that can be used to control the tradeoff between computational efficiency and memory utilization. The number of active micropolygons directly affects the amount of memory required to render an image since the state of each active micropolygon must be maintained until it is resolved. Large grids in general are more efficient to shade since the shading machinery is invoked once for a large number of micropolygons, rather than many times for a fewer number of micropolygons. However, larger grids require larger temporary variable buffers for shading (particularly when textures are involved in the shading process) and produce large increases in the number of active micropolygons. A minimal value for this parameter can be calculated by dividing the bucket size by the micropolygon size set with the RiShadingRate request; e.g., a shading rate of 4.0 and a bucket size of 12×12 gives a gridsize of 12×12/4=36. This is minimal in the sense that values smaller than this don't save much memory. The following sets the maximum grid size to 36:

4.1.4. Texture Memory

The texture system caches data that is read from texture files. The user can modify the limits on the total amount of memory devoted to cached texture data. Large caches increase texture mapping efficiency (particularly on a lightly-loaded host), but obviously can bloat the total memory usage. The texture-cache memory size is specified in kilobytes with the following option:

4.1.5. Opacity Threshold

Only objects with opacities greater than or equal to the opacity threshold will appear in shadow maps and other z files. The threshold is a color value (as is the shader opacity value Oi). Therefore, if any channel of opacity is greater than or equal to the threshold, the object will appear in shadow maps (and other zfiles). The default value for the opacity threshold is {1.0, 1.0, 1.0} or completely opaque. This means that partially or completely transparent objects are not rendered into shadow maps or zfiles; only objects which are completely opaque are rendered. If the opacity threshold is set to {0.0, 0.0, 0.0} all objects will be rendered into the shadow map. The opacity threshold can be controlled with the following option:

4.1.6. Opacity Culling

When rendering scenes with a large number of semi-transparent layered objects (e.g. hair), the opacity culling threshold can be set for a significant time and memory savings. Essentially, a stack of visible points whose accumulated opacity is greater (in each channel) than the specified limit will be considered fully opaque by the hider, and objects behind the stack will be culled. This opacity limit is controlled with the following option: The opacity threshold is {0.996, 0.996, 0.996} by default.

4.1.7. Extreme Displacement

When the displacement of an object on the screen is very large, that is, the displaced point is far from the original point, PhotoRealistic RenderMan invokes a special displacement procedure in order to save large amounts of memory at some additional computational cost. When this occurs, the error message: is generated. The maximum permissible displacement before the special procedure is invoked is measured in vertical scanlines. If this value is increased, larger displacements are permitted to use memory rather than incur the additional computation. If this value is decreased, memory usage is minimized even for less severe displacements. The default for this value is 32 scanlines, and can be changed with the following option:

4.1.8. Eye-Plane Splitting

When PhotoRealistic RenderMan finds a primitive object which falls astride the eye (camera) plane, it tries to split the object into smaller and smaller pieces to prevent perspective-divide abnormalities. Situations can exist where this process cannot work (e.g., when the object's motion blur takes it through the eye). This situation is detected when the number of eye-plane splits of an object exceeds some threshold. At that point, the remaining unresolved pieces of the object are culled, and the error message: is generated. The failure detection threshold defaults to 10, but can be changed (usually to some smaller number in an attempt to reduce time and memory usage) with the following option: Beginning in release 3.8, it is possible to set the eyesplits to different values for different objects by using the eyesplits Attribute.

4.1.9. Shadow Maps

In some cases shadow maps may exhibit a problem with surface self-shadowing. This manifests itself as small grey spots all over objects in shadow, and is caused by numerical inaccuracy in computing the depth of a particular surface. If a depth computed when generating the depth map is slightly less than that computed when rendering the image, a shadowing light source shader will interpret this as a shadow and produce a grey spot. This can be solved by using the shadow option to add a small bias value to the values in the depth map when rendering the final image. Care must be taken not to add too large a value since that would cause shadows to separate from the objects casting them. The bias parameter is set as follows: Note that this bias value can be overridden by a parameterlist value supplied in the shadow call of the shader.

Previously shadow maps have always contained the minimum depth value calculated from all depth values within the current pixel. The user now has control over the function that computes the output depth value for each pixel. This is controlled by a new Hider option called "depthfilter". You can now select between the minimum, maximum, or average of the pixel depth values to output.

Examples using the jitter hider:

Hider "hidden" "jitter" [0] "depthfilter" "min"
Hider "hidden" "jitter" [0] "depthfilter" "max"
Hider "hidden" "jitter" [0] "depthfilter" "average"

In addition, there is one special version of the depth filter that works a bit differently. For each sample position, it calculates the depth as the midpoint between the object that is closest to the viewpoint and the second closest object. This requires a bit more time than the other techniques, but generates z values that may require less tweaking and biasing. This method was proposed by Andrew Woo of Alias Research in Graphics Gems III , page 338.

This method is specified by the Hider statement:

Hider "hidden" "jitter" [0] "depthfilter" "midpoint"

PRMan 3.8 has an enhanced shadow shadeop supporting a new method of generating soft shadows with true penumbral fadeout, simulating shadows of area light sources. The method uses multiple rendered shadow maps to infer visibility information from a light source whose extended geometry is also specified in the shadeop. For more details, see the Application Note on soft shadows.

4.1.10. Hider Sampling

The PhotoRealistic RenderMan default hider, hidden, has two parameter-list options.

The first, jitter, enables/disables stochastic sampling. Stochastic sampling should be enabled whenever motion blur or depth-of-field is being used, and in general improves the quality of antialiasing at a small cost in speed. For best results, the jitter option should be disabled when rendering shadow map values. This option is enabled by default, but can be disabled by:

The second, pdisc, enables/disables an alternate stochastic sampling scheme. This scheme often works better than the usual jitter option, with some limitations. The first limitation that the number of samples across a bucket (bucketsize x or y times pixel samples x or y) should be a power of two or at least a multiple of a high power of two. If this is not followed, the image quality can be greatly reduced. Some combinations of bucketsize/pixel samples will not work at all and will produce an error message. If this happens, either modify the bucketsize/pixel samples or use the jitter option instead. The second limitation is that pdisc does not work properly when using parallelism in network rendering. This option is disabled by default, but can be enabled by:

4.1.11. Frame Buffer Control

There are several options which can be enabled through the parameter list of the RiDisplay call. These options, naturally enough, influence the use of the display device.

The origin of the output window on a frame buffer device can be set using the display origin option. For example, to place the origin of the output window at the point (512,384):

Frame buffers can be configured to merge the generated image over an existing image with the display merge option: The merge option works only if the selected display driver supports it.

Some file formats (e.g., TIFF, Postscript) support the concept of device resolution, meaning how many pixels appear per physical unit of measure (e.g., dots per inch). Two display options provide a way to document these values into files generated by PhotoRealistic RenderMan. A string specifying the physical unit of resolution can be set with the resolutionunit option. A pair of integers specifying the number of pixels per resolution unit in width and height can be set with the resolution option. For example, to set the resolution at 72 dpi:

Currently, the TIFF file driver considers both resolutionunit, which must be "inch" or "centimeter", and both resolution values. The PICT and Postscript drivers only consider the first resolution value, as images in these formats must have the same value in both directions, and implicitly assume inches as the resolution unit.

The TIFF driver also accepts an option to set the compression type, which may be "lzw" (the default), "packbits", "zip", "pixarlog", or "none":

Custom display drivers may also accept other display options, but they must be declared with RiDeclare before RiDisplay can accept them and pass them through to the custom driver.

Special formatting can be done on the filename parameter to RiDisplay. The "#" character is recognized as a special lead-in character in file names. The action taken depends on the character after the "#".

Example: Produces the file name: "test015.tiff".

4.1.12. Search Paths

PhotoRealistic RenderMan searches specific paths for shader definitions, texture map files and Pixar Looks® masters and instances. The search path is a colon-separated list of directories that are used in searching for files that have names which do not begin with When a search path is set, the character `@' will be replaced by the standard shader or texture location and the character `&' will be replaced by the previous path description. The valid search paths are: Note that the server versions of the paths are processed when using render as well as netrender -f, so it if the file might be rendered either remotely or locally, it is usually wise to put the server path before the local path so that the local path will override the server path when rendering locally. Example:

4.1.13. High Quality Texture Filtering

Two texture options have been added for use with RiOption to control the use of high quality texture filtering options. These allow the selection of higher quality filtering in the shading language to be enabled or disabled. When disabled, the "filter" and "lerp" optional parameters to texture() and environment() have no effect. They are enabled by default. Here is an example of disabling high quality filtering:

4.1.14. RIB Output

The RIB output from a C program using the PhotoRealistic RenderMan client library librib.a can be controlled with the rib option. The format parameter specifies either ASCII output by: or binary output by: The RiBegin call can be used to specify a specific RIB output file, as in: If RiBegin is not used to specify a file name, and RISERVER is not defined (see Section 3.8), the standard output will be used.

The compression format is derived from the freely available libzip.a library and is compatible with the GNU compression program gzip. You can tell the RIB client library to output compressed RIB by calling RiOption before the call to RiBegin:

Or by setting the environment variable RICOMPRESSION to gzip:

4.1.13 Control Over Printed Statistics

End of frame statistics are controlled by the RIB statement:

	Option "statistics" "endofframe" [level]
The value of level determines how much detail is printed: Level 1 is probably the most useful. The information printed at higher levels, particularly level 3 are for debugging errant renders and can be hard to interpret.

4.2. Attributes

Attributes are flags and values that are part of the graphics state, and are therefore associated with individual primitives. The values of these attributes are pushed and popped with the graphics state.

4.2.1. Binary Dicing

This is a flag that indicates whether the lowest level patches must be diced into a grid of micropolygons with power-of-two dimensions. This attribute is typically used to prevent patch cracking on high-curvature patches.

4.2.2. Displacement Bounds

This is a control that increases the sizes of calculated bounding boxes on primitives in order to account for the effects of displacement mapping. The size is specified by identifying a single floating-point value which is the radius of a sphere which is guaranteed to contain the maximum possible displacement, and the name of the coordinate system in which this sphere resides. This value should be as tight as possible. It is extremely inefficient, both in terms of memory usage and calculation time, to specify a bounding sphere which is larger than the actual displacement. Therefore, this sphere should be as small as possible without permitting points on the object to displace farther than the sphere's radius.

The coordinate system identified can be:

The default coordinate system is "object" space.

In version 3.8, the coordinate system may be specified by supplying a transformation matrix. The parameterlist name for this version of the call is "transform", and the value is a single transformation matrix. The semantics of this transformation matrix is parallel to passing a transformation matrix to a shader and transforming a point through it. In other words,

	Attribute "displacementbound"
		"sphere" [2]
		"coordinatesystem" ["world"]
is to
	dispmag = sphereradius * ntransform("world", Nf);
as
	Attribute "displacementbound"
		"sphere" [2]
		"transform" [...mx...]
is to
	dispmag = sphereradius * ntransform(mx, Nf);

4.2.3. Named Primitives

It is occasionally useful to give names to individual primitives. For example, when a primitive won't split at the eye plane (see Section4.1.7) it can be desirable to know which primitive is causing the problem.This can be done using the attribute identifier with the parameter name, as in:

All defined primitives will have this name until the graphics stack is popped (with RiAttributeEnd) or another such RiAttribute call is made. The error message in the example in Section 4.1.7 would then contain a reference to a specific primitive name instead of the mysterious <unnamed>.

4.2.4. Trim Curve Sense

The sense of Trim Curves can now be reversed using an attribute. The sense can be set to either inside or outside. The default is inside. When the sense is set to outside, all portions of the surface inside the Trim Curve, those drawn in the default case, will not be drawn, and those portions outside the Trim Curve, those not drawn in the default case, will be drawn. Since Trim Curves are attributes themselves, this allows one to use a single Trim Curve to define areas of different shading on the same NURBS surface by repeating the patch with a different sense of the same Trim Curve. The following example shows how to set the Trim Curve sense in a C program. The Pixar Looks example program in the /usr/local/prman/examples directory uses this technique.

4.2.5. Motion Factor

A special geometric approximation type, motionfactor, is available with RiGeometricApproximation to provide a processing/quality tradeoff for motion blurred objects whose motion can be large in screen space. The following call: will cause the renderer to check the length of the motion blur on the screen for all motion blurred objects and if the distance is large, raise the effective shading rate value of the blurred objects. Since the objects will be blurred across the screen, fine shading detail would be lost anyway. This can save large amounts of processing if many objects in the scene have large blurs. A motionfactor factor value of 0.0 will turn this feature off. Values greater than 1.0 will cause motion blurred objects to have their effective shading rate raised even higher. According to the RenderMan Interface Version 3.1 Specification RiGeometricApproximation specifies an attribute and as such, motionfactor should be scoped within the current RiAttributeBegin-RiAttributeEnd block. In the current implementation, motionfactor is not properly scoped as an attribute, hence it should always be specified outside of the RiWorldBegin-RiWorldEnd block.

4.2.6. One-sided Primitives

Normally the renderer currently culls one-sided primitives that are backfacing. A primitive is considered backfacing if the primitive's surface normals all point more than 90 degrees away from the viewing vector. In PRMan version 3.7 and earlier, this culling was not guaranteed to occur. Primitives might not be culled even though they were truly backfacing, and no primitive was ever cut cleanly along the terminator. Thus, transparent one-sided objects may have shown inconsistent or ragged-edged results as parts, but not all, of the backfacing sections were culled. Moreover, there was a culling phase prior to shading that could have had the unexpected effect of culling backfacing geometry that a displacement shader would have subsequently moved into a front-facing orientation.

PRMan 3.8 modifies these behaviors. First, backface culling is guaranteed to occur and to be exact; no transparency artifacts as described above will occur.

Second, the threshhold for backface culling of one-sided primitives prior to shading can be adjusted with the new sides:backfacetolerance attribute. The backface culling tolerance angle is a floating-point number, measured in degrees, which specifies the angle that the primitive must exceed, beyond the “silhouette normal”, before it may be culled prior to shading. The default value is 0 degrees. For example:

	Attribute "sides" "backfacetolerance" [20]
will cause the renderer to not cull backfacing objects until their surface normals point more than 110 degrees away from the viewing vector. Note that this does not affect the fact that by the end of the rendering pipeline, backface culling is exact and occurs at 90 degrees.

4.2.7. Centered Derivatives and Normals

Starting in PRMan 3.9, derivatives and normals are calculated using a new technique which will eliminate or reduce several shading artifacts.

The new technique will change surface normals slightly, and may give bumpy surfaces a softer appearance.

Note: These changes only take effect when smooth shading is enabled (via ShadingInterpolation "smooth"). When constant shading is used (the default setting), derivatives and normals are unchanged from previous releases. Smooth shading and centered derivatives are highly recommended in order to minimize rendering artifacts.

If desired, centered derivatives can be turned off as follows:

        Attribute "derivatives" "centered"    [0]

4.2.8. Internal crack elimination

Starting in PRMan 3.9, the renderer automatically prevents cracks within single primitives, even when large displacements are used. This feature has been implemented for all surface types except polygons and implicits. It is controlled by the following attribute (turned on by default):

        Attribute "stitch" "enable" [1]

Cracks may still occur between separate primitives (for example, between two adjacent bicubic patches). As in previous releases, such cracks may be reduced by turning on binary dicing:

	Attribute "dice" "binary" [1]

4.3. RI Extensions and Limitations

This section details extensions, modifications and limitations which PhotoRealistic RenderMan has made to the rest of the RenderMan Interface, including geometric primitives and new interface routines.

4.3.1. Parameter Declarations

The RiDeclare routine, and thereby the RIB Declare directive, accept several types that are not described in the RenderMan Interface Specification Version 3.1.

The declaration storage class vertex, described in the Specification as only available in the RIB binding, is available in the C binding as well. This means that the parameter lists of geometric primitives can contain arbitrary user-parameters of storage class vertex (the Specification mentions only the geometric position parameters "P", "Pw" and "Pz" as being of storage class vertex). Such parameters will have the same number of values on any primitive as the vertex position parameters. Such parameters appear to the Shading Language in the same declaration class as varying shader parameters, however, their values will be interpolated using the same basis as the position parameter of the primitive is interpolated with (whereas normal varying parameters are bilinearly interpolated in parametric space).

A new declaration storage class constant has been defined, and requires exactly one data value for each RI primitive. In some sense, it is "more uniform than uniform". For example, a patch mesh of m x n patches requires mn data values for a uniform variable, but requires only a single data value for a constant variable.

The list of valid declaration types has been extended to include vector, normal and hpoint. As with geometric parameters of type point, parameters of these types are specified in object space and are transformed by the current transformation matrix. However, just as mathematical points, homogeneous points, direction vectors and normal vectors each transform slightly differently, so the declared type indicates which version of the vector-matrix transformation should be used. In addition, point, vector and normal parameters each contain three floating point numbers per entry, whereas hpoint (homogeneous point) parameters contain four floating point numbers per entry. The predefined position variable "Pw" is now correctly described as a vertex hpoint, and the predefined varible "N" as a varying normal.

The list of valid declaration types has been extended to include a new matrix type, which consists of 16 float values. The use of the matrix type in Shading Language is explained in the Shading Language Extensions Document.

4.3.2. NuPatch Vertex Parameters

The RenderMan Interface Specification explicitly details, for each type of primitive, the number of vertex, varying and uniform parameters which occur on that primitive. In general, there are four varying and one uniform variables on any parametric (non-polygon) primtives, with the exception of RiPatchMesh, which has a number of varying and uniform variables based on the number of subpatches in the mesh. However, the specification is silent on the matter of RiNuPatch, and in versions of PhotoRealistic RenderMan prior to version 3.6, the default four/one scheme was used for lack of more explicit direction, in a manner parallel to that of a single B-spline patch.

The number of varying and uniform variables on an RiNuPatch has now officially been deemed to be computed as if the NuPatch is a nonperiodic uniform B-spline mesh, rather than a single B-spline patch. The method of computation is as follows. An RiNuPatch is defined to have (1+nu-uorder) segments in the u parametric direction, and (1+nv-vorder) segments in the v parametric direction. An RiNuPatch is defined to have one uniform value per segment and one varying value per segment corner. The number of uniform variables is therefore nusegments*nvsegments, and the number of varying variables is therefore (nusegments+1)*(nvsegments+1). This results in redundant parameter values corresponding to repeated knot values, for instance when the knot vector indicates the RiNuPatch is in Bezier form, however the benefit of the flexibility far outweighs any burden due to the redundancy.

4.3.3. Set Coordinate System

A new call has been added to set the current transformation to be that of a named coordinate system. or in RIB: will set the current transformation matrix to be the matrix for coordinatesystem. coordinatesystem can be the name of a user defined coordinate system named using the RiCoordinateSystem call, or it can be one of the predefined coordinate systems: "raster", "NDC", "screen", "camera", "world", "object". Note that: Note that this is a new RenderMan Interface call not described by the RenderMan Interface Version 3.1 Specification.

4.3.4. Including RIB Archives

A new call has been added to read an existing RIB archive into the renderer at an arbitrary point in the Ri command stream. or in RIB: will read the named filename. Each RIB command in the archive will be parsed and executed exactly as if it had been called by the application program directly, or been in-line in the calling RIB file, as the case may be. This is essentially a RIB-file include mechanism.

In the C version, the second parameter is a callback function which will be called for any RIB user data record or structure comment which is found in the file. This routine has the same prototype as RiArchiveRecord, and allows the application routine to notice user data records and then execute special behavior based on them as the file is being read into the renderer.

Note that this is a new RenderMan Interface call not described by the RenderMan Interface Version 3.1 Specification.
Like many other routines which read files, RiReadArchive can utilize a search path to find the file to be read. The search paths for archive reads is specified by the option

Option "searchpath" "archive" ["path"]
where path is a colon separated list of directories.

4.3.5. The RiCurves Primitive

Beginning with PhotoRealistic RenderMan 3.7, a new RiCurves primitive has been added which provides a mechanism for specifying 3-D curves. One may think of this primitive as a ribbon or a string of spaghetti. It is efficient to render large numbers of these primitives, so it is ideally suited to modeling such things as hair and grass.

RiCurves( RtToken type, RtInt ncurves, RtInt nvertices[], RtToken wrap, parameterlist );

RiCurvesV( RtToken type, RtInt ncurves, RtInt nvertices[], RtToken wrap,
RtInt n, RtToken tokens[], RtPointer parms[] );

RIB BINDING EXAMPLE SEE ALSO

4.3.6. The RiPoints Primitive

Beginning with PhotoRealistic RenderMan 3.7, there is a new RiPoints primitive. The RiPoints primitive has been added to provide support for large point clouds. It is intended to be used for small particles such as sparks, snowflakes, or raindrops.

RiPoints( RtInt npoints, parameterlist );

RiPointsV( RtInt npoints, RtInt n, RtToken tokens[], RtPointer parms[] );

Draws npoints number of points. Each point is treated independently. This means a point is shaded only once and does not have access to derivative information. The size, in object space, of a point can be specified in the parameter list by using the primitive variable width. width is defined as a varying float and requires one value for each point. If width is not specified in the parameter list then it will default to 1.0 for a particle size of 1.0 units in object space. If all the points are of the same size, the user may specify the variable constantwidth, which is defined as type uniform float to supply a single width value for all points.

When using the Points primitive, keep in mind that it is meant to be used for small particles, one or two pixels in size. Certain simplifying assumptions have been made to optimize rendering for particles of this size.

RIB BINDING

EXAMPLE SEE ALSO

4.3.7. The RiSubdivisionMesh Primitive

PRMan now includes support for Catmull-Clark subdivision surfaces. Ordinary cubic B-spline surfaces are rectangular grids of tensor-product patches. Subdivision surfaces generalize these to control grids with arbitrary connectivity, so that when you want a five-sided patch at a shoulder joint you can get it, and when you need more resolution near a character's eyes and mouth you can have it without being required to increase the resolution all across the rows and columns of the control mesh. PRMan's subdivision surfaces are extended to support creases, either infinitely sharp (C0 but not C1) or rounded in a controllable way.

The RI/RIB interface for subdivision surfaces looks a lot like RiPointsPolygon, with additional parameters to permit the specification of semisharp creases, integer datatypes attached to vertices and edges, and other enhancements.

RiSubdivisionMesh(RtToken scheme,
		RtInt nfaces, RtInt nvertices[], RtInt vertices[],
		RtInt ntags, RtToken tags[], RtInt nargs[],
		RtInt intargs[], RtFloat floatargs[],
		parameterlist)

RiSubdivisionMesh defines a subdivision mesh or surface obeying the subdivision scheme specified by scheme. The token scheme is currently limited to "catmull-clark", specifying the Catmull-Clark subdivision method. The subdivision mesh is made up of nfaces faces. The array nvertices, of length nfaces, contains the number of vertices in each face. The array vertices contains, for each face vertex, an index into the vertex primitive variable arrays. The array vertices has a length equal to the sum of all the values in the array nvertices. All the arrays are 0-based.

A component is either a face, a vertex, or a chain of edges. Components of the subdivision mesh may be tagged to have various user-defined properties. The token array tags, of length ntags, identifies these tags. Each tag has zero or more integer arguments, and zero or more floating-point arguments. The number of arguments provided with each tag is specified by the array nargs, which has a length of ntags times two. For each tag, nargs contains an integer specifying the number of integer operands found in the array intargs, followed by an integer specifying the number of floating-point operands found in the array floatargs. Thus, the length of intargs is equal to the sum of all the even-numbered elements of the array nargs. The length of floatargs is equal to the sum of all the odd-numbered elements of the array nargs.

Several tags are currently defined. The "crease" tag specifies that a certain chain of edges should be a crease. This tag has n integer arguments specifying a chain of vertices that make up the crease, and one floating-point argument giving the crease's sharpness. A crease with sharpness s is subdivided using the sharp subdivision mask for the first s subdivision steps. If s is RI_INFINITY, the edge uses the sharp mask forever and the surface will be C0 but not C1 across the edge. Each sequential pair of vertices in a crease must be the endpoints of an edge of the subdivision mesh. A mesh may have any number of independent "crease" tags.

The "corner" tag may be used to mark certain vertices. This tag has n integer arguments containing the vertex numbers of the corners and either one or n floating-point arguments that specify the sharpness of the corners. A corner with sharpness s will remain fixed for the first s subdivision steps. If s is RI_INFINITY, the corner will stay fixed forever; the surface will interpolate the vertex in a C0 but not C1 manner.

The "interpolateboundary" tag specifies that the subdivision mesh should interpolate all boundary faces to their edges. This tag has zero integer arguments and zero floating-point arguments. It has the same effect as specifying that all the boundary edge-chains are sharp creases and that boundary vertices with exactly two incident edges are sharp corners.

The "hole" tag specifies that certain faces are holes. This tag has n integer arguments, one for each face that is a hole, and zero floating-point arguments. Each face is specified by its index in the nvertices array.

The "smoothtriangles" tag (available in 3.9) specifies that a special subdivision rule be applied to all triangular faces; this rule was empirically determined to make triangles subdivide more smoothly. However, it was recently shown that this rule breaks the nice property that two separate meshes can be joined seamlessly by overlapping their boundaries; i.e. when there are triangles at either boundary, it is impossible to join the meshes seamlessly. The tag introduced is meant to overstep the problem by allowing the user to turn off the offending subdivision rule. The tag has 1 integer argument (1 to turn on the rule, 0 to turn it off) and 0 floating-point arguments.

parameterlist is a list of token-array pairs where each token is one of the standard geometric primitive variables or a variable that has been defined with RiDeclare. The parameter list must include at least position ("P") information. If a primitive variable is varying, the array contains n elements of the type corresponding to the token. The number n is equal to the maximum value in the array vertices plus one. If the variable is uniform, the array contains nfaces elements of the associated type.

RIB BINDING

The number of faces is determined implicitly by the length of the nvertices array. The number of tags is determined implicitly by the length of the tags array, and must match the value as determined from the nargs array.

SEE ALSO

4.3.8. Objects

RenderMan objects, delimited by RiObjectBegin and RiObjectEnd, have always been extremely limited in that they could only define a flat, attributeless list of geometric primitives, all of the same type.

In PRMan 3.8, most, but not all, of these restrictions are removed, giving objects significantly more utility:

4.3.9. In-line Parameter Declarations

PRMan 3.8 supports a new syntax for parameter declarations. In the past, parameterlist variables needed to be declared in RiDeclare prior to their use. Now, parameters can also be declared `inline.' The syntax for the declaration is identical to the RiDeclare syntax, but the parameter declaration is not added to the global symbol table. Instead, the declaration takes effect for that one parameterlist value only. For example, the code

        Declare "roughness" "uniform float"
        Surface "plastic" "roughness" [0.3]
        Surface "benighted" "Kd" [0.5] "uniform color roughness" [0.1 0.3 1.0]
        Surface "plastic" "roughness" [0.1]
passes a color version of roughness only to the benighted surface.

4.3.10. The RiBlobby Primitive

PRMan 3.9 has support for free-form self-blending implicit-function surfaces in the style of Jim Blinn's blobby molecules, Nishimura et al.'s Metaballs and Wyvill, McPheeters and Wyvill's soft objects. Blobby surfaces may be composed of spherical and sausage-like line-segment primitives with extremely flexible control over blending. The surface type also provides for repulsion to avoid intersection with irregular ground planes, represented by prman-produced Z-files.

Blobbies may be shaded much like ordinary parametric primitives, with the caveat that they have no u and v parameters. Nevertheless, they may be given vertex values, by attaching scalar values or reference coordinate fields to primitive sub-objects that will be blended appropriately by prman. Motion-blur, depth-of-field and all of prman's other advanced sampling features also work as expected.

In the Renderman C binding, blobby implicits are specified by:

void RiBlobby(
                 RtInt nleaf,
                 RtInt ncode, RtInt code[],
                 RtInt nflt, RtFloat flt[],
                 RtInt nstr, RtString str[],
                 ...);

The code array is a sequence of machine language-like instructions describing the object's primitive blob fields and the operations that combine them. Floating point parameters of the primitive fields are stored in the floats array. File names of the z-files of repellers are in the strings array. The integer nleaf is the number of primitive blobs in object, also the number of items in each varying or vertex parameter.

Each instruction has a numeric opcode followed by a number of operands. Instructions specifying primitive fields start at 1000. They are:
OpcodeOperandsOperation
1000floatconstant
1001floatellipsoid
1002floatsegment blob
1003string, floatrepelling ground plane

For all four of these operators, the operands are indices into the appropriate arrays.

There are several more opcodes that compute composite fields by combining the results of previous instructions in various ways. Every instruction in the code array has a number, starting with zero for the first instruction, that when used as an operand refers to its result. The combining opcodes are:

OpcodeOperandsOperation
0count, ...add
1count, ...multiply
2count, ...maximum
3count, ...minimum
4dividend, divisordivide
5subtrahend, minuendsubtract
6negandnegate
7idempotentateidentity

Add, multiply, maximum and minimum all take variable numbers of arguments. The first argument is the number of operands, and the rest are indices of results computed by previous instructions. The identity operator does nothing useful, and is only included for the convenience of programs that automatically generate Renderman input.

RIB BINDING

SEE ALSO

5. PhotoRealistic RenderMan Shading Language Features and Limitations

This section describes the specific features and limitations of the implementation of the RenderMan Shading Language present in PhotoRealistic RenderMan.

5.1. Extended Features

PhotoRealistic RenderMan implements a large number of useful extensions to the RenderMan Shading Language which are not described in the RenderMan Interface Version 3.1 Specification. These extensions are detailed in the Shading Language Extensions Document.

5.2. Shading Language DSOs

PRMan 3.8 allows you to write new built-in SL functions in C or C++. Such functions overcome many of the limitations of SL-defined functions. Full documentation on the syntax, programming requirements, capabilities and limitations of this new feature are provided in the extensive on-line document Adding C Functions to Shading Language with DSOs.

5.3. Limitations

The Shading Language compiler and interpreter in PhotoRealistic RenderMan has certain limitations which must be taken into consideration when shaders are written for PhotoRealistic RenderMan. If these are not understood, shaders which seem to compile correctly will produce incorrect results.

5.3.1. Read-Only Variables

Parameters passed to a shader from the RenderMan Interface, should be treated as read-only and not modified inside the shader. Additionally, the predefined shader variable "P" should be assumed to be read-only to all but displacement shaders. (The compiler will issue a warning message if a shader modifies read-only variables.)

5.3.2. Area Functions Inside Conditionals

One shouldn't use any area or neighborhood-sensitive functions inside conditional blocks whose conditional test depends upon varying expressions. The sensitive Shading Language functions are: These functions depend on comparing various values at more than one point on the surface. The conditional partitions the object being shaded into two sets, those that passed the conditional and those that did not. Values are undefined in places where the conditional failed, but they are still referenced by their neighbors who did pass the conditional. This causes the comparisons to be undefined, and leads to visible artifacts. As a result, the following: should be coded as: This evaluates the texture access outside the conditional, allowing it to filter correctly.

Note that this is not a problem for conditional blocks whose conditional test depends upon a uniform expression, since the object cannot be partitioned into two sets by a uniform expression, by definition.

5.3.3. User-Programmed Functions

There are some programming constructs which must be avoided when writing user-programmed functions. Many, but not all, of these restrictions generate compiler warnings if they are not followed.

Functions are expanded inline by the compiler during compilation. If a function is changed, all shaders using it must be recompiled in order to use the new function. Recursive functions are not permitted.

Function parameters are passed by reference, not by value. As a result, if a function modifies a parameter, that modificiation will be reflected in the caller's variables.

Multiple return statements are not supported. User-defined functions should have only a single return statement.

Internally, the Shading Language compiler generates unique name for function parameters by concatenating the function and paramete names. This name thus generated is subject to a 32 character limitation. Care should be taken to ensure that the combined length of function and parameter names does not exceed this character limit.

5.3.4. Other Implementation Notes

The diffuse and specular functions do not normalize their arguments, as defined in the RenderMan Interface Version 3.1 Specification. Since the normal vector N usually has an extremely small length, these functions will tend to return nearly 0.0 for all points if N is not normalized before it is passed into these functions.

The specular function itself is not exactly the same as that which appears in the RenderMan Interface Version 3.1 Specification. Instead, it has been implemented as a function which is much more like that described by Blinn, and by Cook and Torrance, in Siggraph papers in 1978 and 1981. This function has much better performance at near-grazing and off-axis reflection than the documented function.

6. Helpful Hints

There are several techniques that are helpful in using the RenderMan Interface and PhotoRealistic RenderMan that may not be obvious to the novice user. This section describes some of them.

6.1. Quick Renderings

There are many times, such as when checking geometry, placing the camera, or adjusting the lights, when it is useful to be able to trade off image quality for rendering time. The most effective means of achieving this is to modify the shading rate. This controls the number of times in an image the shading computation is performed. These computations comprise a significant percentage of the time required to produce a high-quality image, so reducing them can significantly increase the speed at which an image is generated. The effect this has on the image is to reduce the smoothness of the shading, and it will make curved geometric primitives look faceted. The shading rate is controlled using the RiShadingRate command. This specifies the maximum area of a micropolygon. Because the renderer only calls a shader once for each micropolygon, a large shading rate such as 64 will cause the rendering to go much faster than a shading rate that will produce a very smooth image, such as 1.

The amount of time required to render is roughly dependent on the number of pixels covered by geometry in the image. Therefore, another way to reduce the time required to render an image is to reduce its size. This is achieved using the RiFormat command. It takes as two of its arguments the x and y resolutions of the desired image. Rendering a 256x256 image will take approximately one quarter the time required to compute a 512x512 equivalent.

Reducing the sub-pixel sampling rate will also speed up the rendering of an image. Antialiasing is performed by supersampling the image and then filtering to produce the final pixel. One can effectively turn off antialiasing by reducing the sampling rate to one sample per pixel. This is achieved by calling the RiPixelSamples command with both xsamples and ysamples set to 1. (When setting RiPixelSamples to one sample per pixel, the results will look very noisy if the "hidden" hider is used without the jitter option disabled.)

PhotoRealistic RenderMan contains an alternative hider that uses a z-buffer algorithm instead of the default stochastic algorithm. It does not handle transparency, motion blur, anti-aliasing, or depth of field. However, it does run faster, especially if the shading rate has been set to a large value. This hider may be specified by:

6.2. Other Speed Tips

Using crop windows is one of the most effective methods to reduce image rendering time. Large or complex models will often cause excessive virtual memory paging during rendering. Using crop windows to break a rendering job into several smaller tasks can eliminate excessive paging and decrease rendering time significantly (see Section 6.6). Using crop windows will have no effect on image quality.

The processing of patches and patchmeshes is somewhat more efficient than the processing of polygons and pointspolygons. For this reason, we recommend representing quadrilaterals as bilinear patches whenever possible.

Because shading rate is an attribute, it can differ from object to object in a scene. There are times when this property can be used to speed up rendering without detracting from the image quality. If an object is flat and uniformly shaded, or if it is extremely motion-blurred, it will not suffer from a high shading rate. For example, if a uniform patch is being used in a scene as a background, it can have a large shading rate on it. In this case, rendering will speed up significantly because the patch covers a large percentage of the pixels in the image. Using motionfactor will adaptively raise the shading rate for moving objects, which can greatly improve rendering speed. See Section 4.2.5 for more details.

In general, for a fixed shading rate, the computational complexity of a shader will determine the rendering time for an object. Environment maps are slower than texture maps, which are in turn slower than simple procedural shaders.

Rendering time is not directly affected by distances between objects or locations of objects in the scene, except as this positioning affects the sizes of the objects in the image. Portions of an object which extend beyond the boundaries of the viewing pyramid will have a relatively small effect on the rendering time. However, if an object crosses both the eye (camera) plane and the near clipping plane, it may require recursive splitting (see Section 4.1.7) and therefore slow down the renderer.

Setting RiSides to 1 will make the renderer discard primitives that face awayfrom the camera before they are shaded. This can speed up renderingsignificantly because only about half the shading calculations are performed. However, if the objects are defined with the wrong orientation (normals pointinginward instead of outward), the wrong half of the primitives will be culled andthe image will contain only the back halves of objects. This can be corrected byusing the attribute RiReverseOrientation on primitives with this orientation problem.

6.3. Memory Utilization

It is possible to control, to a certain degree, the amount of memory PhotoRealistic RenderMan uses. This is particularly important for systems that have limited physical memory. Such systems will either show a sharp degradation in performance or PhotoRealistic RenderMan will not complete its rendering when it surpasses the physical memory available. The most effective means of controlling memory usage is to modify the bucketsize and gridsize options and to use crop windows to render the image in small sections. See Section 4.1.2, Section 4.1.3, and Section 6.6 for a discussion of these options.

Another way of reducing memory usage is to increase the value passed to RiShadingRate. This has limited utility in that it typically degrades the quality of the image. However, it is very useful when one is performing motion blur. Motion blur can dramatically increase memory usage. Degrading the quality of the blurred objects by increasing the shading rate is usually quite acceptable since the details of the blurred objects are rather difficult to see anyway. This will both reduce memory usage and increase performance.

Using motionfactor and extremedisplacement can often save memory when motion blur or displacements are in use. See Section 4.2.5 and Section 4.1.6 for more details.

6.4. Image Quality

Under some conditions, geometric inaccuracies at the boundaries of grids may cause small holes to appear in curved primitives, especially bicubic patches and other primitives which are represented internally with bicubic patches, e.g. spheres. These "cracks" will be visible as bright or dark pixels. In addition, using a displacement shader on this type of primitive can create cracks or make them significantly worse. The problem can be alleviated to some degree by setting the binary dicing attribute (see Section 4.2.1). If this fails to solve the problem, lowering the shading rate and increasing the number of pixel samples can help, as can turning jitter off (See Section 4.1.9).

For the renderer to compute with the most accurate floating-point depth values, always set the near and far clipping planes to bound the scene as tightly as possible. This will reduce the range of z values that need to be represented. Otherwise, cracking and other numerical artifacts may appear.

6.5. Motion Blur

Use motion blur when producing frames for an animation, because without it "strobing" (temporal aliasing) effects will be visible. Motion blur extends the bounding boxes of all the moving primitives, so it slows down the renderer and uses more memory. However, because moving primitives are blurred, a higher shading rate can be used to speed things up without sacrificing image quality. Remember that jitter is necessary for motion blur to work. In addition, if the number of pixel samples is too low, the moving primitives will look noisy instead of blurred.

A motion-picture camera does not have its shutter open at all times. The shutter is closed to control the exposure and to allow the film to be advanced from frame to frame. Similarly, when using motion blur with PhotoRealistic RenderMan, one should not specify that the shutter is open at all times. If one did, it would produce very smooth motion, but the moving objects would look very fuzzy. Instead, the shutter should be open for no longer than 50% of the time. This is achieved by not having the min argument to RiShutter for the current frame be equal to the max argument for the previous frame.

6.6. High Resolution Images

There are several issues that can arise when rendering high resolution images. Because the sheer pixel area of these images is so great, a much larger amount of time and memory are required for their rendering. In theory, if everything in a scene except the output size is held constant, the rendering time is directly proportional to the number of pixels in the image. Unfortunately, this relation breaks down as the image size gets beyond a certain threshold. This happens because the increased number of micropolygons, which is also proportional to the number of pixels when the shading rate is held constant, runs up against the system's memory limitations. In addition, if there are texture maps in the scene, their resolution will have to be increased as well to maintain optimum image quality, and these larger texture maps will slow the rendering down even further. For most purposes, this limit does not pose a problem, but if images that make the most of 35mm or higher format film (2K x 1.5K pixels or larger) are required, a simple rendering will be prohibitively slow. In this case, there are several tricks that can be used to improve performance. Each can be used independently, or the techniques can be combined.

The simplest solution is to render the image at a lower resolution and resize it up to the desired output resolution using the tiffsize utility. This is easy to do, but the resulting image quality will not be as good as that of an image rendered at the full size.

Another technique that is quite useful is to use the RiCropWindow procedure to break the image into manageable pieces. By rendering only one piece of the image at a time, all of the system's resources are brought to bear on a smaller problem. Once all of the pieces are rendered, they need to be put together to make the full-sized image. If your frame buffer is large enough, you can just render the pieces into the frame buffer and save the resulting image as a single file. Otherwise, you can use the tiffjoin utility to combine several TIFF image files into one large, single TIFF image file.

The last technique that we will recommend is the image compositing method. This method requires the use of an image compositing utility, such as tiffcomp. If your scene geometry can be broken into sections that occur at different, non-overlapping depths, you can render each of these parts of the scene separately, using the full resolution for each one. This gives you several images that can be composited together to form the final image. If you are using this method, you need to render each component image with an alpha channel so that compositing can be done correctly.

6.7. Light Intensities

Many light shaders obey the inverse-square law. That is, their intensity drops off proportionally to the square of the distance from their location. A light of intensity one will thus only contribute an intensity of one one-hundredth to a surface at a distance of ten world-coordinate units. Therefore, it is common to have to set the intensities of lights with locations, such as point and spotlights, to large numbers. The actual numbers depend on the size of the model being lit. Lights that do not have locations, such as distant lights and ambient lights, don't obey the inverse-square law and, therefore, typically have intensities less than one.

6.8. Shadows

The production of shadows is a two-step process. First, a shadow depth map is generated by PhotoRealistic RenderMan that contains the relative distance from a light source to all shadow-casting objects. Secondly, this map is used by PhotoRealistic RenderMan to determine, during the rendering of a frame, whether a piece of geometry is the closest thing to the light and therefore illuminated, or if something else is closer and thus it is in shadow.

The shadow depth map is generated by rendering the scene from the point of view of the light with the following display specification:

RiDisplay("filename.shd", "shadow", RI_Z, RI_NULL);
Notice that this specifies the shadow display driver instead of the default file driver. The only file drivers distributed with PhotoRealistic RenderMan that accepts depth data are the shadow driver and the zfile driver. This may change in the future, at which time the default file driver may be used.

It is important to remember that shadow depth maps can not be generated at arbitrary resolution. The resolution (height and width) of a shadow depth map must be powers of two (e.g., 1024 x 1024, or 512 x 256). In addition, shadow depth maps should be generated with the following image options:

The trickiest part of producing the shadow depth map is setting up the camera to have the same view as the light. Light shaders typically have from and to parameters to specify their position and aim point. The following subroutine will generate an appropriate camera transformation from these parameters (this subroutine is a modification of the subroutine PlaceCamera specified on page 142 of The RenderMan Companion): If one is generating the shadow depth map for a distant light, i.e. a light with parallel rays, the shadow depth map should be generated with an orthographic projection. This is specified by: If one is generating the shadow depth map for a spotlight or pointlight, the shadow depth map should be generated with a perspective projection, i.e.: In both cases the field of view must be sufficient to enclose all the geometry that will cast shadows and, in order to preserve the greatest precision in the shadow map, this field of view should be the minimal one to contain this geometry. The field of view is controlled by RiScreenWindow and, for perspective projections, the RI_FOV parameter to RiProjection.

Pointlights present a difficult problem in that they may cast shadows in a 360-degree field of view. Such a field of view cannot be specified with RenderMan for producing the shadow depth map. There are two approaches to overcoming this problem. First, if the geometry is such that shadows are only cast in a sufficiently narrow field of view, a pointlight may be treated in the same manner as spotlights. Any geometry that falls outside the view of the shadow depth map will be treated as if it were fully illuminated by the pointlight. The other approach is to generate a set of shadow depth maps that view the geometry from the light but in different directions. This is similar to the approach taken for environment maps. A special light shader, shadowpoint, has been written that selects among the set of shadow maps depending on the direction to the point being shaded.

Since PhotoRealistic RenderMan only needs to generate depth information when producing the shadow depth map, it is not necessary to include surface shaders and lights. This will improve the performance of generating the shadow depth map as will removing all geometry that doesn't cast a shadow. Of course, one should not include a light shader that references the shadow map being generated.

An alternative to generating a shadow depth map file directly using the "shadow" display driver is to generate a simple depth file using the "zfile" display driver. A zfile must be turned into a shadow map by using either a call to RiMakeShadow or the stand-alone utility txmake. This method still requires that the height and width of the shadow texture (and hence the zfile) be powers of two.

The shadow map can then be accessed in subsequent frames by using a light-source shader that contains a call to the shadow shader subroutine. Notice that shadow returns the amount of shadow at a point in space rather than the amount of light. Therefore, light shaders typically multiply the light intensity by 1-shadow(...). The following is an example of a distant light shader that uses a shadow map:

6.9. Order of Transformations

The RenderMan Interface specifies that the transformation hierarchy is maintained as a stack of world-to-object matrices, which can be easily pushed and popped to move subobjects. This is counter-intuitive to some people and can easily lead to confusion. One must always keep in mind that in this type of transformation hierarchy, the transformations are applied to objects in reverse order of their specification. That is, to transform an object from its "object" coordinate system to the "world" coordinate system, one applies the final transformation first.

6.10. Filters

The interaction of the selection of filters and whether or not one turns jitter on can have a profound effect on the "look" of the resulting image. In general, a soft, photographic, look can be obtained by using jitter and a wide gaussian filter. This will produce good-looking antialiased results at a relatively low supersampling rate. A harder-edged look can be obtained by not using jitter, increasing the amount of supersampling, and using a narrow box filter. The judicious use of these controls can allow one to develop one's own artistic style.

7. Direct Linking to PhotoRealistic RenderMan

By far, the most common way of using PhotoRealistic RenderMan will be to link librib.a to an application so that it produces a RIB file. This file is subsequently used by render to produce the rendering. However, PhotoRealistic RenderMan also exists as a library that may be directly linked to an application. This will produce an executable that contains both the application and the renderer.

The library containing the renderer is: /usr/local/prman/prman/lib/libprman.a

8. Learning More About the RenderMan Interface

Optimal use of PhotoRealistic RenderMan requires a good understanding of the RenderMan Interface. A good way for users who are unfamiliar with the RenderMan Interface to learn about it is by working through and modifying the examples in The RenderMan Companion. Users who have learned the basics of RenderMan may wish to use the demonstration files as points of departure for exploring the more advanced capabilities of PhotoRealistic RenderMan.

Many of the example programs from The RenderMan Companion can be found in the directory In this directory, there is a sub-directory for each included chapter. Each of these contains example programs and a makefile. To compile and render all the the examples, make the target pics in this directory.

The PhotoRealistic RenderMan Tutorial is a walk-through of all these examples, and describes the details of what was involved to create working example programs from the listings in The RenderMan Companion.


RenderMan Artist Tools | RenderMan Toolkit
Looks | Textures
Pixar Home Page

Copyright © 1998 Pixar. All rights reserved. RenderMan® is a registered trademark of Pixar.
Pixar Animation Studios, 1001 West Cutting Blvd., Richmond, CA 94804
(510) 236-4000 (voice) (510) 236-0388 (fax)