Cities: Skylines
108 ψήφοι
Illumination Map Value Overview
Από GCVos
This guide studies how different illumination and specular values affect the look of your structures during night time. It's primarily intended for asset creators and serves as a visual reference only. This is in NOT a 1-2-3 tutorial or how-to! The guide will be updated as we learn how to deal with artifacts and other texturing related elements.
   
Βραβείο
Αγαπημένο
Αγαπημένο
Μη αγαπημένο
Introduction

This guide shows you how different illumination and specular values affect the look of your structures during night time. It's primarily intended for asset creators and serves as a visual reference only. This is in NOT a 1-2-3 tutorial or how-to! The guide will be updated as we learn how to deal with artifacts and other texturing related elements. If you've encountered anything in particular yourself, please share it with all of us!
What you should know...
To start, I'm going to quote Dev Diary 2 and the Asset Editor wiki pages.
This is all the info that's already out there.

Illumination Map Details

0 = No illumination
120 = Full illumination
128-255 ( Windows Random Illumination Values)
192 (Neutral illumination value)

''The likelihood of a window to be lit at a given time and its intensity are randomized for values within 128 and 255, the closer the value is to a boundary the more likely it is to be lit and stronger.''

Source: http://www.skylineswiki.com/Asset_Editor

''It used to be the illumination map acts as a mask where a value of 0 (black) means no illumination and a value of 255 (white) means full illumination using the diffuse texture information.
We preserved this behaviour but squeezed the color value to range between 0 and 120 instead, where 0 still mean no illumination contribution from the diffuse texture and 120 means full contribution. We hereby freed the range 128 to 255 to allow windows to be lit randomly. A value of 192 means neutral, so if you want a building to be unlit at all times, the illumination map needs to be solid 192. The likelihood of a window to be lit at a given time and its intensity are randomized for values within 128 and 255, the closer the value is to a boundary the more likely it is to be lit and stronger.''

Source: https://forum.paradoxplaza.com/forum/index.php?threads/cities-skylines-after-dark-dev-diary-2-whats-new-with-modding.878916/
Methodology
This guide originally started out as a quick experiment. But with the incredible amount of possibilities you get with the randomized lighting, as well as existing specularity and illumination during daytime, it can be very hard to predict how assets are going to look in the end.

As such, I've setup the following textures.

Diffuse



Illumination



Specular



These are applied to a simple 4x4 box. I may add alternative overviews later on.


Due to the unpredictable behavior of the lighting system (which is a good thing!) you can only analyze the final look by placing lots and lots and lots of these. So be prepared for a lot of screenshots on the next pages!
Asset editor
Down below you will find a few screenshots of what this will look like in the asset editor, during different times of day. Again, you will notice the randomness for values 128 to 255. That's why you will want to test your assets ingame or even reload the editor a few times to see if you're gaining or losing light at any instance.




  • Notice the differences left and right...



Also notice values closer to 128 and 255 don't guarantee the lights are always on. They seem to have a bigger influence on overall brightness. If you want your windows lit constantly, you will have no choice but to go below 127, which will obviously mean some lighting during daytime.
Ingame overview
I'm going to refrain from a lot of text here, because I think the images speak for themselves...

A bunch of them next to each other:


Ignore the block on the right, I think it had no power.

Comparison shots






I think we can all agree how amazing this looks, even on a flat polygon! Notice values 128 and 255 look like they are connected to different seeds, so it does matter if you go above or below 192. It's hard to analyze to what extent though...

Here's two video comparisons created by stmSantana:
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=618233539
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=618233537
Artifacts, visual glitches and fixes
  • Combining lights with a strong specular on a horizontal surface results in a kind of z-fighting:

  • Transition areas will create very obvious artifacts and overlap problems:


This may also occur during daytime when the engine decides certain pixels are inside or outside the illuminated area. Pixel precision does not solve this, and it becomes more and more visible as you zoom away and the texture resolution is lowered to LOD levels (mipmaps). This causes severe aliasing and you will be left with light emitting jaggies and edges around every window.

Possible solutions:
  • + Use separate polygons
  • + Use clean and consistent values
  • + Keep your seams vertical or horizontal, this will make mipmapping more reliable
  • + Use a black background for non-randomly illuminated areas (0-120), a 2 or 3 pixel bevel already does the trick!



  • + Don't use a black blackground for randomly illuminated areas, use 192 grey instead.
  • + Don't go from 0-120 to 128-255 in any visible part of your texture, space out those UVs!
  • + Don't put unneeded stuff on top of your illumination maps (like massive numbers lol)
Final notes
That's about it for now guys! I'm gonna share this guide as is so people can look into it, I'm sure it'll grow larger as we learn how to use the illumination properly...

Thanks for checking this out & thank you to CO for implementing this system!
50 σχόλια
SA547PH 26 Μαϊ 2021, 21:55 
It should be strongly noted that the figures/numbers are not RGB values but the level output(?) amount as in the case of Photoshop i.e. 0-255
AmiPolizeiFunk 14 Νοε 2017, 7:16 
here is a sped up test video to demonstrate how the two gradients (129-191 and 193-255) function over time. hope it helps creators visualize the algorithm https://www.youtube.com/watch?v=OI3dDLElwJs
Jimbobbedyjobob 19 Μαρ 2017, 10:03 
@[NL]LUURT that thar's some gud investigorating!
Berrante 19 Μαρ 2017, 8:17 
REALLY SWEET JOB!!! KEEP IT UP!!!
Wibbert 22 Απρ 2016, 11:59 
sorry for spamming but;
for the lower half of the illumination map, the part that always shone, the brightness at which is shown was was darker where the value was lower, so if faded from bright to no light.
Wibbert 22 Απρ 2016, 11:57 
edit: illumap shaded from black to white* :s
Wibbert 22 Απρ 2016, 11:56 
Just thought i'd share my information that i found through a little experiment:
I created a surface with an illumination map that shaded from black to grey, a color that shaded from bright to dark angled 90 degrees or perpendicular to the direction of the illumination map and a specular map that had a 45 degrees angle crossing both. The result showed that for the lower illumination levels it at night it shone always and in the color of the diffuse map and more where the specular map was darker. Where the illumination map was higher it was seperated into two parts; the part above 192 and the part below. It showed over time that from the far end of those two parts towards the middle light would apear. not randomly but kindof like waves. Also i noticed that for the higher value one of the two parts (values above 192) the speed at which this wave would apear was noticably slower, by aproximation between 2/3rd and 3/4th of the values lower than 192.
MR. HAPPY 16 Απρ 2016, 11:14 
@Jimbo Some pleople said there was nothing wrong with my model. It just seems to be normal C:S Behavior of shadow and lighting. Imo its too dark but heey, if others say its cool. Im fine with that :P

If there was any problem it was in the normals. Playing with the normals in 3DS max changes the way light and shadow behaved on the model. Making them all point upwards did result in a glitchy shadow, however the model was way more bright even in the dark. I just dont know how to edit normals correctly :P
Jimbobbedyjobob 15 Απρ 2016, 0:34 
@Ez Aimz if those suggestions are successfull, let me know what they are...
MR. HAPPY 14 Απρ 2016, 0:38 
Yea I got that 1 now. Soft shadows. However I want the models to show properly for everyone, not just me :P I got some suggestions on how to fix it elsewhere. Gonna try it out tonight.