Creating ambient occlusion in Material graph without AO map

I recall seeing a technique somewhere that showed how to create Ambient Occlusion in your Material graph without using an actual AO map.
Does anyone know of this technique?

You could try with the DistanceToNearestSurface technique:

You can also use the blue channel of the Normal map, and mess with contrast etc; which usually is similar to curvature/ao.

Great tips!