2
$\begingroup$

I want the smooth and sharp curvature mask of geometry so that I can use it in a mix color > factor. I know we can do with Geometry > Pointiness but it's not giving the desired results.

enter image description here

I found this solution that uses a normal map to convert into a curvature map but uses the compositor.

How to convert a normal map into a curvature map (per pixel curvature)

How to get a smooth curvature map from a normal map?

I wonder if it is possible to use the Geometry > Normal to generate a curvature mask in the shader editor. and I want e.g. smooth and sharp curvature that can be controlled via a Value node.

enter image description here

Value = 0 : Smooth Curvature

interpolated

Value = 1 : Sharp Curvature

$\endgroup$
2
  • $\begingroup$ I don't fully understand the question, do you want to read or set the curvature? Also some clear explanation what curvature even is, in the context of circles represented as polygons, would be nice. Depending on these details a solution could be trivial (lerping between normal and true normal based on the "Value") or impossible (how to calculate a curvature, without preprocessing, in the context where you access just a single point?) $\endgroup$ Commented Jan 1 at 15:57
  • 1
    $\begingroup$ Do you want geometry/pointiness, or do you want the curvature maps that you've linked? The two are very different. It may be possible to recreate pointiness via a combination of geometry nodes and shader work, but it is not possible to recreate the curvature maps you've linked, not live. Baking textures would be necessary. $\endgroup$
    – Nathan
    Commented Jan 1 at 17:32

1 Answer 1

0
$\begingroup$

You probably want something like this (showing the math of creating an edge map in the shader editor, not a "real" shader):

enter image description here

By playing around with the Bevel, Color Ramp and Invert Color Node you can highlight/mask different parts (e.g. edges) of your model.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .