Here’s a quick tip I’ve stumbled upon for procedural shading in Blender:
When you do procedural wear and tear, you usually want two main masks: dirt mask of concave areas and edge wear mask of convex areas. The common approach is to use AO map for the former and inverted AO map for the latter. This comes with an issue where inverted AO will fill areas where there’s any geometry too close under the top surface, such as shown on this picture:
One possible workaround is to multiply AO distance with Vertex Color map, fill your entire model with white vertex color, but those problematic element with darker vertex color. This will alleviate the issue, but also modify the edge wear radius on those mesh components.
The better solution is to use Bevel shader to generate the mask, which can be easily done by calculating vector distance of the Bevel shader normals from the original normals, like on the picture below:
This way, you can have consistent edge wear mask radius across the entire model without running into the common issue of inverted AO shader hitting the faces close under the surface.
I hope it helps someone 


