Round Edges Shading tutorial

Important:

You should use the round_corners shader instead.

Rounded edges using the curvature shader (convex and concave) without curvature

This short tutorial shows how to create a rounded corner shading effect on the corner edges of objects. This can be useful for creating tiny bevels on your objects without having to model them manually.

The scene file with shader can be downloaded here.

Note:

This is a fake 'hack' shading effect and has many limitations. For example, the effect breaks down if the curvature.radius is too high. Also, the camera should not be placed too close to the beveled object, otherwise the illusion will be broken.

Convex Edges

convex curvature only without convex curvature

Convex edges curvature shading network

Concave Edges

concave curvature only without concave curvature

Now we need to add the inverse effect to the cavities using the convex output of another curvature shader and 'screen' it on top of the current shading network.

To have both concave and convex edges work, the A input on the first composite (multiply) is set to 50% grey (with invert edges ( complement ). The white cavities (Convex) is then 'screened' on top of that so that the normals are pushed on the edges and pulled up on the cavities.

The final shader network should look like the following.

Final shader network. Convex curvature shader screened onto concave curvature shader