Nodes -- Normals from bump maps

I seem to recall a patch in the tracker for a node that can be used to make normalmaps from bump maps. Until it comes, though, I need some quick hack to mix some maps and get a normal out of it.

This is what I got after playing around some:

What gets me is the fact that the result is the same as the normal output from the texture node, but there could be a shorter way to accomplish this. If you know it, and you’re willing to share, please do :slight_smile:

So, how do you guys compute your normals when you can’t get’em directly?

I asked the same question once, but I think it’s not possible to obtain a normal map from nodes. What I did was to bake those procedural materials, and then convert the generated image to a normal map in Gimp.

You mean a final normal map? It’s not so hard to approximate Blender’s results. For simplicity, I’m using the Normal output of a Texture node here, but it works perfectly with the output of the noodle I posted above:

Your mix node is the equivalent to the normal strength setting, divided by… about three. When I tested, the equivalent to a normal strength of 1 was 0.31 in the mixer node. (I haven’t poked around Blender’s code enough to know how this works, so input in this matter would be appreciated.)

Can you get “tangent space” normal maps with this technique?. I’ve been trying similar things but couldn’t get a tangent space normal map. Could get bump maps, and if you render them it works, although for GLSL we need tangent space kind.

The closer I got is the node setup below, and it doesn’t work with GLSL, only at render time. This makes the grayscale map a “normal input” of the first material, and I try to use the “normal output” of that material as a convertion to tangent space of the grayscale one.

Zelouille came up with a node setup for that some time ago.