GN radome color

I have repeated this block by GN and now I want to add random colors to each block, but when applying random colors it makes each block have multiple colors, while I want each block to be the same color, and I do not know why this happens. anyone can help, please.

Hi Aya_Elhawary,
are the blocks/buildings separate objects?

Welcome :tada:…

It’s not really recognizable where you added the color… you may just add it “later” in the GN setup ?? (or show more of it …)

1 Like

One possible solution:


coord_color.blend (179.4 KB)

2 Likes

To add to what @rigoletto said you could also use a White Noise texture to drive the Color Ramp like so:

1 Like

this is the original building, then I duplicated it vertically and horizontally by GN and I tried to make a city so I duplicated the building and tried to randomize the color by GN but it made each floor with a different color. is there any way to make the whole building with the same color

OK, but the buildings themself are separate objects, right? Like so:
image

If yes, either use one of the solutions provided above or use the Object Color to define a specific color for each object/building like so:

If no, then (as @Okidoki already pointed out) you would have to show us more of the node tree or send us the file, in order to help you

No, it’s not separate.
I attached the tree node

No no, i meant the Geometry Nodes tree

Yeah I know, that is the Geometry Nodes tree. I made a brick material and then I tried to add random colors to it

That is definetly the Material nodes tree - not Geometry Nodes.

If you can, share the file with us.

Sure!
HYG
City_scene

Alright, i think i have it:


Before instancing the buildings, store a random value per instance in the Geometry Nodes setup. You can then access this value in the Shader Editor with an Attribute node (type Instancer) and replace the Object Info - Random node with that.
You also have to change the seed per Object so the colors don’t repeat themself.

3 Likes

Oh… very quick thought…

You are coloring the building in the genereal GN network… ( you should also name this… for example “building generator” or something… :wink: ) so if you want to color every “building” in a random color then you should to this by coloring the plane which this building are built on… and use this color in the GN…

maybe by a second GN (but as first modifier) producing somecolor and use some attribute “transfer”…

…damn @Zebrahead was faster :stuck_out_tongue_closed_eyes:

2 Likes

Thx guys! It worked.

1 Like