Tuesday, October 6, 2009


Since long time I was thinking to post rendering RGB(primary color) mattes in Maya to tweak lighting out put in any compositing software. After receiving mail from Jesper Hammarb├Ąck I am posting it right now. particularly if you are using Maya 2009 or greater, its a great comfort to render more RGB mattes at a time by using new renderpass feature with mentalray. I am going to explain rendering RGB mattes of a car model using Maya 2009 MentalRay. This is the Car Model...

Lets start preparing shaders for RGB mattes. With Maya 2009 MentalRay we can seperate

even we can render in to more type of passes according to the shader what we use. These type of passes can be used to render multiple RGB mattes in a single render.
First: preparing rgb mattes in ambient color.
create a Lambert shader change color value to white, ambient value to red and change rest of the values to "0".as shown in this images.choose pure red (value 1) in color chooser and leave blue and green values to "0".

repeat same steps by changing values for green and blue as shown in below images

assign these shaders to the geometry in the scene.(I assigned to the wheels of this car)
now we will start preparing rgb mattes in incandescence. (you can render only 3 mattes at a time if you have more geometry parts to control you need to render many rgb mattes instead of rendering more scenes we will prepare shaders with with different channels and assign to different parts of the geometry and render in to seperate passes so that you could get more rgb mattes in a single render)like this

Now we prepare another shader to render RGB mattes in reflection pass. This is little complex than the earlier passes. First create a phong shader change; color, transparency, ambient color and incandescence channels to black and connect ramp in specular and reflected color channels change ramp to red color and cosine power and reflectivity values to 100 and 1 respectively like the images below..

Now we have 3 shaders with 3 RGB passes each i.e we get 9 RGB mattes in one render.Assign these shaders to nine different objects in scene and follow render settings like this

Now associate the render passes with renderlayer and render it you could get render output in to 4 passes consisting of RGB mattes/masks. Here is the output

if you need a tool to download based on this, you can visit http://pragmaticartistry.com/.

No comments: