I am attempting to create a city-scape. Along the way, I want to create some variation in the Glass material so that, when instanced, aspects of the mesh's appearance will naturally vary. In the current exercise, I am attempting to add further variety to the 'lights' visible in the glass textures found in the two (lower right) buildings in the image below:
You can see that I've included a musgrave texture in order to create the illusion of patchwork-illumination in each of the windows. In fact, here is my current node setup:
What I am trying to do:
You see that constantified-color ramp? Well, what I was starting to develop was an idea that a particular window (not just the musgrave pattern on top of the window), would be a different color (simulating the slightly different light shades used by bulbs). Any ideas how I would actually make this happen?
Clarification based on comment feedback: I am attempting to achieve this for a single mesh, not separate objects.
Many thanks for your attention.
BIG thanks to Jachym for their help. Here is a demo of the finished product:
The final material (below) is a far simpler collection of nodes than I started with:
There is still an outstanding issue (minimized by the current composition) where glass that is not emissive (due to being in the 'black' part of the musgrave texture) renders out some artifacts; I will post a separate thread to address that. When fixed, I will update this thread.