Go to: Related nodes. Attributes.

Bump2d is a utility node that is useful for doing Bump Mapping. Its job is to take the output of any 2d texture (usually the Out Alpha attribute) and convert it to "perturbed normals" that are used to calculate bump maps.

Usually, the system will create the bump2d node for you when you specify a bump map texture. The Out Alpha attribute of the texture is connected to the Bump Value attribute of the Bump2d node, and the Out Normal attribute of the Bump2d node is connected to the Normal Camera attribute of a shader node, such as Lambert or Blinn or Phong.
 Checker           Bump2d           Blinn
 ---------         ------           -----
 Out Alpha  ---->  Bump Value
                   Out Normal ----> Normal Camera
You can also "stack" different bump maps on top of one another. To do this, connect the Out Normal attribute of one bump map to the Normal Camera attribute of another.
 Checker       Bump3d        Cloth         Bump3d           Blinn
 -------       ------        -----         ------           -----
 Out Alpha --> Bump Value    Out Alpha --> Bump Value
               Out Normal ---------------> Normal Camera
                                           Out Normal ----->Normal Camera
Note: If you are bump-mapping a shader that is using environment maps, then you must connect the Out Normal attribute of the bump node to the Normal Camera attribute of the Environment Texture, as well as to the Normal Camera attribute of the shader. Otherwise, the environment will not be correctly reflected in the bumpy areas. There is a MEL script to do this for you; after you have connected the Out Color of the environtment map to the Reflected Color of the shader, type "cnctBumpProjNormal shader-name" in the command line, replacing shader-name with the name of your shader.
 Checker       Bump2d         EnvSphere         Blinn
 -------       ------         ---------         -----
 Out Alpha --> Bump Value     Out Color ------> Reflected Color
               Out Normal --> Normal Camera
                      and --------------------> Normal Camera
You can use the other attributes of the Bump2d node to control the depth and filtering of the bump map. In the table below, important attributes have their names listed in bold in the description column.

This node is MP safe

Node name Parents Classification MFn type Compatible function sets
bump2d dependNode
utility/general/bump kBump kBase
kNamedObject
kDependencyNode
kBump

Related nodes

layeredTexture, envCube, envSphere, envSky, envBall, envChrome, bump3d, uvChooser, texture2d, ramp, file, cloth, water, stencil, checker, fractal, bulge, grid, mountain, texture3d, projection, cloud, granite, crater, leather, stucco, brownian, solidFractal, marble, wood, rock, snow, defaultTextureList, place2dTexture, place3dTexture

Attributes (65)

The following quick index only shows top-level attributes (too many attributes to show them all): adjustEdges, bumpDepth, bumpFilter, bumpFilterOffset, bumpInterp, bumpValue, infoBits, normalCamera (3), outNormal (3), pointCamera (3), pointObj (3), provide3dInfo, rayOrigin (3), refPointCamera (3), refPointObj (3), tangentUCamera (3), tangentVCamera (3), uvCoord (2), uvFilterSize (2), vertexCameraOne (3), vertexCameraTwo (3), vertexUvOne (2), vertexUvTwo (2), xPixelAngle

