Vector RenderMan 3.7
User's Manual

Pixar
March, 1997

ABSTRACT

This document describes how to use the 3.7 release of Vector RenderMan. Vector RenderMan is a wireframe renderer that accepts 3D scene descriptions created through the RenderMan Interface. It is intended to be used as a previewing tool to facilitate the creation of RenderMan scene descriptions that will subsequently be rendered with PhotoRealistic RenderMan.


1. Introduction

Vector RenderMan is a rendering system that generates 2D wireframe images from 3D scene-description information created through the RenderMan® interface. The intent of Vector RenderMan is that it be used as a previewer for PhotoRealistic RenderMan. Since Vector RenderMan only generates wireframe images, it is considerably faster than a photorealistic renderer. Yet it complies to the geometric, camera-specification, and selected other portions of the RenderMan Interface. This, combined with its speed, makes it a useful tool for debugging and preparing RenderMan scene descriptions.

Since Vector RenderMan will normally be used in conjuction with PhotoRealistic RenderMan, this document will not attempt to describe in detail the RenderMan Interface, but rather will concentrate on its similarities and dissimilarities with PhotoRealistic RenderMan. The reader is referred to the documentation provided with PhotoRealistic RenderMan for a full discussion of the RenderMan Interface.

1.1. The RenderMan Interface

The user of Vector RenderMan creates a RIB stream using the RIB client library in the identical manner used for PhotoRealistic RenderMan. The same RIB stream may be sent to Vector RenderMan as may be sent to PhotoRealistic RenderMan. Vector RenderMan accepts both the binary-encoded or the ASCII versions of RIB.

1.2. Vector RenderMan

The executable Vector RenderMan renderer that takes a RIB file as input is called vectrman. Though it is possible to use vectrman directly, we strongly recommend using the command script render with the -vector flag, which handles all of the niceties of streams and file concatenation required by your operating system before it invokes vectrman. This is the same command script that is used with PhotoRealistic RenderMan. To have it always invoke vectrman instead of prman, one can set the environment RIRENDER. (See section 3.1).

With one exception, Vector RenderMan uses the same display mechanisms as PhotoRealistic RenderMan. (The one exception is when it is generating PostScript® output. See section 3 for more about that.) Therefore, one may use the same display drivers, including file output, with Vector RenderMan as with PhotoRealistic RenderMan whether they were supplied with PhotoRealistic RenderMan or written by a user.

Vector RenderMan is not capable of generating a zfile which is used to generate a shadow map. One must use PhotoRealistic RenderMan for this purpose.

2. RenderMan Interface Compliance

It is not possible for a wireframe renderer to meet the requirements of a RenderMan-compatible renderer as defined in the RenderMan Interface Specification. Therefore, Vector RenderMan, being a wireframe renderer, does not comply with the RenderMan Interface. It does, however, implement a subset of the interface as defined in the RenderMan Interface Version 3.1. This section details the capabilities and limitations of Vector RenderMan, first in terms of the required features described in the RenderMan Interface Version 3.1 specification and then in terms of optional capabilities.

Required features are those features specified in the document that must be present in a renderer to be able to qualify it as having implemented the RenderMan Interface. The following features correspond to those discussed in Section 1 of the RenderMan Interface Version 3.1 specification.

Graphics State
The only portions of the hierarchical graphics state provided by Vector RenderMan are transformations, color, patch bases, and patch-mesh step sizes.

Viewing Transformations
Both orthographic and perspective viewing transformations are provided.

Hidden-surface Elimination
No hidden-surface or hidden-line elimination is performed.

Antialiasing
No filtering or antialiasing is explicitly performed. PostScript output is in vector form, so that antialiasing could be performed by a PostScript processor.

Gamma Correction
No gamma correction or dithering is performed.

Picture Files
Picture files of arbitrary resolution containing RGB or RGBA may be produced. Picture files containing Z information can not be produced.

Geometric Primitives
All geometric primitives are supported. Surfaces are displayed as a grid of lines the ends of which are on the surface. Primitive variables are not supported.

Shaders and Lights
Shaders and lights are not supported.

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.

Solid Modeling
The Solid Modeling optional capability is not implemented. Vector RenderMan displays the union of all CSG primitives.

Trim Curves
The Trim Curve optional capability is incompletely implemented. RiTrimCurve does not actually trim the underlying NURBS surface. The entire surface and the entire trim curve are both displayed. The trim curve is displayed in the current color at normal intensity. The NURBS surface to be trimmed is displayed in the current color dimmed to 25% intensity.

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

Motion Blur
The Motion Blur optional capability is incompletely implemented. Vector RenderMan displays an unblurred version of the model at the shutter-open time (as specified with RiShutter). As with PhotoRealistic RenderMan, only linear blur is supported, therefore, only two times may be specified with an RiMotionBegin call. All transformations and primitives handle motion blur this way.

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

Programmable Shading
The Programmable Shading optional capability is not implemented. All calls to RiAtmosphere, RiDisplacement, RiImager, RiLightSource, and RiSurface are ignored.

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. Requests for deformation shaders are ignored.

Displacements
The Displacements optional capability is not implemented.

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 not implemented.

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

Bump Mapping
The Bump Mapping optional shading capability is not implemented.

Shadow Depth Mapping
The Shadow Depth Mapping optional shading capability is not implemented.

