Applying a global color gradient to a Grasshopper array

Hi everyone, I am a beginner in Rhino and Grasshopper.

I’m currently working on an array of volumes and trying to apply a global color gradient across the entire group. However, I’ve run into an issue: the gradient seems to be applying to each “individual unit” repeatedly, rather than transitioning smoothly based on their spatial position (e.g., from left to right or bottom to top).

20260508_田野圖形 增生 O-for論壇.3dm (19.1 MB)

05072026田野 增生O-for 論壇.gh (36.5 KB)

I have attached my Rhino/GH files and a screenshot below. Could anyone please guide me on how to adjust my logic or components to achieve the desired gradient effect?

Any help would be greatly appreciated. Thank you!

I couldn’t download your Rhino file so I replaced the geometries with some random boxes, you’ll have to re-set yours from the 3dm drawings

GH_File.gh (36.7 KB)

notice that each initial geometry will create its own branch of arrayed/scaled ones, which means that color distribution will happen green-to-yellow by branch, each branch will have its own identical color-gradient


if you want to have a unique color transition that goes through the branches as if they were just a whole thing, something like this might work (here the color gradient is distributed along X axis):

GH_File_2.gh (34.2 KB)

Thank you for your quick response!

I think I need to clarify my goal further. Instead of a global gradient across the entire array, I am actually looking for a gradient within each individual unit/element.

Specifically, I want every single component in the array to have its own color transition (for example, from bottom to top or start to end) instead of having a solid color.

I’ve updated the description of my goal. Could you please let me know how to modify my GH definition to achieve this “per-object” gradient effect?

Thanks again for your help!

It is possible, but the logic will be very complicated.

Hello
first I found that geometry is a bit of a crap. There is no objects but faces.

What is an element/object for you ? There are untrimmed surfaces and also curve.

There are many ways to do that
The best way is surely to apply a texture mapping on Brep, BUT McNeel just put that on Rhino 9

Not on Rhino 8

So the second option
Make all objects to mesh with lots of vertexes and apply color from gradient on each vertex. The only problem, you will not have a nice transition on some places and it isn’t very good for rendering.

third one make a mesh, apply UV coordinate on each point (just U is useful here), then make an image of the gradient, then render.
The image is located in Temp, also note that Nautilus is generating an image at each change so temp folder size is increasing !

You need Nautilus plugin and that must work
05072026田野 增生O-for 論壇 LD.gh (91.9 KB)

Thank you for your detailed guidance and explanation. This is a major breakthrough for me as a GH beginner and has truly inspired my learning process. Much appreciated!

Subject: Question regarding Nautilus and Rhino 7.1 compatibility

Hi Laurent,

Thank you so much for your insightful response on the forum!

I checked my Rhino version as you suggested, and it turns out I am currently using Rhino 7 (Version 7.1.20299, 10/25/2020). When I try to use Nautilus, I receive a “Grasshopper breakpoint” error stating that the component was built against a newer SDK (7.38).

Due to environment restrictions, I am unable to update my Rhino version at the moment.

Given my current version (7.1), how should I modify my Grasshopper definition to achieve the gradient effect you demonstrated? Should I stick with the “Mesh + Vertex Color” approach using native components, or is there a way to make Nautilus work in this older environment?

Attached is the screenshot of my Rhino version for your reference. Thank you again for your help!

Best regards,Harp Seal

05112026 田野 漸層.gh (42.3 KB)

20260511_田野圖形 增生 O-for論壇.3dm (12.9 MB)

05112026 田野漸層.3dm (258.0 KB)
This is the gradient effect I am currently able to generate. The smooth transition in this example is exactly my target. This GH definition was created by another user on the forum, and it happens to work perfectly with my current versions of Rhino and Grasshopper. In other words, this model represents the specific type of gradient workflow that my software environment is capable of executing

05112026 田野漸層.gh (28.4 KB)

I couldn’t open this because of plugins. Do you have a screenshot?

Here’s a humble option just making a guess on what the overall ‘orientation’ is:
05072026田野 增生O-for 論壇.gh (74.3 KB)


*Edit:
After posting I realized that though the result will look the same, the axis per object would have had a simpler setup with a vector from bottom face centroid to top face centroid—oh well!

Hi,

Wow! The transition between the gradients is so smooth—this is very close to the visual effect I’m looking for!

Thank you so much for your reply; it’s a huge encouragement for me as I navigate my Grasshopper learning journey. I truly appreciate your help.

**Since you couldn’t open the file due to missing plugins, I have attached the screenshots of my Rhino viewport and GH canvas below for your reference. Thanks again!
**

05072026田野 增生O-for 論壇 LD.gh (91.9 KB)

20260511_田野圖形 增生 O-for論壇.3dm (12.9 MB)

**

**

Hi -

You need to install the current version of Rhino 7, 7.38.
If you find Rhino to be useful for your work, please buy a license.
-wim

Hi Wim, thank you for the reminder. I am currently using a workstation provided by my office, and the IT policy limits our ability to perform manual updates. I am exploring what’s possible within this specific environment (v7.1) before requesting a system-wide update from the IT department. Thanks for the clarification on the version requirement!

Thank you so much! The visual result you achieved is exactly what I am looking for.

I have a small favor to ask. As I mentioned earlier, I am currently restricted to Rhino 7.1 and cannot perform any updates due to my environment. This means I am unable to open your file or use any recent plugins.

Regarding your “Edit” about using a vector from the bottom face centroid to the top face centroid—that sounds like a very clean logic. Could you please guide me on how to implement this “per-object” gradient using only native components available in my version?

Specifically, I would appreciate it if you could explain the logic behind mapping the color transition to each individual unit based on that axis. If I can understand the workflow, I will try my best to recreate it in my current environment. Thank you for your patience and for sharing your expertise!

Best regards,
Harp seal