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 name Parents Classification MFn type Compatible function sets
surfaceShader dependNode shader/surface/utility kSurfaceShader kBase
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) Type Default Flags
outColor (oc) float3 0.0, 0.0, 0.0 outputinputconnectablestorable
Out Color. Connect another attribute to this to control the color of the material with that attribute.
outColorR (ocr) float 0.0 outputinputconnectablestorable
Out Color red value
outColorG (ocg) float 0.0 outputinputconnectablestorable
Out Color green value
outColorB (ocb) float 0.0 outputinputconnectablestorable
Out Color blue value
outTransparency (ot) float3 0.0, 0.0, 0.0 outputinputconnectablestorable
Out Transparency. Connect another attribute to this to control the transparency of the material.
outTransparencyR (otr) float 0.0 outputinputconnectablestorable
Out Transparency red value
outTransparencyG (otg) float 0.0 outputinputconnectablestorable
Out Transparency green value
outTransparencyB (otb) float 0.0 outputinputconnectablestorable
Out Transparency blue value
outMatteOpacity (omo) float3 1.0, 1.0, 1.0 outputinputconnectablestorable
Out Matte Opacity. Connect another attribute to this to control the opacity of the material's matte (alpha) channel.
outMatteOpacityR (omor) float 0.0 outputinputconnectablestorable
Out Matte Opacity red value
outMatteOpacityG (omog) float 0.0 outputinputconnectablestorable
Out Matte Opacity green value
outMatteOpacityB (omob) float 0.0 outputinputconnectablestorable
Out Matte Opacity blue value
outGlowColor (og) float3 0.0, 0.0, 0.0 outputinputconnectablestorable
Out Glow Color. Connect another attribute to this to control the glow color of the material.
outGlowColorR (ogr) float 0.0 outputinputconnectablestorable
Out Glow Color red value
outGlowColorG (ogg) float 0.0 outputinputconnectablestorable
Out Glow Color green value
outGlowColorB (ogb) float 0.0 outputinputconnectablestorable
Out Glow Color blue value
miDeriveFromMaya (mifm) bool true outputinputconnectablestorable
Derive photon shader parameters from the shading node if enabled, otherwise use explicit mental ray attributes.
miShinyness (mis) float 10 outputinputconnectablestorable
Photon shader shinyness parameter to control glossy reflection and refraction.
miAngle (mia) float 0 outputinputconnectablestorable
Photon shader angle parameter to control direction of anisotropic feature.
miSpreadX (misx) float 10 outputinputconnectablestorable
Photon shader x spread parameter to control size of anisotropic feature in x direction.
miSpreadY (misy) float 5 outputinputconnectablestorable
Photon shader spread parameter to control size of anisotropic feature in y direction.
miWhiteness (miwn) float3 outputinputconnectablestorable
Photon shader whiteness parameter.
miWhitenessR (miwnr) float 0.5 outputinputconnectablestorable
Red component
miWhitenessG (miwng) float 0.5 outputinputconnectablestorable
Green component
miWhitenessB (miwnb) float 0.5 outputinputconnectablestorable
Blue component
miSpecularColor (misc) float3 outputinputconnectablestorable
Photon shader specular color parameter.
miSpecularColorR (miscr) float 0.5 outputinputconnectablestorable
Red component
miSpecularColorG (miscg) float 0.5 outputinputconnectablestorable
Green component
miSpecularColorB (miscb) float 0.5 outputinputconnectablestorable
Blue component
miReflectivity (mirf) float 0.5 outputinputconnectablestorable
Photon shader reflectivity parameter.
miRefractiveIndex (miri) float 1 outputinputconnectablestorable
Photon shader index-of-refraction parameter.
miRefractions (mirc) bool true outputinputconnectablestorable
Photon shader refractions parameter.
miAbsorbs (miab) bool true outputinputconnectablestorable
Photon shader absorption parameter.
miDiffuse (midc) float 0.8 outputinputconnectablestorable
Photon shader diffuse parameter.
miColor (mic) float3 outputinputconnectablestorable
Photon shader base color parameter.
miColorR (micr) float 0.5 outputinputconnectablestorable
Red component
miColorG (micg) float 0.5 outputinputconnectablestorable
Green component
miColorB (micb) float 0.5 outputinputconnectablestorable
Blue component
miTransparency (mit) float3 outputinputconnectablestorable
Photon shader transparency parameter.
miTransparencyR (mitr) float 0 outputinputconnectablestorable
Red component
miTransparencyG (mitg) float 0 outputinputconnectablestorable
Green component
miTransparencyB (mitb) float 0 outputinputconnectablestorable
Blue component
miTranslucence (mitc) float 0 outputinputconnectablestorable
Photon shader translucency parameter.
miTranslucenceFocus (mitf) float 0.5 outputinputconnectablestorable
Photon shader translucence focus parameter.
miNormalCamera (minc) float3 outputinputconnectablestorable
Port to connect bump node for photon shader.
miNormalCameraX (mincx) float 0 outputinputconnectablestorable
X component
miNormalCameraY (mincy) float 0 outputinputconnectablestorable
Y component
miNormalCameraZ (mincz) float 0 outputinputconnectablestorable
Z component
materialAlphaGain (maga) float 1.0 outputinputconnectablestorablekeyable
Material Alpha Gain
miFrameBufferWriteOperation (mifo) enum 1 outputinputconnectablestorable
Operation to use when writing shader results to frame buffers
miFrameBufferWriteFlags (mifl) integer 0 outputinputconnectablestorable
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) float 1.0 outputinputconnectablestorable
Scale factor for frame buffer write operation