[Bison] Mesh Concavity Analysis Change Color Gradient?

Hi everyone,

I am using the “Concavity” component from Bision plug-in to color a mesh. The color gradient seems to be a default one, with no option to change it…

Does anyone know if and how this gradient can be changed? Would it be possible to do so after having the output colors? Like remapping the values to a gradient that I want? Or maybe the logic to analyze mesh concavity and convexity is not so complex and can be done without the plug-in?

Mesh Concavity.gh (10.7 KB)

I found this post on the old forum.

I think if the option is to create a method to measure concavity from scratch instead of remapping the colors, this can be the starting point. Specially the last reply by @DanielPiker

Please also check this: Grasshopper Terrain Slope in Degrees

I am afraid Slope is different than Concavity. Im looking for the latter.

Any ideas?

I don’t know what is meant with “concavity” in a mesh. If you can explain what it is and how to calculate it, it would be probably much easier to calculate it with a custom script and apply whatever gradient you want once you have the values.
Edit: you have the values! Just use “remap numbers” and use a color gradient + “deconstruct mesh” and “construct mesh” with colors…

Here: Transfer RGB gradient to height - #3 by maje90 I’ve deconstructed an actual color gradient to retrieve its “structure” (?) … maybe it helps…

I think this does the same thing. (well, not exactly the same thing, as I’m not sure how the values are being calculated in that plugin), but the sorting/coloring results are the same. If the minimum principal curvature value of the individual “face surface”, is positive it’s a concave surface, if it’s negative its convex.


Here’s one way to get a rough measure of how convex/concave a mesh is-
get the vector from each vertex to the average of its neighbours (an approximate mean curvature normal)
then project it onto the regular normal.
If you need something more accurate you could perhaps use the cotan weighted Laplacian instead of the simple average.
concavity.gh (76.2 KB)

1 Like

slightly simpler version
concavity2.gh (76.9 KB)

4 Likes

Thank you Daniel, this is perfect!

you saved my life! thank you.