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.

<strong>The</strong> standard types are ”hidden” and ”null”. ”hidden”, which is the default, performs<br />

standard hidden-surface computations. <strong>The</strong> hider ”null” performs no pixel computation<br />

and hence produces no output. Other implementation-specific hidden-surface<br />

algorithms can also be selected using this routine; for example, an implementation<br />

may choose to support type ”paint”, which might draw the objects in the order in<br />

which they are defined.<br />

RIB BINDING<br />

Hider type ...parameterlist...<br />

EXAMPLE<br />

RiHider ”paint”<br />

Rendering programs compute color values in some spectral color space. This implies that<br />

multiplying two colors corresponds to interpreting one of the colors as a light and the<br />

other as a filter and passing light through the filter. Adding two colors corresponds to<br />

adding two lights. <strong>The</strong> default color space is NTSC-standard RGB; this color space has<br />

three samples. Color values of 0 are interpreted as black (or transparent) and values of 1<br />

are interpreted as white (or opaque), although values outside this range are allowed.<br />

RiColorSamples ( RtInt n, RtFloat nRGB[], RtFloat RGBn[] )<br />

This function controls the number of color components or samples to be used in specifying<br />

colors. By default, n is 3, which is appropriate for RGB color values. Setting<br />

n to 1 forces the rendering program to use only a single color component. <strong>The</strong> array<br />

nRGB is an n by 3 transformation matrix that is used to convert n component colors<br />

to 3 component NTSC-standard RGB colors. This is needed if the rendering program<br />

cannot handle multiple components. <strong>The</strong> array RGBn is a 3 by n transformation matrix<br />

that is used to convert 3 component NTSC-standard RGB colors to n component<br />

colors. This is mainly used for transforming constant colors specified as color triples<br />

in the Shading Language to the representation being used by the <strong>RenderMan</strong> <strong>Interface</strong>.<br />

Calling this procedure effectively redefines the type RtColor to be<br />

typedef RtFloat RtColor [n];<br />

After a call to RiColorSamples, all subsequent color arguments are assumed to be<br />

this size.<br />

If the Spectral Color capability is not supported by a particular implementation, that<br />

implementation will still accept multiple component colors, but will immediately<br />

convert them to RGB color space and do all internal calculations with 3 component<br />

colors.<br />

RIB BINDING<br />

ColorSamples nRGB RGBn<br />

35

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

Saved successfully!

Ooh no, something went wrong!