Maya Mental Ray writeToLabelBuffer

If you need to create Label IDs for compositing you can use the following procedure. This is just an alternative solutions apart from the others available.

Create a mental ray camera output pass called label 1×32 which is a framebuffer required for the labels. Next you select your objects and run the script below.

What the script will do is assign a random number to your selected objects. For any color of the ID you can have a range between 0-100, otherwise if you want specific color, each color is tagged with a number, for example 1 = green, 2 = red etc.. Note: this does not work with exr in 2008, only png or similar formats. It does not work with any kind of motion blur, i.e. rapid motion or scanline motion blur will fail to output label.

[cpp]
global proc random_Attr() 

string $objName[]=`ls -sl`; 
string $temp; 
string $tempAttr; 
float $randValue;

Depression is a recognized complication of inflammatory and autoimmune disorders. buying generic viagra By embracing the option, the number of road accidents has been reduced and also online pharmacy for levitra the time spent en route is pleasantly filled with reading, napping and listening to music. Also, the penis ought to be embedded into the pump, and viagra no prescription india pushed until the penis gets erect, and from that point, check whether all is well or not, furthermore whether the weight connected is of solace or not. If both the men and pfizer viagra cheap their partner are not sexually stimulated. for ($temp in $objName)

$randValue=rand(0 , 100); 
addAttr -ln miLabel -at long $temp; 
$tempAttr=$temp+".miLabel"; 
setAttr $tempAttr $randValue;
print "your miLable has been added";</pre>
}
}[/cpp]

source


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.