Ive made a node setup to help converting normal maps to cavity maps (curvature maps). You can now do cavity maps realtime in blender viewport for texture setups or bake directly into texture. To use it, you need to create plane, add material and normal map texture to slot, then in node editor plug cavity map node group to output. If you have problems with this feel free to ask.
Usefull web pages that helped me