Curvature

This shader will sample around the shading point within a given radius to output the curvature. You can adjust the radius, falloff, and spread of the curvature sampling as well as specify a trace set to exclude or include objects. This shader is useful for creating procedural wear or dirt maps in conjunction with a noise shader.

inclusive trace_set in Arnold Tag and shader