AnswerBun.com

What method is used for baking grayscale curvature maps

Computer Graphics Asked by Jummit on November 10, 2021

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?

One Answer

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

Answered by Jummit on November 10, 2021

Add your own answers!

Related Questions

glutSolid* source code

1  Asked on November 22, 2021 by tado-mi

 

How to retrieve data from Compute Shader to CPU?

0  Asked on November 15, 2021 by ethan-ma

   

unwanted patterns in simplex noise

1  Asked on November 13, 2021 by sam-apostel

 

Procedural generation of biological models

1  Asked on November 13, 2021 by daniel-cooke

 

What method is used for baking grayscale curvature maps

1  Asked on November 10, 2021 by jummit

     

Why are texture coordinates often called UVs?

2  Asked on August 27, 2021 by samanthaj

 

Dynamic Ray-Triangle Intersection

1  Asked on August 27, 2021 by cemklkn

     

Draw Line on Arbitrary Surface

0  Asked on August 27, 2021 by valentin-molina

 

How to raytrace Bezier surfaces?

5  Asked on August 27, 2021 by luser-droog

   

Better Shadow Mapping Techniques

2  Asked on August 27, 2021 by arjan-singh

       

What does GPU assembly look like?

4  Asked on August 27, 2021 by sebastien-finor

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir