Automating color-blocking subdivision

Hello,

I work on a script for subdividing building facades into large color blocks (color-blocking), like in the attached references

Current logic Usually, my algorithm works through a combination of a randomizer and attractor points:

  1. The facade plane is divided into a grid of cells.

  2. I manually place points in space.

  3. The script groups cells that fall within the radius of these points (using “point in cylinder” logic) and colors them.

Color_Blocking.gh (1.1 MB)

The problem This process is currently too manual and not very convenient. I have to move the points every time to find a good composition. And i feel like my approach with the randomizer is a bit off because I can’t seem to get it to generate large enough blocks

What I want to achieve I am looking for a way to fully automate this. I need the composition — including block sizes, positions, and proportions — to be generated procedurally. Ideally, I’d like a single seed slider that changes the entire variation.

Questions

  1. What is the best way to randomize the position and “strength” of attractors so they don’t overlap chaotically but create a balanced composition?

  2. Is there a more efficient way to group cells into rectangular blocks other than my current distance-based logic?

I would be very grateful for any ideas or examples of similar logic!

from the images looks like there are two colors shared among the buildings: S1, S2

then there are 3 main colors: each building gets one of those plus its lighter version, and they are red, green and “Mouse” :slight_smile:

so for each building you end up for instance with [ (Red_1 & Red_2) + (Shared_1 & Shared_2) ]

a given “solid” (whole unique building) will have one of the above set of colors distributed on its vertical faces

do you want to strictly imitate this?

[edit] I ignored the fact that where shared color S2 is present (grey) the facade is split in two horizontally and the top part gets white

Yes, you’ve really got the gist of it! That’s exactly what I’m aiming for—to create not just a random pattern generator, but a design code. It would be interesting to try your approach: each building gets its own unique palette (for example, 2–3 shades of the main colour) :wink:

Maybe something like this?

Color_Blocking_v2.gh (120.3 KB)

I decided not to implement the strict logic with color themes (Red/Green/Mouse). I wanted to keep the script a bit simpler and just achieve an effect of randomized color blocks across all surfaces. However, instead of a standard Random component, I used a Spatial Hashing method: I took the X, Y, and Z coordinates of each facade’s centroid, ran them through math operations (division, rounding, and multiplication), and used the resulting value as the Seed for the Random node.

Ideally, it would be great to have colour sets like this, but I’ve moved away from that concept :slightly_smiling_face: