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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RiExposure<br />

RiQuantize ( RtToken type, RtInt one, RtInt min, RtInt max, RtFloat ditheramplitude )<br />

Set the quantization parameters for colors or depth. If type is ”rgba”, then color and<br />

opacity quantization are set. If type is ”z”, then depth quantization is set. <strong>The</strong> value<br />

one defines the mapping from floating-point values to fixed point values. If one is 0,<br />

then quantization is not done and values are output as floating point numbers.<br />

Dithering is performed by adding a random number to the floating-point values before<br />

they are rounded to the nearest integer. <strong>The</strong> added value is scaled to lie between<br />

plus and minus the dither amplitude. If ditheramplitude is 0, dithering is turned off.<br />

Quantized values are computed using the following formula:<br />

value = round( one * value + ditheramplitude * random() );<br />

value = clamp( value, min, max );<br />

where random returns a random number between ±1.0, and clamp clips its first argument<br />

so that it lies between min and max.<br />

By default color pixel values are dithered with an amplitude of 0.5 and quantization<br />

is performed for an 8-bit display with a one of 255. Quantization and dithering and<br />

not performed for depth values (by default).<br />

RIB BINDING<br />

Quantize type one min max ditheramplitude<br />

EXAMPLE<br />

RiQuantize (RI RGBA, 2048, -1024, 3071, 1.0);<br />

SEE ALSO<br />

RiDisplay, RiImager<br />

RiDisplay ( RtToken name, RtToken type, RtToken mode, ...parameterlist...)<br />

Choose a display by name and set the type of output being generated. name is either<br />

the name of a picture file or the name of the framebuffer, depending on type.<br />

<strong>The</strong> type of display is the display format, output device, or output driver. All implementations<br />

must support the type names ”framebuffer” and ”file”, which indicate<br />

that the renderer should select the default framebuffer or default file format, respectively.<br />

Implementations may support any number of particular formats or devices<br />

(for example, ”tiff” might indicate that a TIFF file should be written), and may allow<br />

the supported formats to be user-extensible in an implementation-specific manner.<br />

<strong>The</strong> mode indicates what data are to be output in this display stream. All renderers<br />

must support any combination (string concatenation) of ”rgb” for color (usually red,<br />

green and blue intensities unless there are more or less than 3 color samples; see the<br />

next section, Additional options), ”a” for alpha, and ”z” for depth values, in that order.<br />

33

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

Saved successfully!

Ooh no, something went wrong!