Maya Mental Ray tips for ambient occlusion exclusion and other tales (published Jul 29, 2008)
Let's say you don't want an object to occlude its self:
add a custom attribute to the object's main node not the Shape node
select object
addAttr -ln miLabel; (shows up in the attribute editor under Extra Attributes) again, not in the shape node.
or be more specific in the mel command:
addAttr -ln miLabel -at long various;
change the MI Lable attribute of the object to a number other than zero
in your ambient occlusion shader change the Id Nonself attribute to the same number as above.
lots of other shaders use the miLabel attribute
this page talks about adding attributes to mentalrayGlobals as well.
occlusion shader in maya docs
one to grow on.
This tip came from Steve Cummings. Thanks Steve!