I was exporting an object to another program, and I needed to bake all my textures which were heavily procedural.
For most of them, no problem; but my Normals continue to bake flat!
It looks that baking normals in cycles is just for transfer the surface curvature of an highres object, which I don’t have.
So I came out with this helper node, that transforms Normals in WorldCoords to Tangent, so I can bake them and use them in whatever software I want.
To use it just plug your Normal in, and connect the output to the color input of a diffuse shader, and bake the diffuse color.
Now I can use my Bump map made in Cycles, in other programs!
Hope its usefull for you all
I’ve updated the first image with the corrected node setup (a small error pointed out by hyyou). Now the normals are not inverted.
And to avoid color space transformations in the result texture, I recommend you to save file in EXR or TIFF format.
I’ve finally turned this nodegroup into a python node, for anyone lazy enough to build this.
One can find it in my PythonNodes utility addon, and here’s a screenshot of it: