Applying gradient on both sides of every edge on low poly model

(Matt) #1

I would like to create a procedural shader which draws a gradient on both sides of each edge in the scene. It would be nice if I could adjust the gradient size applied to both adjoining faces depending on how extreme the angle is between both face normals. Kinda for the “worn edges” look, I thought that maybe I could use the pointiness geometry attribute to do this, but I haven’t been able to get the result I’m looking for.

(JonMicheelsen) #2

Check the solution in the bottom here;

Works perfect for low poly meshes! Pointiness needs high poly to work well.

(Matt) #3

That looks very close to what I am after, I will give this a try, thanks Jon! Though I’m not 100% sure how to do this bit:

I have mapped the bevel radius and convexity contrast to a uv

(JonMicheelsen) #4

You don’t have to do that bit, you could just take a combine XYZ node and put in 0.5 in X and Y and plug that in where I plug in the UV.
What I did was, I added a uv set, to be ably to quickly select faces on the mesh that get’s to much/little curvature or too hard/soft bevels and quick unwrap, and scale them to a point. When that point is moved up or down, there is more/less curvature mapping, sideways the bevel shader gets sharper softer. It a fast way tweak the result locally on the mesh.

(Matt) #5

Excellent! Looking forward to trying this out

(Matt) #6

Pretty happy with the results! Here it is:

Huge thanks, with my limited experience in material creation I doubt I could have come up with such a node setup on my own. As-is the material looks emissive and doesn’t receive lighting, but I should be able to bake this into a texture, which is more or less what I was planning to do.