How to get object normals in material node editor?


Is there a way to get object normals in the material node editor? Several shaders are based on operations with the normal vectors over an object or surface, so I guess it must be a way to use it in the Node Editor.

The Normal node is a bit misleading because it is just a single arbitrary vector (a “fixed” normal is a contradiction, a normal is useful because it’s different for each point over the surface).

I will appreciate any help.


I think you want the Geometry node …

im actually just playing with this concept. i wanted to make that car paint that changes colour depending on where you’re viewing it form, i think its called pearlescent but im not sure… here is the node network I built… as far as i know it works correctly, with GLSL turned on, and shaded view port running, i move the camera around and the texture changes, rendered views are the same. its not exactly the same as you were after, but the normals are changing colour depending on camera, so you might find this helpful

the most important thing is probably that math node - i think its got to do with the fact you have to make sure the node connections are always the same colour, otherwise the data is not handled, so having a blue connection into the grey point of a mix node is not going to work, the math node with dot product turns it grey and that can be used as the alpha. (if this is true, it’s a fantastically useful interface feature so well done who every thought of it)

i put the image here