I am practicing with the creation of various procedurally generated materials and a unique problem has come up for me.
I have looked at a number of tutorials on shader creation and have been searching online for a while now with regards to this specific issue, having found some questions with only tangentially related topics.
I am trying to determine how I can pass the "edge angle" to a shader in cycles.
For example, when one is using the edge split modifier they can specifiy an edge angle that allows them to force the renderer to treat an edge as a non smoothed edge.
What I want to acheive:
I want to find areas of interest with respect to the way that the edge split has chosen these areas. The mesh pictured is smooth shaded, the left is without the edge split modifier applied and the right side has the edge split applied. Red areas show really distinctly, where edge split created a hard edge. The green area highlights where the bevel that was present on this material tester object becomes a much more prominent feature as aresult of the edge split angle.
I want to find a shader input that would allow me to say, take places where the edge angle is high as inputs, sortof like you can do with fresnel or other black and white input nodes
I want to do this procedureally, or at very last, I want to avoid using map textures because I want to be able to apply this material to objects that may not have a UV map.
Things I have trie as inputs (Using node wrangler to view the mask):
- Fresnel / Layerweight: These options apply to whole geometry and ignore specific areas. Furthermore, fresnel is dependant on the viewing angle, not the geometry. That makes the fresnel simply move around the edges at any viewing angle.
- Geometry > Pointiness: This does not work on something that has smooth curves. I have seen it used before in material tutorials but I understand that it relies on point density, something which a test ball (and presumeably many meshes) will not have in great amounts.
- Every option I can think of in most input nodes : I have seen wild techniques about the angling of faces for use in topology like this for example but that only works for meshes where mesh is concave with respect to positive Z (likely would not work with purely vertical faces either)
Things I have not tried but seen as (non optimal) options:
- Vertex painting a mask: While this is not ideal it would work. Id prefer not doing this because then one has to manually paint each mesh that they intend to use the materials on. I have also seen that most explaining this technique view it as requiring a fairly high detail mesh.
Is there a way I can get the edge angle out of the geometry and use it as an input for cycles shaders?