Home Technical Talk

Creating curvature map generator, how are the values scaled

polycounter lvl 6
Offline / Send Message
PaulMakesThings polycounter lvl 6
Hello,
I mostly do C++ coding for computer vision but lately, I've been playing with game making. I came across the problem of generating curvature maps, and I figure since I can work with images from my CV work and read normals off of 3D models and normal maps, I could probably make a little program to make curvature maps.

I've been searching around and I can't find the specification. I found a mention on another polycount thread that it's a greyscale image and "the range from 0 to 127 would be a concavity map, and the range from 128 to 255 would be the convexity." but I can't find exactly how that value is scaled. Maybe it's part art and part science, I don't know.

Should the curvature map pull from both the model and normal map curvature combined? That seems like it would be ideal, but I want to be sure.

If I just get a point on the model that corresponds to a point on my map, and sample in 4 directions, at a distance calculated to be 1 texture pixel (based on the scaling of that face), to get the normals, then use the difference between them and my current pixel to calculate curvature would that result be close enough?

Thanks for any input!
Sign In or Register to comment.