Saffie
(Saffie)
May 1, 2026, 3:07pm
1
How would I randomly assign all of these cubes different materials? I want them all to be glass of different colours, they are all collected into 1 layer
Japhy
(Japhy)
May 1, 2026, 3:27pm
2
Hi Saffie,
We’ll need a little information to be able to properly assist.
Asking questions and getting answers is what this forum is all about. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions, but don’t think of them as rules and especially don’t think of them as guarantees.
1. Choose a descriptive title for your post
Don’t title your question Help! or I have a problem or Deadline tonight!, but actually describe the problem you are having.
2. Be s…
Saffie
(Saffie)
May 1, 2026, 3:49pm
3
Hey sorry, i havnt touched grasshopper in about a year and dont really remember what im doing.
i found a couple of similar examples like this but i dont really know what im looking at.
i want to assign these cubes with a random coloured glass material
Hello!
I am trying to create a random pattern of 4 colors. I managed to create a script in Grasshopper that does it for 2, but cannot replicate it for 4. Here is a screenshot of the way it looks now, but I need 4 different colors, and preferably I’d like for there to be an even number of each color pane. (There are 828 panes, so 207 panes per color.)
[image]
This is the script I created, please let me know how I can adjust it for my goal.
random selection A.gh (31.2 KB)
Here is the file wi…
heres my file with the cubes, any help is really appreciated
model.3dm (5.7 MB)
Japhy
(Japhy)
May 1, 2026, 3:59pm
4
here is a quick way..
Typically you would have a set of colors and then jitter to create the randomness, often designers will specify a % of the colors in the set.
RandomColor-R8.gh (7.9 KB)
Saffie
(Saffie)
May 1, 2026, 4:15pm
5
thank you so much, this is a perfect start! time to play around with it!
Japhy
(Japhy)
May 1, 2026, 6:05pm
6
Another quick version.
RandomColor-R8-v2.gh (11.6 KB)
note you can query and assign Rhino materials as well.