Renderman User Documentation
Arbitrary Output Variables


Animation and Visual Effect pipelines commonly use renderpasses to output elements of imagery in seperate files. This allows post-render modification (compositing).

Where Renderman stands out is with AOVs. Renderman allows the user to declare specific data output (AOV) in shader language. Knowledge of RSL and RiSpec can see this done.

To output an AOV, two things must be done.
1. The .rib file must declare the new channel. This tells Renderman to create a new ouput.
2. The new channel must be declared in RSL in the shader. This tells Renderman what information to put in that channel.

Figure 01: Default Pass

Figure 01 shows a turntable with the most simple surface shaders. We want to add occlusion and depth to this sequence to make it more interesting. However, we want this information to be outputted in seperate sequences - that way we can control the effects of layering the footage in compositing.

Let's start with depth. Figure 02 shows a simple depth shader. Zdepth is defined from the inverse of the Renderman depth function [1 - depth(P)].

Depth outputs as a float. We have successfully declared our channel surface shader. Next, we need to declare the channel with RiSpec in .rib.

 

Figure 02: Surface Shader zdepth Channel Declared

Figure 03 shows the header of our .rib file. The red text activates our depth channels.

[DisplayChannel "float zdepth"] holds parameter information for our new depth channel.

The following two lines of RiSpec declare the channels for the renderer. The rgba line is our default beauty pass, while zdepth line is our new depth AOV.

Note: The pound key is not part of syntax.

 

Figure 03: .rib Header Declaring new Channel


With Depth declared in our surface shader, and a depth channel declared in the .rib, we generate a rendered sequence outside of the beauty pass - the depth pass, Figure 04.

The same method used for occlusion. Occlusion is greyscale, so can be outputted as a float as well.

Figure 05 shows the occlusion sequence. Be sure to have raytracing activated in the .rib or else not achieve results.

Figure 06 shows the final composite.

Figure 04: Depth Channel Sequence


Note:
The purpose of this write-up is to explore the development of Display Channels and outputting AOVs.

When compositing a shot, the depth pass is not usually implemented with a multiply function.

Figure 05: Occlusion Channel Sequence

 

Figure 06: Composited Sequence (surface * occlusion * depth)