RenderMan supports alpha transparency by allowing Bxdfs to return a colored transmission/opacity value so that transmission may be accumulated along camera and indirect rays for use with compositing.
Let's start with a simple example where there is only one fully opaque yellow plane in the scene. On the left we have the beauty image, and on the right we have the alpha channel.
Now let's add a thin pane of glass in front of the yellow plane and we get the beauty on the left, alpha on the right. Because a refractive object is considered opaque from the point of view of a ray hitting its surface, the alpha channel is fully opaque.
To turn on alpha for compositing:
- Add "int accumOpacity"  to the PxrPathTracer integrator line in the rib file, or click accumOpacity checkbox in bridge tools.
- Make sure numIndirectSamples is greater than zero. If no indirect rays were created, all surface hits will be considered fully opaque.
- Make sure maxPathLength in PxrPathTracer is set to be long enough for the camera paths to reach the end of your scene. For example, if you have 5 panes of glass and the max path is 1, the ray will not go through all the glass before it terminates and cannot generate the correct alpha values. (Also make sure that the maxspeculardepth Attribute is set high enough.)
- Use or write a Bxdf that has a transmit lobe. Examples of such include PxrSurface, etc.
Now let's see the rendered results with alpha values reflecting the transparent nature of glass.