26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C.2 RIB Binding<br />

<strong>The</strong> <strong>RenderMan</strong> <strong>Interface</strong> Bytestream Protocol, abbreviated RIB, is a byte-oriented protocol<br />

for specifying requests to the <strong>RenderMan</strong> <strong>Interface</strong> (RI) library. RIB permits clients of the<br />

<strong>RenderMan</strong> <strong>Interface</strong> to communicate requests to a remote rendering service, or to save<br />

requests in a file for later submission to a renderer. To satisfy the many different needs of<br />

clients, the protocol is designed to provide both<br />

• an understandable (potentially) interactive interface to a rendering server, and<br />

• a compact encoded format that minimizes transmission time (and space when stored<br />

in a file)<br />

RIB also strives to minimize the amount of communication from a server to a client. This<br />

is particularly important in the situation where no communication is possible; e.g., when<br />

recording RIB in a file.<br />

RIB is a byte stream protocol. That is, RIB interpreters work by scanning the input stream<br />

one byte at a time. This implies interpreters should make no assumptions about data alignment.<br />

<strong>The</strong> protocol is best thought of as a command language where tokens in the input<br />

stream can be transmitted either as 7-bit ASCII strings or, optionally, as compressed binary<br />

data. <strong>The</strong> ASCII interface provides a convenient interface for users to interactively communicate<br />

with a rendering server and for developers to debug systems that generate RIB. <strong>The</strong><br />

binary encoding significantly compresses the data stream associated with an RI description<br />

with an associated savings in communication overhead and/or file storage cost.<br />

C.2.1<br />

Syntax rules<br />

<strong>RenderMan</strong> <strong>Interface</strong> Protocol requests are constructed from sequences of tokens. Tokens<br />

are formed by the input scanner by grouping characters according to the RIB syntax rules<br />

(described below). Other than requirements associated with delimiting tokens, RIB employs<br />

a free format syntax.<br />

Character set<br />

<strong>The</strong> standard character set is the printable subset of the ASCII character set, plus the characters<br />

space, tab, and newline (return or line-feed). Non-printing characters are accepted,<br />

but are discouraged as they impair portability.<br />

<strong>The</strong> characters space, tab, and newline are referred to as white space characters and are<br />

treated equivalently (except when they appear in comments or strings). White space is<br />

used to delimit syntactic constructs such as identifiers or numbers. Any number of consecutive<br />

white space characters are treated as a single white space character.<br />

<strong>The</strong> characters ‘”’, ’#’, ’[’, and ’]’ are special: they delimit syntactic entities. All other characters<br />

are termed regular characters and may be used in constructing syntactic entities such as<br />

identifiers and numbers.<br />

175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!