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 name |
Parents |
Classification |
MFn type |
Compatible function sets |
useBackground |
node
|
shader/surface |
kUseBackground |
kBase
kNamedObject
kDependencyNode
kUseBackground |
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) |
Type |
Default |
Flags |
|
objectId
(oi ) |
addr |
0 |
   |
|
primitiveId
(pi ) |
integer |
0 |
   |
|
raySampler
(rtr ) |
addr |
0 |
   |
|
backgroundSampler
(rtb ) |
addr |
0 |
   |
|
rayDepth
(rd ) |
short |
0 |
   |
|
rayInstance
(ryi ) |
integer |
0 |
   |
|
rayDirection
(rad ) |
float3 |
|
  |
|
rayDirectionX
(rdx ) |
float |
0.0 |
  |
|
|
rayDirectionY
(rdy ) |
float |
0.0 |
  |
|
|
rayDirectionZ
(rdz ) |
float |
1.0 |
  |
|
|
outColor
(oc ) |
float3 |
|
  |
|
outColorR
(ocr ) |
float |
0.0 |
  |
|
|
outColorG
(ocg ) |
float |
0.0 |
  |
|
|
outColorB
(ocb ) |
float |
0.0 |
  |
|
|
outTransparency
(ot ) |
float3 |
|
  |
|
outTransparencyR
(otr ) |
float |
0.0 |
  |
|
|
outTransparencyG
(otg ) |
float |
0.0 |
  |
|
|
outTransparencyB
(otb ) |
float |
0.0 |
  |
|
|
pointCamera
(pc ) |
float3 |
|
   |
|
pointCameraX
(px ) |
float |
1.0 |
   |
|
|
pointCameraY
(py ) |
float |
1.0 |
   |
|
|
pointCameraZ
(pz ) |
float |
1.0 |
   |
|
|
normalCamera
(n ) |
float3 |
|
   |
|
normalCameraX
(nx ) |
float |
1.0 |
   |
|
|
normalCameraY
(ny ) |
float |
1.0 |
   |
|
|
normalCameraZ
(nz ) |
float |
1.0 |
   |
|
|
lightDataArray
(ltd ) |
lightData |
NULL |
    |
|
lightDirection
(ld ) |
float3 |
|
   |
|
lightDirectionX
(ldx ) |
float |
1.0 |
   |
|
|
lightDirectionY
(ldy ) |
float |
1.0 |
   |
|
|
lightDirectionZ
(ldz ) |
float |
1.0 |
   |
|
|
|
lightIntensity
(li ) |
float3 |
|
   |
|
lightIntensityR
(lir ) |
float |
1.0 |
   |
|
|
lightIntensityG
(lig ) |
float |
1.0 |
   |
|
|
lightIntensityB
(lib ) |
float |
1.0 |
   |
|
|
|
lightAmbient
(la ) |
bool |
true |
   |
|
|
lightDiffuse
(ldf ) |
bool |
true |
   |
|
|
lightSpecular
(ls ) |
bool |
false |
   |
|
|
lightShadowFraction
(lsf ) |
float |
0.5 |
   |
|
|
preShadowIntensity
(psi ) |
float |
1.0 |
   |
|
|
lightBlindData
(lbd ) |
addr |
0 |
   |
|
|
shadowMask
(sm ) |
float |
1.0 |
     |
|
reflectionLimit
(fll ) |
short |
2 |
    |
|
specularColor
(sc ) |
float3 |
|
    |
|
specularColorR
(sr ) |
float |
0.5 |
     |
|
|
specularColorG
(sg ) |
float |
0.5 |
     |
|
|
specularColorB
(sb ) |
float |
0.5 |
     |
|
|
reflectivity
(rfl ) |
float |
0.5 |
     |
|
matteOpacityMode
(mom ) |
enum |
2 |
    |
|
matteOpacity
(mog ) |
float |
1.0 |
     |
|
outMatteOpacity
(omo ) |
float3 |
|
  |
|
outMatteOpacityR
(omor ) |
float |
0.0 |
  |
|
|
outMatteOpacityG
(omog ) |
float |
0.0 |
  |
|
|
outMatteOpacityB
(omob ) |
float |
0.0 |
  |
|