RSL
|
Mtor Predefined Display Channels
DisplayChannel's also enable data to be saved to a point cloud (.pct) file.
Listing 1 shows how mtor (version 7) listed its |
Listing 1
|
QuantizationWithin the renderer, data such as floats, the rgb components of colors and the xyz values of points, vectors and normals are stored with floating point precision. When saving such data into an 8 bit per channel tiff file it is necessary to convert the floating point data into integer values - a process known as quantitization. DisplayChannel "float t" "quantize" [0 0 0 0] "dither" [0] Display "+PATH/untitled_t.tif" "tiff" "t" "quantize" [0 255 0 255] "dither" [0.5] Without any quantization the output image would be a 32bit/channel (4,294,967,296 values per channel) tiff file ie. Display "+PATH/untitled_t.tif" "tiff" "t" "quantize" [0 0 0 0] "dither" [0.0] Or a 16bit/channel (65,536 values per channel) tiff file ie. Display "+PATH/untitled_t.tif" "tiff" "t" "quantize" [0 65535 0 65535] "dither" [0.0] For an excellent explanation of quantization refer to page 41 of "Advanced RenderMan" by Tony Apodaca and Larry Gritz. Also refer to, Using Arbitrary Output Variables in PhotoRealistic Renderman - prman_technical_rendering/AppNotes/appnote.24.html |
Generating a secondary image that "encodes" a primitive variable is straight
forward because such variables are inherently known to the renderer.
This is not true for shader output variables or AOV's (arbitary output variables).
For example, figure 2 shows a secondary image (render pass) that contains
"_specular" data.
Only by rendering the teapot using a shader that assigns values to a variable that it declares as, output varying color _specular = 0;
and that also specifies a DisplayChannel "color _specular" "quantize" [0 0 0 0] "dither" [0]
can a secondary image (pass) be generated. Alternatively, if Pixar's Slim is used
to make a shading network an AOV can be outputted that way. Whether a hand coded
or Slim generated shader is used unless it declares an |
Listing 2
|
The shader shown in listing 3 uses an output varying variable to "pipe" data into a point cloud. Listing 3
A rib file that uses the "bake_out" shader might do so in this way. Surface "bake_out" "channel" ["_specular"] "bakefile" ["spec.ptc"]
|
© 2002- Malcolm Kesson. All rights reserved.