I am looking for an algorithm how to generate cavity (or curvature) map. There seems to be no refernce to it, only final solutions like xNormal software, but that is not what I want. I am looking for a way how to do it, not for a final solution.
I have also found this site: http://wiki.polycount.com/wiki/Curvature_map, but again, mostly references how to do it in specified soft (maya etc).
On my input, I have a mesh and a normal map. From this, I have calculated curvature on my mesh, and now I would like to extend this info with more details from normal map.