Ambient occlusion...procedural?

Hi! it could be a bit crazy but i’m asking…is there a way to calculate ambient occlusion in a procedural way? for example, i have a model of a painted gear, and i want to add wear and tear to the edges, is there a way to it procedural?

Input-> Geometry – Pointiness
That will give you the sharpness of the model, which can be use to somewhat detect “worn edges” type of situation. Use to drive a mix node. Use curves node or similar to adjust to liking.
Mesh must be correctly and evenly dense however as it acts on a per-vertex level.


Since this question is already asked, i won’t recreate this post but why can’t we easily use ambient occlusion as a mask for blending materials?