Kight in windows

Hi all. Please tell me or throw off the link to the lesson on how to make the light material in the windows. So that, when applied to the building, the light was not in all the windows, but in different ones, as in the photo? That is, somewhere there is no light, but somewhere there is. Thanks in advance for your help

There are multiple approaches to achieving a desired outcome, such as controlling the amount of light in a window. The information on how illuminated a window should be can be stored at various stages of your program. One common approach is to use instancing when working with similar meshes but with different settings.

By creating a blueprint and adding a mesh to it, you can modify the mesh using code and other features. Another option is to include code in the material editor, which can also alter the appearance of the window.

For a shader / material approach you can use the world position and a random texture to blend the values and thus getting a value that can determine the lightness value of the window.

If you use a blueprint approach you can use a random float that is generated when the mesh is setup. This value can then be connected to the material and alter the lightness.

Thank you for your reply. But here’s what I did - this is the material of the window with light. And I don’t understand how to proceed. I don’t understand what to do next. That is, according to the idea, I want to have just a material that contains two colors - light and without light. And so that these two, when applied to the metarial slot in the mesh, simply work like a material, but with the light accidentally turned on in the windows. How to be here, do not tell me, or is it banal to throw off a link to the lesson? I have already come across this topic on YouTube, but when you need this video, there is no.