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 …
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 …)
To add to what @rigoletto said you could also use a White Noise texture to drive the Color Ramp like so:
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:
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 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.
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.
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… ) 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
Thx guys! It worked.