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 nameParentsClassificationMFn typeCompatible function sets
bump2dshadingDependNodeutility/general/bump:drawdb/shader/bump2dkBumpkBase
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)TypeDefaultFlags
pointCamera (p) float30.0, 0.0, 0.0outputinputconnectablehidden
The current sample point that has to be shaded
pointCameraX (px) float0.0outputinputconnectablehidden
The x component of the current sample position
pointCameraY (py) float0.0outputinputconnectablehidden
The y component of the current sample position
pointCameraZ (pz) float0.0outputinputconnectablehidden
The z component of the current sample position
pointObj (po) float30.0, 0.0, 0.0outputinputconnectablehidden
The current sample point that has to be shaded
pointObjX (pox) float0.0outputinputconnectablehidden
The x component of the current sample position
pointObjY (poy) float0.0outputinputconnectablehidden
The y component of the current sample position
pointObjZ (poz) float0.0outputinputconnectablehidden
The z component of the current sample position
refPointObj (rpo) float30.0, 0.0, 0.0outputinputconnectablehidden
The current reference sample point that has to be shaded
refPointObjX (rpox) float0.0outputinputconnectablehidden
The x component of the current reference sample position
refPointObjY (rpoy) float0.0outputinputconnectablehidden
The y component of the current reference sample position
refPointObjZ (rpoz) float0.0outputinputconnectablehidden
The z component of the current reference sample position
refPointCamera (rpc) float30.0, 0.0, 0.0outputinputconnectablehidden
The current reference sample point that has to be shaded
refPointCameraX (rcx) float0.0outputinputconnectablehidden
The x component of the current sample position
refPointCameraY (rcy) float0.0outputinputconnectablehidden
The y component of the current sample position
refPointCameraZ (rcz) float0.0outputinputconnectablehidden
The z component of the current sample position
rayOrigin (ro) float30.0, 0.0, 0.0outputinputconnectablehidden
The current ray origin
rayOriginX (rox) float0.0outputinputconnectablehidden
The x component of the current ray origin
rayOriginY (roy) float0.0outputinputconnectablehidden
The y component of the current ray origin
rayOriginZ (roz) float0.0outputinputconnectablehidden
The z component of the current ray origin
xPixelAngle (xpa) float0.002053inputconnectablestorablehidden
The pixel angle
uvCoord (uv) float20.0, 0.0outputinputconnectablehidden
The UV coords of the current sample point
uCoord (u) float0.0outputinputconnectablehidden
The u component of the current sample position
vCoord (v) float0.0outputinputconnectablehidden
The v component of the current sample position
uvFilterSize (fs) float20.0, 0.0outputinputconnectablehidden
The sample (filter) size
uvFilterSizeX (fsx) float0.0outputinputconnectablehidden
The X size of the filter (sample)
uvFilterSizeY (fsy) float0.0outputinputconnectablehidden
The Y size of the filter (sample)
infoBits (ib) integer0outputinputconnectablehidden
Information bits passing along information about type of shading
normalCamera (n) float30.0, 0.0, 1.0outputinputconnectablehidden
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) float0.0outputinputconnectablehidden
The X component of Normal Camera
normalCameraY (ny) float0.0outputinputconnectablehidden
The Y component of Normal Camera
normalCameraZ (nz) float0.0outputinputconnectablehidden
The Z component of Normal Camera
tangentUCamera (tu) float31.0, 0.0, 0.0outputinputconnectablehidden
The surface tangent along U (dPdU)
tangentUx (tux) float0.0outputinputconnectablehidden
The X component of the U tangent
tangentUy (tuy) float0.0outputinputconnectablehidden
The Y component of the U tangent
tangentUz (tuz) float0.0outputinputconnectablehidden
The Z component of the U tangent
tangentVCamera (tv) float30.0, 1.0, 0.0outputinputconnectablehidden
The surface tangent along V (dPdV)
tangentVx (tvx) float0.0outputinputconnectablehidden
The X component of the V tangent
tangentVy (tvy) float0.0outputinputconnectablehidden
The Y component of the V tangent
tangentVz (tvz) float0.0outputinputconnectablehidden
The Z component of the V tangent
adjustEdges (ae) boolfalseoutputinputconnectablestorablekeyable
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) float1.0outputinputconnectablestorablekeyable
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) enum0outputinputconnectablestorablekeyable
Bump Interpretation controls how to interpret the incoming bump value. By defualt it is taken as a height field value.
bumpFilter (bf) float1.0outputinputconnectablestorablekeyable
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) float0.0outputinputconnectablestorablekeyable
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) float0.0outputinputconnectablestorablekeyable
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) boolfalseoutputinputconnectablestorable
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) float30.0, 0.0, 1.0outputconnectable
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) float0.0outputconnectable
The X component of Out Normal
outNormalY (oy) float0.0outputconnectable
The Y component of Out Normal
outNormalZ (oz) float0.0outputconnectable
The Z component of Out Normal
vertexUvOne (vt1) float2outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvOneU (t1u) float0.0outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvOneV (t1v) float0.0outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvTwo (vt2) float2outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvTwoU (t2u) float0.0outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexUvTwoV (t2v) float0.0outputinputconnectablestorablehidden
Unused, but left in for backward compatibility
vertexCameraOne (vc1) float3outputinputconnectablestorablehidden
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) float0.0outputinputconnectablestorablehidden
X coordinate of Vertex Camera One
vertexCameraOneY (c1y) float0.0outputinputconnectablestorablehidden
Y coordinate of Vertex Camera One
vertexCameraOneZ (c1z) float0.0outputinputconnectablestorablehidden
Z coordinate of Vertex Camera One
vertexCameraTwo (vc2) float3outputinputconnectablestorablehidden
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) float0.0outputinputconnectablestorablehidden
X coordinate of Vertex Camera Two
vertexCameraTwoY (c2y) float0.0outputinputconnectablestorablehidden
Y coordinate of Vertex Camera Two
vertexCameraTwoZ (c2z) float0.0outputinputconnectablestorablehidden
Z coordinate of Vertex Camera Two