1
$\begingroup$

I am trying to make a skyscraper, and I want the windows to randomly be on or off. In the image shown below, on the middle skyscraper, the windows are a repeating 2x2 texture, where three of the pixels are transparent and one is opaque. This texture is mixed with the gradient texture below (a 4x4 Cubic texture), with the windows' opacity as the Fac.

enter image description here

I would like to randomize the color of each tile of the window texture, to make most windows yellow, and some black. How would I go about doing this?

$\endgroup$
4
  • $\begingroup$ Hi :). Are your windows actual geometry, or just colored squares on a texture? $\endgroup$ Commented Mar 23, 2022 at 10:49
  • $\begingroup$ The windows are colored squares on a texture. They're a 2x2 texture where 3 pixels are transparent and one is white. $\endgroup$ Commented Mar 23, 2022 at 15:56
  • $\begingroup$ Can you please, show us how your image texture and UV map looks like? I made a node setup that can help you but I need to see how the texture looks like and how it is mapped on your building. Or if you could share the blend file, it would be better. $\endgroup$ Commented Mar 24, 2022 at 10:28
  • $\begingroup$ Are you looking for something like this imgur.com/yXb1w6s imgur.com/kBMJLiN? $\endgroup$ Commented Mar 24, 2022 at 10:32

1 Answer 1

2
$\begingroup$

with this nodes setup:

enter image description here

enter image description here

you get this:

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Oh that's very nice. Love the versatility :) $\endgroup$ Commented Mar 23, 2022 at 19:21
  • $\begingroup$ Thank you very much! $\endgroup$
    – Chris
    Commented Mar 23, 2022 at 19:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .