|
In mental ray, the answer is a mib_color_mix node, which is found in the “Data Conversion” section of your mental ray nodes in the hypershade window.
Mental Ray reads shader information by using the Shading Group (SG) node which is automatically created when you use either a Maya or Mental Ray Illumination Shader (like the MIA material, or a simple Phong or Blinn). You cannot assign a color mix node directly to a surface, though, so you have to work around it.
Select a shader - any shader, and assign it to your object. Display the SG node in the Attribute Editor, and expand the menu rollout under the “Mental Ray” section.
Drag a mib_color_mix node into the slot marked “Material Shader” in the Mental Ray section.
Display the mib_color_mix attributes in the Attribute Editor. At the bottom you’ll see a place where you can assign a base color plus eight additional layers, starting with 0 and going up to seven. This is a simple compositing node - above the color node section you’ll see eight inputs marked “weight” - these are your alpha channels.
Up at the top, there is a section where you can specify your compositing flags on a layer by layer basis - you can use “add” or “multiply” or “blend” etc. Finally, there is a dialog box called “Num” which directs Mental Ray as to how many layers above the base should be considered for compositing. Note that the base color is NOT calculated in this - so if you have a base + two layers, the NUM should be set to 2 - even though it might seem to you that you have three layers.
The “weight” can be a simple float (grayscale) value to adjust the transparency of the layer, or you can use an image with an alpha channel.
If you want to use a bump map with a color mix node, you can set it up initially like you would set up a Maya bump map - take a texture (like a fractal, for example) and connect it to a 2D Bump node. The mib_color_mix node can’t understand a Maya bump node, so you can use a misss_set_normal node to translate it. Drag the Maya bump onto the misss_set_normal, and connect the output of the bump to the “normal” attribute. Drag the misss_set_normal onto the Color Base of the mib_color_mix node; assign another material to Color 0, set the weight to 1, the Num to 1, and the composite flag to “Add” and you’ll have the first step in a bumpy layered shader.
|