Long name (short name) Type Default Flags
pointCamera (p) float3 0.0, 0.0, 0.0 outputinputconnectablehidden
The current sample point that has to be shaded
pointCameraX (px) float 0.0 outputinputconnectablehidden
The x component of the current sample position
pointCameraY (py) float 0.0 outputinputconnectablehidden
The y component of the current sample position
pointCameraZ (pz) float 0.0 outputinputconnectablehidden
The z component of the current sample position
pointObj (po) float3 0.0, 0.0, 0.0 outputinputconnectablehidden
The current sample point that has to be shaded
pointObjX (pox) float 0.0 outputinputconnectablehidden
The x component of the current sample position
pointObjY (poy) float 0.0 outputinputconnectablehidden
The y component of the current sample position
pointObjZ (poz) float 0.0 outputinputconnectablehidden
The z component of the current sample position
refPointObj (rpo) float3 0.0, 0.0, 0.0 outputinputconnectablehidden
The current reference sample point that has to be shaded
refPointObjX (rpox) float 0.0 outputinputconnectablehidden
The x component of the current reference sample position
refPointObjY (rpoy) float 0.0 outputinputconnectablehidden
The y component of the current reference sample position
refPointObjZ (rpoz) float 0.0 outputinputconnectablehidden
The z component of the current reference sample position
refPointCamera (rpc) float3 0.0, 0.0, 0.0 outputinputconnectablehidden
The current reference sample point that has to be shaded
refPointCameraX (rcx) float 0.0 outputinputconnectablehidden
The x component of the current sample position
refPointCameraY (rcy) float 0.0 outputinputconnectablehidden
The y component of the current sample position
refPointCameraZ (rcz) float 0.0 outputinputconnectablehidden
The z component of the current sample position
rayOrigin (ro) float3 0.0, 0.0, 0.0 outputinputconnectablehidden
The current ray origin
rayOriginX (rox) float 0.0 outputinputconnectablehidden
The x component of the current ray origin
rayOriginY (roy) float 0.0 outputinputconnectablehidden
The y component of the current ray origin
rayOriginZ (roz) float 0.0 outputinputconnectablehidden
The z component of the current ray origin
xPixelAngle (xpa) float 0.002053 inputconnectablestorablehidden
The pixel angle
uvCoord (uv) float2 0.0, 0.0 outputinputconnectablehidden
The UV coords of the current sample point
uCoord (u) float 0.0 outputinputconnectablehidden
The u component of the current sample position
vCoord (v) float 0.0 outputinputconnectablehidden
The v component of the current sample position
uvFilterSize (fs) float2 0.0, 0.0 outputinputconnectablehidden
The sample (filter) size
uvFilterSizeX (fsx) float 0.0 outputinputconnectablehidden
The X size of the filter (sample)
uvFilterSizeY (fsy) float 0.0 outputinputconnectablehidden
The Y size of the filter (sample)
infoBits (ib) integer 0 outputinputconnectablehidden
Information bits passing along information about type of shading
normalCamera (n) float3 0.0, 0.0, 1.0 outputinputconnectablehidden
Normal Camera. If you are combining more than one bump map, chain them together by connecting the Out Normal attribute of one to the Normal Camera attribute of the next. The last bump map in the chain should be connected to the Normal Camera attribute of the shader.
normalCameraX (nx) float 0.0 outputinputconnectablehidden
The X component of Normal Camera
normalCameraY (ny) float 0.0 outputinputconnectablehidden
The Y component of Normal Camera
normalCameraZ (nz) float 0.0 outputinputconnectablehidden
The Z component of Normal Camera
tangentUCamera (tu) float3 1.0, 0.0, 0.0 outputinputconnectablehidden
The surface tangent along U (dPdU)
tangentUx (tux) float 0.0 outputinputconnectablehidden
The X component of the U tangent
tangentUy (tuy) float 0.0 outputinputconnectablehidden
The Y component of the U tangent
tangentUz (tuz) float 0.0 outputinputconnectablehidden
The Z component of the U tangent
tangentVCamera (tv) float3 0.0, 1.0, 0.0 outputinputconnectablehidden
The surface tangent along V (dPdV)
tangentVx (tvx) float 0.0 outputinputconnectablehidden
The X component of the V tangent
tangentVy (tvy) float 0.0 outputinputconnectablehidden
The Y component of the V tangent
tangentVz (tvz) float 0.0 outputinputconnectablehidden
The Z component of the V tangent
adjustEdges (ae) bool false outputinputconnectablestorablekeyable
Adjust Edges. Turn on Adjust Edges to remove any artifacts on texture boundaries. These artifacts may appear when you are mapping textures with the Wrap U and and Wrap V turned off.
bumpDepth (bd) float 1.0 outputinputconnectablestorablekeyable
Bump Depth controls how high the bumps will appear to be on the surface. Increase Bump Depth to make the bumps higher. Decrease Bump Depth to make the surface smoother.
bumpInterp (bi) enum 0 outputinputconnectablestorablekeyable
Bump Interpretation controls how to interpret the incoming bump value. By defualt it is taken as a height field value.
bumpFilter (bf) float 1.0 outputinputconnectablestorablekeyable
Bump Filter affects the amount of filtering performed on a texture used as a bump map. The amount of filtering the system does is calculated based on how much screen space the texture occupies in the final image. The Bump Filter attribute is a multiplier on that value. Values greater than 1.0 will cause the renderer to do more filtering. This will make the bumps smoother. Increase the amount of filtering if there is aliasing (i.e. jagged staircase effects) in your final renderings, or if the bump map appears to "pop" or "sizzle" over the course of several frames. Values less than 1.0 will cause the renderer to do less filtering. This will make the bumps appear sharper. Decrease the amount of filtering. if your bumps are appearing too smoothed-out in the final rendered images. See also the Bump Filter Offset attribute (below).
bumpFilterOffset (bfo) float 0.0 outputinputconnectablestorablekeyable
Bump Filter Offset affects the amount of filtering performed on a texture. Unlike the Bump Filter attribute (which is a multiplier), Bump Filter Offset is added to the system's calculated filtering values. This increases the amount of filtering uniformly. This attribute can be used to "lock" the system's filtering values. To do this, set the Bump Filter attribute to 0. Then the Bump Filter Offset value will completely determine the amount of filtering.
bumpValue (bv) float 0.0 outputinputconnectablestorablekeyable
Bump Value is the source texture that is being used for the bump map. The Out Alpha attribute of a 2d texture should be connected to this attribute. Of course, you can connect the output of any shading network to Bump Value, and it will be used as the source of the bumps. See also the Provide 3d Info attribute below.
provide3dInfo (p3d) bool false outputinputconnectablestorable
Provide 3d Info is useful when the input to this node is something more complex than a simple 2d texture. If you are using a shading network as input, or if you are stacking bump maps together, and there is one or more 3d texture nodes in that network, then you must turn on Provide 3d Info. Otherwise the 3d nodes 'upstream' will not get all the information they need. Turning on Provide 3d Info slows down the bump node a little, so it is left off by default.
outNormal (o) float3 0.0, 0.0, 1.0 outputconnectable
Out Normal is the 'perturbed normal', that is calculated from the input texture. Connect this to the Normal Camera attribute of a shader to put a bump map on that shader. Or, connect this to the Normal Camera attribute of another bump map to stack them together.
outNormalX (ox) float 0.0 outputconnectable
The X component of Out Normal
outNormalY (oy) float 0.0 outputconnectable
The Y component of Out Normal
outNormalZ (oz) float 0.0 outputconnectable
The Z component of Out Normal
vertexUvOne (vt1) float2 outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvOneU (t1u) float 0.0 outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvOneV (t1v) float 0.0 outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvTwo (vt2) float2 outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvTwoU (t2u) float 0.0 outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvTwoV (t2v) float 0.0 outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexCameraOne (vc1) float3 outputinputconnectablestorablehidden
Usually, this is the triangle's first vertex, in camera space. But if bump mapping is being used, this field is used to pass the original uv to the file texture node, should the file texture node be feeding the bump map. We'll check the info bits, and if INFO_BUMP is set, we'll transform vertexCameraOne exactly like we transform uv. This is safe to do since advanced filtering can't be used with bump mapping, hence the fields are not being used otherwise.
vertexCameraOneX (c1x) float 0.0 outputinputconnectablestorablehidden
X coordinate of Vertex Camera One
vertexCameraOneY (c1y) float 0.0 outputinputconnectablestorablehidden
Y coordinate of Vertex Camera One
vertexCameraOneZ (c1z) float 0.0 outputinputconnectablestorablehidden
Z coordinate of Vertex Camera One
vertexCameraTwo (vc2) float3 outputinputconnectablestorablehidden
Usually, this is the triangle's second vertex, in camera space. But if bump mapping is being used, this field is used to pass the resulting filter size (i.e., sizeValsUV) to the file texture node, should the file texture nodebe feeding the bump map. We'll check the info bits, and if INFO_BUMP is set, we'll transform vertexCameraTwo exactly like we transform uv. This is safe to do since advanced filtering can't be used with bump mapping, hence the fields are not being used otherwise.
vertexCameraTwoX (c2x) float 0.0 outputinputconnectablestorablehidden
X coordinate of Vertex Camera Two
vertexCameraTwoY (c2y) float 0.0 outputinputconnectablestorablehidden
Y coordinate of Vertex Camera Two
vertexCameraTwoZ (c2z) float 0.0 outputinputconnectablestorablehidden
Z coordinate of Vertex Camera Two