Imaging Workflow

Imaging Workflow

RenderMan for Maya's flexibility extends even to its imaging pipeline. Here we present an overview of the settings that control imaging and the motivations for the defaults that we've chosen.

Background

RenderMan for Maya's defaults have been set for a linear workflow. The reason for this is that the renderer is calculating images based on models with assumptions, for example, that addition of two lights or the sum of two luminance values would simply be equal to the numerical sum of their values. This sounds so obvious that you might be wondering why it would even come up. The answer lies in image encoding, which is not at all obvious.

For a variety of reasons, most images are stored as 8 bits per component (red, green and blue). This is based simply on economics and the limits of our eyes. What is not obvious is the exact meaning of each component value; this is the encoding. If you make the the component values relative to a fixed constant of luminance (the "obvious" thing) that doesn't work very well at all. A lot has been written on this topic so instead of repeating it here, you may want to read Charles Poynton's excellent Gamma FAQ. Briefly: instead of a fixed luminace ratio, an encoding is picked that makes the best possible use of the 8 bits, in the sense that the code values are, to our eyes, equally spaced in brightness. Brightness is not a measurable quantity in physical science sense, so this is referred to as perceptually linear. A very common encoding that does this is sRGB. It is not perfect at being perceptually linear, but it has other convenient properties to compensate, so to speak.

There are two major places where this encoding of 8 bit data needs to be handled. The first is in texture files, which are also often stored in 8 bit files and will also often use sRGB encoding. This is very important in shading. When the shader is operating on the values in the texture it will most likely assume these values are of luminance. Therefore, before the values are used they must be decoded from sRGB. Various controls in RMS applications and shading nodes control when this decoding occurs. We will go into further detail below.

The second major place is in image display. If the renderer is operating in linear space, then before you display the image something needs to happen to the code values before they are displayed. Also, if you want to view your sRGB-encoded image files, they'll need to be handled correctly as well.


レンダリング Controls

The default values for the Exposure controls for the renderer for both gain and gamma are 1.0. Leave them set to this for a linear workflow.

テクスチャ Decoding Controls

If your textures are painted, captured, or stored in sRGB then you need to ensure they are converted when read in. If you are using the maps in the RMSGPSurface node, make sure the sRGB Maps parameter is turned on. If you are using Slim and the ImageFile node, check the Linearize option, under the カラー Balance collection.

Slim Preview レンダリング

The default value of 1.0 for gain and 2.2 for gamma provides a close approximation to sRGB for images in the Slim preview swatch. Note that care must be taken if you are using Slim's File->Export Appearance->As テクスチャ feature, since the pixel values will be already encoded with this gamma.

レンダリング to "it"

When rendering to "it" in a linear workflow, assuming your monitor is already calibrated to the sRGB standard or something similar (like a target gamma of 2.2), then you should use the sRGB view mapping "it" provides. Note "it" does not alter the rendered pixel values in its memory buffers when you change view mapping. Conversely, if you open an sRGB encoded image or texture file, you should choose to view this image using the "linear" mapping. This might seem counterintuitive, but it is because the view mapping operation inside "it" is there to encode into whatever space your display is set to. So an image already in sRGB needs no further processing by "it", and hence "linear" is the correct choice. The luminance relative values coming from the renderer need to be encoded into sRGB before "it" displays them.

"it" has a display mode called type default that uses a simple decision set up in the Preferences dialog on how to display an image.


Image Mapping in Maya

To get the same result viewing renders in Maya's Render View, select the カラー Management node in the Attribute Editor (Display->カラー Management... in the Render View window) and set the Image カラー Profile to Linear sRGB and the Display カラー Profile to sRGB.

The カラー Management node is applied automagically, or it can be wired in arbitrarily.

  • Note

    Unfortunately the display of shader swatches in Maya is not supported by the カラー Management node, so the preview renders of swatches are incorrectly represented. For a normal display the preview renders will be too dark.


Encoding in Files

Even though you always need to encode to sRGB to get correct view results in "it" on an sRGB monitor, you need not store your images in that format. The renderer and "it" fully support floating point and the Half (in OpenEXR) formats, so, at the expense of disk space, you can avoid losing precision if you intend to do further processing on your rendered images. It is not recommended or practical to store linear luminance level images in 8 bit formats (see the Gamma FAQ referenced above) since there is not enough precision in 8 bits to do that.

If you need to store 8 bit versions of images, "it" has several features to help. You can individually choose to "burn in" the current view mapping to an image from the Command menu, or you can select the Burn In Mapping On Save checkbox in your Preferences, which will perform the encoding whenever you save.