Use bump2d node for normal mapping.

Use bump2d node for normal mapping.

jjbbqq
Enthusiast Enthusiast
908 Views
3 Replies
Message 1 of 4

Use bump2d node for normal mapping.

jjbbqq
Enthusiast
Enthusiast

Hi there,

I am using bump2d node for normal mapping. I have checked Use as: Tangent Space Normals. The material I am using is standard surface.

 

The final render result looks good (apart from not inverting the Green channel for OpenGL/DirectX normal map conversion). And I have also tried using aiNormalMap instead of bump2d and to my surprise, the two render results are exactly the same.

屏幕截图 2024-08-25 184727.png

 

My question is, I can't believe bump2d can achieve the same result as aiNormalMap. Because bump2d only get one channel greyscale input (Bump Value) from the file node's Output Alpha. Normal mapping requires three channels RGB input. so, why bump2d can render exactly the same as aiNormalMap?

0 Likes
909 Views
3 Replies
Replies (3)
Message 2 of 4

jjbbqq
Enthusiast
Enthusiast

Ok, I think I find out what bump2d node did when you checked the option "Use as: Tangent Space Normals". My conclusion is that although bump2d's "Bump Value" input is only connected to file's "Out Alpha". Bump2d just don't use this "Out Alpha" and instead uses file node (or whichever node is connected upstream)'s "Out Color" attribute.

 

  1. Why I say bump2d don't use file's "Out Alpha"?
    I am using this shader network for the test:
    屏幕截图 2024-08-26 162954.png
    Because the render result is the same (see below) regardless whether you check or uncheck "Alpha Is Luminance" in file node (luna_body_normal.tga). My normal map doesn't have a alpha channel. So checking "Alpha Is Luminance" will give me a alpha channel generated from RBG channels. Alpha channel is all white if "Alpha Is Luminance" is unchecked. So bump2d doesn't use "Out Alpha" from file node.

    Render result, normal mapping is correct (Green channel should be inverted, but omitted for this test):
    LunaMayaImageBump2dNormal4.png

    Another test which I added a "Condition" is True colorCondition to the shader network:
    屏幕截图 2024-08-26 163234.png
    The render result shows normal mapping not correct. However, A always true condition colorCondition node should be transparent to the bump2d node. So these two above test shows that bump2d with "Use as: Tangent Space Normals" option doesn't use the "Bump Value" input which is connected to "Out Alpha".

    Render result:
    2025ColorCondition.png

  2. Why I say Bump2d uses file node's (or whichever node is connected upstream) "Out Color" attribute?
    By changing shader network to this:
    屏幕截图 2024-08-26 172546.png
    I removed the "Out Alpha" pass through from file node, while passing the "Out Color" to colorCondition from file node.
    Render result is exactly the same as the correct one:
    2025ColorConditionExtraColorFromFile2.png
    So I think this concludes that Bump2d uses file node's (or whichever node is connected upstream) "Out Color" attribute, while there's no visible connection from file node's "Out Color" attribute to bump2d node in the shader network.

Is my understanding right, or there are some fundamental error in my analysis?


Update: I think I should include this render result without normal mapping for comparison:

2025WithoutNormal.png

0 Likes
Message 3 of 4

jjbbqq
Enthusiast
Enthusiast

I uploaded my project files. However the environment lighting image I use is too big for the upload system, I have to change it to another one. So the render result won't be exactly the same as I posted.

 

Update:

Ok, I did some searching in Maya documents and online help. So bump2d node can at least date back to year 2000 with Maya 3.0. And that "Use as: Tangent Space Normals" option in bump2d was added in Maya 2008 (Viewing tangent space or object space normal maps (autodesk.com)). It has a long attribute name "bumpInterp":

 

bumpInterp
Bump Interpretation controls how to interpret the incoming bump value. By default it is taken as a height field value.

I think this is as far as I can go. So using arnold and aiNormalMap seems the solution. But I really like the real time viewport 2.0 render with normal mapping.

0 Likes
Message 4 of 4

roee_kenner_yo
Explorer
Explorer

I was also very curious about this. It seems that you're correct, I wonder if there is an explanation why it can't just receive color information.

0 Likes