Volume Shading
The Volume Shading optional capability is not implemented. All calls to RiInterior and RiExterior are ignored.

Global Illumination Models
Neither the Ray Tracing nor Radiosity optional capabilities are implemented.

Area Light Sources
The Area Light Sources optional capability is not implemented.

3. Rendering Vector Images with Vector RenderMan

As with PhotoRealistic RenderMan images, Vector RenderMan images begin with a properly configured RIB file. The PhotoRealistic RenderMan User's Manual provides a description of the preparation of RIB files.

3.1. Running Vector RenderMan

Vector RenderMan is usually used through the render shell script using the -vector flag. The render command provides a simple front-end to both the PhotoRealistic RenderMan and the Vector RenderMan systems.

To render a model file containing RIB data, simply use

% render -vector model.rib

To permanently select the Vector RenderMan renderer, the RIRENDER can be set to (See the render(1) reference page, and Section 3.7 of the PhotoRealistic RenderMan User's Manual).

3.2. PostScript Output

It is possible to have Vector RenderMan generate a PostScript file. This file can then be sent to a PostScript device, such as a LaserWriter®, to produce a hardcopy of the image. Vector RenderMan normally uses the same display services and display drivers as PhotoRealistic RenderMan. This means that Vector RenderMan must convert its vector output to raster data before it sends it to the display. This is not the case, however, when the postscript driver is specified in a call to RiDisplay. The PostScript driver is built into Vector RenderMan and produces a PostScript file that contains vector information instead of raster data. This allows the PostScript device that ultimately displays the image to produce its best quality lines.

By default, Vector RenderMan generates colored lines as specified in the graphics state. If no color has been specified, the default is white. Therefore, the default is white lines on a white page. To avoid this, one should either make sure non-white colors have been specified or the fullcolor option is turned off (see Section 4.1.2). Most PostScript display devices are unable to display pixels near the edges of the page, therefore the origin option to RiDisplay should be used. The following is an example of how to specify PostScript output. It will generate the PostScript file foo.ps that specifies black lines on a white background with the origin one-half inch in from the corner of the paper.

RtInt colored = 0;
RtInt o[2] = {36, 36};

RiOption( "display", "fullcolor",
		(RtPointer)&colored, RI_NULL );
RiDisplay( "foo.ps", "postscript", "rgba",
		"origin", (RtPointer)o, RI_NULL);

4.Vector RenderMan Options and Attributes

Every implementation of a rendering program has certain implementation-specific features which are accessed through the functions RiAttribute and RiOption. Table 1 summarizes the options available in Vector RenderMan.

Table 1. Implementation-specific Options and Attributes

RIBDefaults
Option "display" "refresh" [n]
Option "display" "fullcolor" [n]
[0]
[1]
Display name,type,mode "merge" [n]
Display name,type,mode "origin" [a b]
[0]
[0 0]
Attribute "divisions" "udivisions" [n]
Attribute "divisions" "vdivisions" [n]
[10]
[10]

These defaults can be altered by appropriate settings in the configuration file, rendermn.ini, which is shared by vectrman and prman. (See the PhotoRealistic RenderMan User's Manual and the rendermn.ini(5) reference page). In particular, the configuration file entries /vectrman/refresh, /vectrman/fullcolor, /vectrman/udivisions, and /vectrman/vdivisions are specific to Vector RenderMan.

The following sections describe the attributes and options available to control the operation of Vector RenderMan. Each section gives an example of the use of the option as it would appear in RenderMan Interface.

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. Refresh

Vector RenderMan produces vectors immediately when a piece of geometry is defined. It is capable of buffering these vectors until some later time before calling the display services to actually display them. This option controls the number of vectors buffered before they are displayed. Be aware that a single piece of geometry will, in most cases, produce many vectors. The default, zero, implies that no vectors are displayed until RiWorldEnd is called. Calling the display services incurs a substantial performance expense. Therefore, the default should be used unless it is imperative to watch the order in which vectors are drawn.

RtInt refreshrate = 100;
RiOption( "display", "refresh",
		(RtPointer)&refreshrate, RI_NULL );

4.1.2. Full color

This option controls whether or not Vector RenderMan produces colored vectors or a black and white image. The default, one, causes vectors to be displayed in the color specified in the current graphics state. If fullcolor is set to zero, Vector RenderMan will produce white lines on a black background (if PostScript output has been specified, this will produce black lines on a white background). RtInt colored = 0; RiOption( "display", "fullcolor", (RtPointer)&colored, RI_NULL );

4.1.3. Frame Buffer Control

There are two options which can be enabled through the parameter list of the display command. 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):

RtInt o[2] = { 512, 384 };
RiDisplay( "", "framebuffer", "rgba",
		"origin", (RtPointer)o, RI_NULL );

Frame buffers can be configured to merge the generated image over an existing image with the display merge option:

RtInt flag = 1;
RiDisplay( "", "framebuffer", "rgba",
		"merge", (RtPointer)&flag, RI_NULL );

The merge option works only if the selected display driver supports it.

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. Divisions

All surfaces except for polygons are displayed as a grid of lines on the surface. This attribute controls the number of lines that are drawn in each of the surface's parametric directions. The value specified is the number of pieces into which the surface is divided.

RtInt udiv = 5, vdiv = 7;
RiAttribute( "divisions", "udivisions", (RtPointer)&udiv,
		"vdivisions", (RtPointer)&vdiv, RI_NULL );

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)