This tip describes how to create multiple masks with Renderman. This technique comes to expand the simple RGBA as masks technique. The problem with masks is usually anti-aliasing. If you use an object channel, it can only have a discreet value for each pixel, meaning that each pixel can hold only one object id value (as demonstrated in the image below,) and this means no anti-aliasing.
In a recent job, I needed to create a dynamic user interface in Maya. I don't really like MEL, so I decided to go with Python. This was the first time I really used Python for anything.
One of the reasons I don't like MEL, is it kind of forces you to use global variables (using local ones becomes a pain if not impossible at some point.)
So, on I went and wrote something like this: