Computer Graphics Asked by Jummit on November 10, 2021
I’m looking for a way to generate curvature maps like this:
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
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?
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.
Here is the project: https://github.com/Jummit/curvature-baker
Answered by Jummit on November 10, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP