Go to: Related nodes. Attributes.

The Use Background shader allows you to mix computer-generated objects with scanned images in a seamless way. An object with a Use Background shader does not show up in the scene; wherever that material is, you just see the background image of the scene. However, shadows can fall on the material, and if it is made shiny, it can reflect other computer-generated objects.

For example, let's say you scan in a picture of a tree, and put that on an image plane. You can then create a tube to "stand in" for this tree in the scene. Position it so that it lines up with the tree, and assign a Use Background shader to it. When you render, you will not see the tube. Rather, you will see the tree in the background image. But if a computer-generated object should cast a shadow on the tube, it will appear to be cast on the tree. And if a computer-generated object should pass behind the tube, it will sppear to be passing behind the tree in the background image.

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

Related nodes

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

Attributes (54)

The following quick index only shows top-level attributes (too many attributes to show them all): backgroundSampler, lightDataArray (14), matteOpacity, matteOpacityMode, normalCamera (3), objectId, outColor (3), outMatteOpacity (3), outTransparency (3), pointCamera (3), primitiveId, rayDepth, rayDirection (3), rayInstance, raySampler, reflectionLimit, reflectivity, shadowMask, specularColor (3)

Long name (short name)TypeDefaultFlags
objectId (oi) addr0inputconnectablehidden
primitiveId (pi) integer0inputconnectablehidden
triangle id
raySampler (rtr) addr0inputconnectablehidden
ray sample pointer
backgroundSampler (rtb) addr0inputconnectablehidden
background sample pointer
rayDepth (rd) short0inputconnectablehidden
current ray depth
rayInstance (ryi) integer0inputconnectablehidden
Unique ray identifier controlling the sampling distribution for volume light depth map shadows, fluid volume rendering, light fog, ray traced shadows, and motion blur.
rayDirection (rad) float3inputconnectable
the ray direction.
rayDirectionX (rdx) float0.0inputconnectable
ray direction X value.
rayDirectionY (rdy) float0.0inputconnectable
ray direction Y value.
rayDirectionZ (rdz) float1.0inputconnectable
ray direction Z value.
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 R value
outTransparencyG (otg) float0.0outputconnectable
outTransparency G value
outTransparencyB (otb) float0.0outputconnectable
outTransparency B value
pointCamera (pc) float3outputinputconnectable
surface intersection point in camera space
pointCameraX (px) float1.0outputinputconnectable
point camera X value
pointCameraY (py) float1.0outputinputconnectable
point camera Y value
pointCameraZ (pz) float1.0outputinputconnectable
point camera Z value
normalCamera (n) float3outputinputconnectable
Normal Camera represents the surface normals in the camera's space. (These are used to calculate shading.)

To do Bump Mapping, connect the output of a bump node to this attribute.

normalCameraX (nx) float1.0outputinputconnectable
normal camera x value
normalCameraY (ny) float1.0outputinputconnectable
normal camera Y value
normalCameraZ (nz) float1.0outputinputconnectable
normal camera Z value
lightDataArray (ltd) lightDataNULLarrayinputconnectablehidden
The lighting information this node computes.
lightDirection (ld) float3inputconnectablehidden
The light direction.
lightDirectionX (ldx) float1.0inputconnectablehidden
The x component of the direction.
lightDirectionY (ldy) float1.0inputconnectablehidden
The y component of the direction.
lightDirectionZ (ldz) float1.0inputconnectablehidden
The z component of the direction.
lightIntensity (li) float3inputconnectablehidden
The light intensity (its a colour).
lightIntensityR (lir) float1.0inputconnectablehidden
The red component of the intensity.
lightIntensityG (lig) float1.0inputconnectablehidden
The green component of the intensity.
lightIntensityB (lib) float1.0inputconnectablehidden
The blue component of the intensity.
lightAmbient (la) booltrueinputconnectablehidden
The boolean that indicates if the light has an ambient component.
lightDiffuse (ldf) booltrueinputconnectablehidden
The boolean that indicates if the light has a diffuse component.
lightSpecular (ls) boolfalseinputconnectablehidden
The boolean that indicates if the light has a specular component.
lightShadowFraction (lsf) float0.5inputconnectablehidden
The visibility fraction to the light. value is in [0,1]
preShadowIntensity (psi) float1.0inputconnectablehidden
Luminance of pre shadow light intensity.
lightBlindData (lbd) addr0inputconnectablehidden
The light's blind data.
shadowMask (sm) float1.0outputinputconnectablestorablekeyable
shadow attenuation. If less than 1.0, it makes the shadows appear dimmer. At a value of 0, the shadows are not visible.
reflectionLimit (fll) short2outputinputconnectablestorable
reflected ray depth limit
specularColor (sc) float3outputinputconnectablestorable
Specular Color is the color of the specular reflections (also called 'hot spots') on the material. The final color of a specular reflection is a combination of the Specular Color and the color of the light.

By making the Specular Color brighter or dimmer, you can control the brightness of the specular reflections on an object.

Tip: To make a material look more plastic, use white for the specular color. To make a material look more metallic, make the specular color similar to the surface color.

specularColorR (sr) float0.5outputinputconnectablestorablekeyable
specular color red value
specularColorG (sg) float0.5outputinputconnectablestorablekeyable
specular color green value
specularColorB (sb) float0.5outputinputconnectablestorablekeyable
specular color blue value
reflectivity (rfl) float0.5outputinputconnectablestorablekeyable
Reflectivity is used to make an object reflect light like a mirror. Set this to 0 is you don't want your material to reflect at all. Increase the value to make brighter reflections. Note that brighter reflections hide more of the base surface color.

This attribute is only meaningful if there is a reflection map, or if you are doing Ray Tracing.

Here are some useful values for Reflectivity:

    Car Paint: 0.4
    Glass: 0.7
    Mirror: 1.0
    Chrome: 1.0

Note: If you are doing Ray Tracing, and you want other objects in the scene to be seen in reflections, then you must turn on the Visible In Reflections attribute of those objects.

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.

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