Go to: Related nodes. Attributes.

Use a Layered Shader to combine two or more shaders into a single shader, or to combine two or more textures into a single texture.

To do this, connect the Out Color attribute of two or more shaders (or textures) to the Color attribute of this node. Then use the Transparency attribute for each input color to control its contribution to the output color of this node.

You can also connect the Out Transparency attribute of the other shaders to the Transparency attribute of this shader. These transparency values will then determine the contribution of each input shader to this Layered Shader.

Similarly, the Out Glow attributes of other shaders can be connected to the Glow attribute of this shader. These glow value will be combined, just like the colors.

In the table below, important attribute have their names indicated in bold in the description column.

This node is MP safe

Node nameParentsClassificationMFn typeCompatible function sets

Related nodes

lambert, reflect, phongE, phong, blinn, anisotropic, volumeShader, simpleVolumeShader, surfaceShader, displacementShader, useBackground, defaultShaderList, shadingMap

Attributes (41)

color, colorB, colorG, colorR, compositingFlag, glowColor, glowColorB, glowColorG, glowColorR, hardwareColor, hardwareColorB, hardwareColorG, hardwareColorR, hardwareShader, hardwareShaderB, hardwareShaderG, hardwareShaderR, inputs, matteOpacity, matteOpacityMode, outColor, outColorB, outColorG, outColorR, outGlowColor, outGlowColorB, outGlowColorG, outGlowColorR, outMatteOpacity, outMatteOpacityB, outMatteOpacityG, outMatteOpacityR, outTransparency, outTransparencyB, outTransparencyG, outTransparencyR, renderPassMode, transparency, transparencyB, transparencyG, transparencyR

Long name (short name)TypeDefaultFlags
compositingFlag (cf) enum0outputinputconnectablestorable
Use the Compositing Flag to control how the different input shaders or textures are combined together. It has two modes:
  • Layer Shaders: Use this setting if you are combining multiple shaders into a single new shader.
  • Layer Texture: Use this setting if you are combining multiple textures into a single new texture.
inputs (cs) compoundn/aarrayoutputinputconnectablestorable
This is the list of input colors, transparencies, and glows that will be combined in this Layered Shader.
color (c) float3outputinputconnectablestorable
Color affects the final color of the layered shader. Connect the output color attributes of other shaders to this attribute to combine them into a single shader.
colorR (cr) float0.0outputinputconnectablestorablekeyable
color red value
colorG (cg) float0.0outputinputconnectablestorablekeyable
color green value
colorB (cb) float0.0outputinputconnectablestorablekeyable
color blue value
transparency (t) float3outputinputconnectablestorable
Transparency controls the amount each color input contributes to the final color of this shader. This attribute has a different value for each input color. Set this darker to make the layer more opaque (that is, to make the layer contributes more). Set this brighter to make the layer more transparent.
transparencyR (tr) float1.0outputinputconnectablestorablekeyable
Transparency red value
transparencyG (tg) float1.0outputinputconnectablestorablekeyable
Transparency green value
transparencyB (tb) float1.0outputinputconnectablestorablekeyable
Transparency blue value
glowColor (g) float3outputinputconnectablestorable
Glow Color allows you to combine the glow attributes of the input shaders into a single glow, just as you combine the colors. Connect the Output Glow Color of the other shaders to this attribute. The Transparency values above will be applied when combining the glow values.
glowColorR (gr) float0.0outputinputconnectablestorablekeyable
glow color red value
glowColorG (gg) float0.0outputinputconnectablestorablekeyable
glow color green value
glowColorB (gb) float0.0outputinputconnectablestorablekeyable
glow color blue value
renderPassMode (rpm) enum1outputinputconnectablestorablekeyable
controls how the node affects material render passes.
hardwareColor (hc) float3outputinputstorable
Hardware Color tells Maya what color to make the material appear when you are looking at the view in shaded mode. This is not used when rendering, only for faster display. When the final image is rendered, you will see the layers in the layered shader.
hardwareColorR (hcr) float0.5outputinputstorable
hardware color R value
hardwareColorG (hcg) float0.5outputinputstorable
hardware color G value
hardwareColorB (hcb) float0.5outputinputstorable
hardware color B value
hardwareShader (hws) float3outputinputconnectable
Attribute to be connected to a hardware shader in order to override drawing in the 3d view.
hardwareShaderR (hwr) float0.0outputinputconnectable
Red component.
hardwareShaderG (hwg) float0.0outputinputconnectable
Green component.
hardwareShaderB (hwb) float0.0outputinputconnectable
Blue component.
outColor (oc) float3outputconnectable
output color
outColorR (ocr) float0.0outputconnectable
outColor red value
outColorG (ocg) float0.0outputconnectable
outColor green value
outColorB (ocb) float0.0outputconnectable
outColor blue value
outTransparency (ot) float3outputconnectable
output Transparency
outTransparencyR (otr) float0.0outputconnectable
outTransparency red value
outTransparencyG (otg) float0.0outputconnectable
outTransparency green value
outTransparencyB (otb) float0.0outputconnectable
outTransparency blue value
outGlowColor (ogc) float3outputconnectable
output color
outGlowColorR (ogr) float0.0outputconnectable
outGlowColor red value
outGlowColorG (ogg) float0.0outputconnectable
outGlowColor green value
outGlowColorB (ogb) float0.0outputconnectable
outGlowColor blue value
matteOpacityMode (mom) enum2outputinputconnectablestorable
Matte Opacity Mode controls how the system will use the Matte Opacity attribute (below). When you are rendering with a matte (i.e. an alpha channel, or mask), these two attributes are used to control how this material will show up in the matte. This is useful if you will be compositing your rendered images later on.

There are three settings, used for different purposes:

    Opacity Gain: (the default). Matte values are calculated in the normal way (based on the transparency of the object) then multiplied by the Matte Opacity. (Matte Opacity has a default value of one, by default these attributes have no effect.) With Opacity Gain, you can animate the Matte Opacity value to change the overall transparency of the object when it is later composited.

    Solid Matte: This is like Opacity Gain, except that the normally-calculated matte values are ignored in favor of the Matte Opacity setting. The entire matte for the object is set to the value of the Matte Opacity attribute. If there are transparent areas on the object, their transparency is ignored in the matte. Use this setting to composite an object with transparent parts, when you don't want the background to show through them.

    Black Hole: The value of Matte Opacity is ignored, and all the matte for this material is set to be transparent. Use this when you are creating substitute geometry in a scene, which is standing in for objects in a background image that you will be compositing with later. Your stand-in objects will 'punch a hole' in the matte. This allows other computer-generated geometry to pass behind your stand-in objects. Later, when foreground and background are composited, the results will be correct, with the background object showing through the 'black hole' areas.

matteOpacity (mog) float1.0outputinputconnectablestorablekeyable
Matte Opacity is used (along with Matte Opactiy Mode) to affect how the matte (i.e. alpha channel or mask) for this material will be calculated. See Matte Opacity Mode above for full details.
outMatteOpacity (omo) float3outputconnectable
output Matte Opacity
outMatteOpacityR (omor) float0.0outputconnectable
output Matte Opacity red value
outMatteOpacityG (omog) float0.0outputconnectable
output Matte Opacity green value
outMatteOpacityB (omob) float0.0outputconnectable
output Matte Opacity blue value