How to apply Gradient to Instance Array

Hi there,
This is my first post ever, but not the first time blender community saved my projects. I hope someday i become the person on the other side, reaching a hand.

I am working on an Archviz faculty project and need to kind of randomize the material of the roof tiles, from glass to ceramic, like this:

Because I have around 5000 tiles and a weak laptop, I decimated the geometry, “collected” and instanced it, parented to a plane i array through the roof. Even like this the laptop slows down a lot.
In this experimental .blend i tried this effect with some success in a default cube (object, not instance) with applied arrays. Without the applied arrays I can’t work out the UVs for the Gradient (top part of nodes). With an array of plane instancing the default cube it just doesn’t work and I would appreciate your help so much.

Is it possible to do the effect on the left, keeping the mentioned array of instanced tiles so I don’t kill my laptop?
Thank you from the heart blender community :orange_heart:

This may help you…

1 Like

Thanks for the reply!, but I just can’t see how it could help me, likely because I’m a noob…
What i want is to have each cube with color black or white, so that i can input those b&w values in a mix shader as factor between opaque and glass tile materials. And the gradient node helps doing the transition.
But the problem I have is when doing this in an array of a parent instancig the cube. I have no problems doing this with normal objects with applied arrays. Do you know if it’s possible to do this? Thanks again!

Somehow I managed to apply the noise correctly to the instanced collection, but still I can’t figure out how to work the Coordinates of the Gradient Node

use a mapping node for the coords.

more like this.

1 Like

Mine is an instance too btw.

1 Like

Mine gets weird, maybe because I am doing arrays of a plane, which is parent of the collection (default cube)…

Did it! It was quite simple. I just didn’t understand what I was doing, but then it clicked with a video. Thanks @AlphaChannel

1 Like