0
$\begingroup$

I'm looking for a way to generate curvature maps like this:

curvature map

The map stores the Convexity and Concavity of each pixel as a value from 0 to 1, where .5 is no curvature and 1 and 0 are the extremes.

I searched for how to calculate the curvature of meshes and found these questions on StackExchange:

What is the simplest way to compute principal curvature for a mesh triangle?

https://gamedev.stackexchange.com/questions/92621/cavity-map-generation

https://blender.stackexchange.com/questions/146819/is-there-a-way-to-calculate-mean-curvature-of-a-triangular-mesh

But I'm not sure if these are about the method actually used in the example.

What algorithm is used to bake these maps, and where can I find more information about it?

$\endgroup$
0
$\begingroup$

This is how I ended up doing it:

Instead of using vertex colors like most of the solutions I found online, I calculated the angle of each edge, and then used a shader to draw the lines in UV space. This Also gives me control over how thick the lines should be.

In some cases the angle calculated isn't right, but that should be easy to fix.

Curvature map applied to a model

Here is the project: https://github.com/Jummit/curvature-baker

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.