Go to: Related nodes. Attributes.

Use a Surface Shader when you want to completely control the color, transparency and matte opacity of a material. This kind of shader does no shading calculation of any kind. Rather, it allows you connect other attributes directly to its color, glow color, and transparency. It completely ignores everything else that would normally affect a shader.

For example, if you connect the Translate attribute of an object to the Out Color attribute of a Surface Shader, then the color of the shader will depend on the position of the object in space. As the object moves, it will change color.

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

This node is MP safe

Node nameParentsClassificationMFn typeCompatible function sets
surfaceShaderdependNodeshader/surface/utilitykSurfaceShaderkBase
kNamedObject
kDependencyNode
kSurfaceShader

Related nodes

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

Attributes (52)

The following quick index only shows top-level attributes (too many attributes to show them all): materialAlphaGain, miAbsorbs, miAngle, miColor (3), miDeriveFromMaya, miDiffuse, miFrameBufferWriteFactor, miFrameBufferWriteFlags, miFrameBufferWriteOperation, miNormalCamera (3), miReflectivity, miRefractions, miRefractiveIndex, miShinyness, miSpecularColor (3), miSpreadX, miSpreadY, miTranslucence, miTranslucenceFocus, miTransparency (3), miWhiteness (3), outColor (3), outGlowColor (3), outMatteOpacity (3), outTransparency (3)

Long name (short name)TypeDefaultFlags
outColor (oc) float30.0, 0.0, 0.0outputinputconnectablestorable
Out Color. Connect another attribute to this to control the color of the material with that attribute.
outColorR (ocr) float0.0outputinputconnectablestorable
Out Color red value
outColorG (ocg) float0.0outputinputconnectablestorable
Out Color green value
outColorB (ocb) float0.0outputinputconnectablestorable
Out Color blue value
outTransparency (ot) float30.0, 0.0, 0.0outputinputconnectablestorable
Out Transparency. Connect another attribute to this to control the transparency of the material.
outTransparencyR (otr) float0.0outputinputconnectablestorable
Out Transparency red value
outTransparencyG (otg) float0.0outputinputconnectablestorable
Out Transparency green value
outTransparencyB (otb) float0.0outputinputconnectablestorable
Out Transparency blue value
outMatteOpacity (omo) float31.0, 1.0, 1.0outputinputconnectablestorable
Out Matte Opacity. Connect another attribute to this to control the opacity of the material's matte (alpha) channel.
outMatteOpacityR (omor) float0.0outputinputconnectablestorable
Out Matte Opacity red value
outMatteOpacityG (omog) float0.0outputinputconnectablestorable
Out Matte Opacity green value
outMatteOpacityB (omob) float0.0outputinputconnectablestorable
Out Matte Opacity blue value
outGlowColor (og) float30.0, 0.0, 0.0outputinputconnectablestorable
Out Glow Color. Connect another attribute to this to control the glow color of the material.
outGlowColorR (ogr) float0.0outputinputconnectablestorable
Out Glow Color red value
outGlowColorG (ogg) float0.0outputinputconnectablestorable
Out Glow Color green value
outGlowColorB (ogb) float0.0outputinputconnectablestorable
Out Glow Color blue value
miDeriveFromMaya (mifm) booltrueoutputinputconnectablestorable
Derive photon shader parameters from the shading node if enabled, otherwise use explicit mental ray attributes.
miShinyness (mis) float10outputinputconnectablestorable
Photon shader shinyness parameter to control glossy reflection and refraction.
miAngle (mia) float0outputinputconnectablestorable
Photon shader angle parameter to control direction of anisotropic feature.
miSpreadX (misx) float10outputinputconnectablestorable
Photon shader x spread parameter to control size of anisotropic feature in x direction.
miSpreadY (misy) float5outputinputconnectablestorable
Photon shader spread parameter to control size of anisotropic feature in y direction.
miWhiteness (miwn) float3outputinputconnectablestorable
Photon shader whiteness parameter.
miWhitenessR (miwnr) float0.5outputinputconnectablestorable
Red component
miWhitenessG (miwng) float0.5outputinputconnectablestorable
Green component
miWhitenessB (miwnb) float0.5outputinputconnectablestorable
Blue component
miSpecularColor (misc) float3outputinputconnectablestorable
Photon shader specular color parameter.
miSpecularColorR (miscr) float0.5outputinputconnectablestorable
Red component
miSpecularColorG (miscg) float0.5outputinputconnectablestorable
Green component
miSpecularColorB (miscb) float0.5outputinputconnectablestorable
Blue component
miReflectivity (mirf) float0.5outputinputconnectablestorable
Photon shader reflectivity parameter.
miRefractiveIndex (miri) float1outputinputconnectablestorable
Photon shader index-of-refraction parameter.
miRefractions (mirc) booltrueoutputinputconnectablestorable
Photon shader refractions parameter.
miAbsorbs (miab) booltrueoutputinputconnectablestorable
Photon shader absorption parameter.
miDiffuse (midc) float0.8outputinputconnectablestorable
Photon shader diffuse parameter.
miColor (mic) float3outputinputconnectablestorable
Photon shader base color parameter.
miColorR (micr) float0.5outputinputconnectablestorable
Red component
miColorG (micg) float0.5outputinputconnectablestorable
Green component
miColorB (micb) float0.5outputinputconnectablestorable
Blue component
miTransparency (mit) float3outputinputconnectablestorable
Photon shader transparency parameter.
miTransparencyR (mitr) float0outputinputconnectablestorable
Red component
miTransparencyG (mitg) float0outputinputconnectablestorable
Green component
miTransparencyB (mitb) float0outputinputconnectablestorable
Blue component
miTranslucence (mitc) float0outputinputconnectablestorable
Photon shader translucency parameter.
miTranslucenceFocus (mitf) float0.5outputinputconnectablestorable
Photon shader translucence focus parameter.
miNormalCamera (minc) float3outputinputconnectablestorable
Port to connect bump node for photon shader.
miNormalCameraX (mincx) float0outputinputconnectablestorable
X component
miNormalCameraY (mincy) float0outputinputconnectablestorable
Y component
miNormalCameraZ (mincz) float0outputinputconnectablestorable
Z component
materialAlphaGain (maga) float1.0outputinputconnectablestorablekeyable
Material Alpha Gain
miFrameBufferWriteOperation (mifo) enum1outputinputconnectablestorable
Operation to use when writing shader results to frame buffers
miFrameBufferWriteFlags (mifl) integer0outputinputconnectablestorable
Bitfield of flags for write operation. Currently only the first bit has any affect. It sets the shader to use the scale factor parameter when writing to frame buffers.
miFrameBufferWriteFactor (miff) float1.0outputinputconnectablestorable
Scale factor for frame buffer write operation