Hello Skyliners!After releasing myt last building I was asked how I made the nightlights for it, so I thought that I could make a tutorial to share this technique with you.First let's recap how the nightlight system works in Csl:The Illumination map is a greyscale picture, a greyscale picture has pixels of values between 0 and 255.The devs have chosen to separate this range in two.From 0 to 120 the pixels will be lit everytime (yes, during the day too) and use the diffuse map color.There's a range from 121 to 127 that's left unused for now.From 128 to 255 the pixels will be lit "randomly" during the night... but only in one color independently from the diffuse map.192 works as black, 128 and 255 are the values that are lit most of the time (but not always). The engine makes a gradient between 128 and 255, using 192 as the black point but making the gradient smoothly move during the night.Let's look at it ingame : the asset you see has an illumination map going from 0 at the bottom to 255 at the top, I plopped a few of them so you can see that the top part has a moving part.(if you want to see this asset in your own game and see the lights move during a night, download it and install it in your asset folder (it's using a clinic template) : https://1fichier.com/?93ej5aelv7 We could use the 0-120 range to have populated windows but as it will be lit during the day too it looks a bit weird.(I've seen some assets made like this... it's sweet looking at night... but I'm less convinced about the daytime look. Can be used for things that would "in reality" stay lit all day... but those are rare)and... we can't have the lights come on and off during the night. It's on... and that's it.Now the 128-255 range almost "forces" us to have full windows... and that's what you see on every building : flat windows.But there's a way...Let's start with preparing what we needI will be using a simple cube, mapped with a texture showing four different windows.I googled for some windows, here they are placed on the map. I made them greyscale already(sorry guys my photoshop is in french...)Now what we want is the white parts to be lit and the black ones to stay black; the "random" system works like a gradient so what we will do in photoshop is use a level correction layer on each of our windows.We have 4 windows, we have to spread them into the 128-255 range...Window 1 will be between 192 and 245Window 2 between 192 and 2303 between 148 and 1924 between 133 and 192Here is the level correction layer for the first window :We're almost there, but for the windows under 192 we have to invert the pictures (because 192 is black and 128 is "the most" white)So let's invert the two window imagesAnd voilà (I just made a full black diffuse map and a specular map to make the windows reflective) !!We have only used 4 windows here, but of course you can apply this to groups of windows (do not make too many groups, 4 is very ok, as we had to use pretty much all the range between 128 and 255 there isn't really more to be done)You can download the photoshop file for this tutorial here, I added the fbx file and the maps in the zip : https://1fichier.com/?q9jys7owp2 Have fun with your nightlights. If you have some questions or remarks, feel free to ask.