smoth corners - round edges on materials

Okay, decided to give a crack at it based on what I described and here’s how it went…
With a metallic material to really show off the bevel:


And here it is with a matte material:

Because the cube already had hard edges, I generated some rounded spherical, smooth normals. Ideally, you’d want to do the opposite - take a smoothed object as the starting point. I added an unused example of generating the flat, faceted normal at the top with DDX/DDY. So normally you’d want to blend between the generated flat normals and the natural smooth vertex normals.
It doesn’t work great with a cube normal and sphere normal because the flat normals and smoothed normals are a little too different.
In my case I used the UVs to create an edge mask, as you need some way to drive the lerp. This is also problematic when working with an arbitrary mesh, as edge detection will be more difficult than with a cube.
Last, I slightly shrunk the mesh on the shadow pass. This prevents the shadow terminator from still appearing sharp despite the smooth normals.
No shadow shrinking:
image
With shadow pass switch shrinking:
image

All in all, kind of a success, but kind of a dud. Might be useful in some cases.

2 Likes