Possibly old news, but not to me. So the classic method of creating night windows is to grab the face in the model that is the window, duplicate it, rename it as something_night and apply a night texture - like the attached The problem is that the face in the model is the whole window - frame and all. thats OK for daytime but at night your night window switches on and the whole image lights up. The only way around this would be to make individual night faces for each window pane - a right pain - especially for a nicely interesting window like this one. Its not an issue for distant buildings where twinkly windows at distance are all that are needed but if the building is close to the railway it looks pretty odd and only gets worse the darker the night gets. So I had a thought...What if I create a seperate texture and still use the AddATex shadre but instead add an alpha layer of white for the panes and black for the frame. This means that at night the frame is invisible to the night texture and so the daytime frame shows through but the panes are lit by the night texture Yep, that works. Now only the panes are lit but the advantage is that as the evening draws on the frame is lit by the sun and sky and so only gradually gets darker.
Then I had an idea... what if instead of just a black and white alpha layer I used the full range of grey shades to blend from an imaginary light source inside to the darker edges of the pane. So when night comes some of my window gets gradually darker whilst other bits are lit by my imaginary light source Hah ! so the multiple pain window is lit by just the alpha black/white combination and the door ( the four small windows ) is the same even though the whole door with its windows is a single face and single image. But the sklight is lit using the alpha blend so that the lower part gradually gets darker but the light source still remains.
compare the above night time with earlier in the evening and the impact of using alpha on a seperate channel becomes obvious
A sense of how well this works is this window which has the late summer evening lighting on the window frame so its lit the same as the rest of the building but the _night texture has turned on so the panes are lit. However the entire window, panes and frame are a single image posted onto a single face