Distance Preview Fade for a Surface - Question

Fade.gh (120.1 KB)

Hello all

I feel this should be easier than Im making it… Im trying to display some surfaces in grasshopper (see the example file attached above) - but instead of a solid color with the custom preview node I want the color to begin dark at the edges and get lighter towards the center, like a gradient/fade effect

Something Id like in the end is a scaled gradient - meaning the smallest surface centers should be somewhat lighter - where as the largest surfaces (with the most distance between center and edge) should have the lightest centers - so that you can see, by the color, the general area of each surface compared to each other.

Im just not sure how to approach this the right way, I thought of trying to offset the edges but that was clunky and didnt work right. Hatch maybe?

Thank you in advance :slight_smile:

How about using mesh gradient with preview mesh edges turning off.


Fade_re.gh (128.6 KB)

Thats a clever solution. But it fails to work with some of the other surfaces Im testing. Ill attach the surfaces below. If you slide the slider in the attached definition to switch between surface sets youll see that the shading method you shared works quite well for some (for example 0, 1, 4, 7, 9 etc…) But doesnt work or outputs a weird gradient with others (2, 3, 4, 5, 6, 8, 10, 11, etc.). Any idea how to address those ones?

fade expand.gh (1.1 MB)


fade expand_re.gh (1.1 MB)

That works great :slight_smile:

Thank you!