Hi!
I have a collection of cubes (will be a x,y,z matrix) and I want to give them a nice gradient color in function to the distance to another brep (sphere for simplicity).
multiple spheres with the same color output is easy, but multiple spheres with different colors is giving me a headache.
I have a “solution” (photo below) but it works by duplicating the cubes for each color and this will be a problem when the number of cubes rises (and it will rise a lot). Also this force me to put a 100%transparent color at the end of each gradient so the farest cubes appear transparent instead of a different color of my choice, and this is minor problem but better if solved.
I tried converting the cubes to meshes and try sprying them but didn’t get anything near my expectation neither!
Also I could get rid of the gradient and just test for what cubes are inside each sphere and dispatch those to different custom previews, but I was hopping to achieve that sweet gradient and color mixing if possible.
thank you very much in advance!
Captura de pantalla (27)|690x388
coloring breps.gh (330.3 KB) .