5
$\begingroup$

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:

The current draft

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: Current iteration of window nodes

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: Final result

The final material (below) is a far simpler collection of nodes than I started with: Final Material Nodes

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.

$\endgroup$
1
$\begingroup$

Solution for a single mesh using the White Noise texture (instead of Object > Random output)

  1. Create a new UV map, and scale the UV islands to 0 (use Pivot > Individual Origins)
  2. Add a White Noise texture, UV Map node to drive it, and ColorRamp to control it.
  3. Done.

enter image description here

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ YOU are awesome. Thank you so much! I'm going to post my final node-array for anyone who wants to replicate this. $\endgroup$ – DocBadwrench Sep 18 '20 at 19:38
  • $\begingroup$ No problem, learned something new myself :). $\endgroup$ – Jachym Michal Sep 18 '20 at 19:41
5
$\begingroup$

You can use the Random output with a ColorRamp.

  1. Start with the Object Info > Random output
  2. Add a ColorRamp with specified colors (mine is also set to Constant)
  3. Use the result as a window tint color...

enter image description here

$\endgroup$
4
  • $\begingroup$ When I attempt to do that, by plugging a Color Ramp into the Principled BSDF which serves as the basis for my window color, the whole lot of the colors snaps to one value in that ramp. I cannot replicate the animation that you demo here. Current Node Setup: i.ibb.co/JmQz34N/Draft-2-Node-Setup-2020-09-18.png $\endgroup$ – DocBadwrench Sep 18 '20 at 16:14
  • 1
    $\begingroup$ @DocBadwrench: This method assumes that the windows are all separate objects. If your windows are all part of the same object, then it won’t work. $\endgroup$ – Stephen Sep 18 '20 at 17:18
  • 1
    $\begingroup$ Hey @DocBadwrench :). As mentioned in your question, it's meant for instanced window objects. Do you want a solution for a single mesh? $\endgroup$ – Jachym Michal Sep 18 '20 at 17:54
  • $\begingroup$ I'm building a bunch of buildings using the Building Tools addon and it creates one mesh so I definitely need a solution for a single mesh. Thanks. $\endgroup$ – DocBadwrench Sep 18 '20 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.