# how can I apply 3 shader by coordinates instead of unwrap UV?

how can I apply 3 shaders by coordinates instead of unwrap UV?

for example, 3 shaders for top, bevel and side faces.

You could test the normal of the surface against (0,0,1) in Object Space.

Assuming 'Top' and 'Bottom' faces are normal to Z in object space.. • .. take the absolute dot product of the shading point normal (given in World Space, so converted to Object Space,) with (0,0,1).
• Use ranges of that value as factors in the mixes between your shaders.  EDIT: This tree discriminates by the normal of the underlying geometry. If you want the interpolated (smooth) normal, use 'Normal' instead of 'True Normal' in the Geometry Node.

• I've just finished my node setup, but you've been faster. Well done. – Robert Gützkow Nov 21 at 23:24
• @RobertGützkow oops, sorry.. hate it when that happens :) – Robin Betts Nov 21 at 23:25
• Thanks guys very much. – blackgun Nov 21 at 23:36
• Just as clarification why this work for people unfamiliar with linear algebra. The dot product of two normals (vectors of magnitude one) is equivalent to the cosine of the angle between them. If the angle between the vectors is zero, the cosine is one. The closer the angle gets to 90° (pi/2 in radians) the cosine approaches zero. – Robert Gützkow Nov 21 at 23:43
• I too just finished this one, albeit I took the scenic route by calculating the angle using pythagoras and then arctan-ing it. This is a far more elegant solution which I learned something from. Thanks :) – Moog Nov 22 at 0:56