Mesh surface analisys (cavity map)

Hello!
In my spare time I’m trying to develop some tools to extract surface information from hi-poly models.
What I’m doing now is to obtain a cavity map (or a surface curvature map) from an heavy tasselled mesh in 3dsMax.
I obtain information about the suface cavity checking the height difference of a vertex against its neighbours…
for the surface curvature map I use a similar approach using vertex normal for every triangle of the mesh…
both of them work but these scripts are REALLY REALLY slow (maxscript).
What I want to do now is get these information from a normal map. I know that other tools can calculate an approximated Ambient Occlusion map from a normal map too…
so the question is:
Knows anyone more about this topic? there’s a paper over the web to learn from?

Any hint will be very appreciated :slight_smile:

this is a tutorial for crazybump: http://www.polycount.com/forum/showthread.php?t=52183

it’s also possible to use bevel&emboss in photoshop - with this you can even control the “thickness” of the detail: http://www.bs3d.com/index.php?page=7

thank you for the hints, it was what I needed :slight_smile:

There’s already a tool to extract cavity maps in Max among some other things. Rendering> Render Surface Map. It only works based on vertex colour though by the looks of it, so it’s not exactly great.

Yes I was aware of that, but I needed a way to calculate it on hi poly meshes coding it by myself. And the Sylvain Boulan’s way was my solution.

Right, ok. Just checking. We wouldn’t want you wasting time on something you don’t need to do would we? :slight_smile:

We had this at work not long ago. Our tech artist was proudly showing off this fancy script he wrote and I said, you know you can just use “X” for that right? And he hadn’t been aware that a tool already existed. His was probably better, but his time might have been better spent on something else.

So it’s always worth checking.

It happens very often to me too! :slight_smile: after reading my first post, I think I was a little vague explaining my needs. So thanks again for your check :slight_smile: