• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Greetings everyone,

Today, let's have a look at the two biggest changes/new stuff happening on the Modding side of Cities: Skylines.
Let's get started on how the day/night cycle affects the Asset editor and user-created models:
After we decided to add this feature alongside the After Dark expansion, our first reaction was to ponder what would that mean for the ton of assets already created on the Steam Workshop. We knew it would be impossible to completely automate the process to lit those assets during night time, but we wanted to minimize and ease the amount of manual work required by content creators.
Our first step was to turn all prop assets which are expected to emit light into assets emitting light. Street lamps/poles (see below) and so forth are heavily used in custom assets, therefore it made sense to take that road, as it would provide a base lighting for all assets already using them.

ul9359B.png
To allow more granularity to the lighting process of a building, we also added various light props such as wall-mounted and floors lights. Heck we even added a sub-category to the Common Props toolbar. Below is an example of how to properly mess up the night look of a residential building using wall-mounted lights, also features the new Light props toolbar.

rSdD1qL.jpg
In order to visualize the asset both at day and night time in the Asset Editor, we replaced the previously existing slider Light rotation to control the time of the day. The lights toggling/animation logic are simulated in Editor just as they would be in-game, so the preview of the building for a given day time is accurate.

kCkyywE.png

The dynamic lighting was the first aspect to consider, but we also needed a way to get the windows to lit up therefore we added support for texture-based illumination using illumination maps.
Conveniently, we have had illumination maps all along (the _i suffixed images used when importing asset) but they have obviously been heavily underused as our themes only features day time until now.
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.

As an example below is a residential house with its windows lit and diffuse, specular and illumination map composited next to each other.

UUDTQfL.jpg
In this case, the UV mapping is such that the windows use very little texture space but you can see them clearly at the bottom right of each texture. Notice the illumination map value of unlit areas is 192.
Also, the specular map, while irrelevant to the lighting is shown in the picture as it is worth noticing in most cases, if you have already created a specular map for your asset, you already have a base windows mask to derive from when creating the illumination since windows are usually reflective and you have already cranked up the specular mask color.


Next, let's talk about a brand new feature which affects both content creators and players: District styles.
After shipping the free patch introducing the European theme and buildings, a rather high demand for these buildings to be made available in all themes rose from the forums. It was not done as such because of both technical and visual motives:
- memory usage would have gotten very tight for our user with minimum system requirements and we did not want to break the game for them.
- Buildings have specific requirements to tie-in with corner buildings and we would have needed to redo the entire stock buildings set to scale with the wall-to-wall and corner buildings feature. That obviously was not a viable option.
Coincidentally, another pretty highly requested visual feature was the ability to set a policy which would define the look of a district.
While we did not feel comfortable making this feature a policy as policies should have an impact on gameplay and not purely on visuals, we did add an option to select what we call "Styles" from a new Dropdown component in the District info panel.
We added a default building set with the European buildings and when enabled in the Content Manager, it will be available in the game dropdown.

yFHlWqy.jpg

Once a style is set to a building, it will start using/replacing buildings from that style matching the level and density requirements for spawning hereby you can have a European style district in your city.
The screenshot below shows European buildings in the good old Los Santos map which is built on a tropical theme.

H6UNbcu.jpg

This is pretty cool but here is the good(er) news: content creators can also create and share their own styles on the Steam workshop.
In the Content Manager, there is a new section called Styles and you can create a style to which you can add any building uploaded to the Steam Workshop.

otrq9jO.png

xcocjku.png

Provided you include buildings which covers all levels and densities used in the game, you will have a fully customized look for a given district \o/
We can't wait to see what new amazing combinations you are going to come up with!

That's it for today.
Thanks for your time reading this diary, it's back to coding for me, there is still some work to be done :)

/damsku
Technical Director @ Colossal Order
 
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


NO NO NO NO and NO !!!

This is wrong, very very very wrong !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


The diffuse map CAN't be used for the color of the illumination, this means that all windows will just be a lit version fo what was there before !! Even if we used a specular map on top before, the reflection was tinted by the diffuse depending on the angle you looked at it and the light that touched it. We simply CAN'T have it that way !!!!

Now (as an example) we CAN'T use the fact that a black diffuse will give darker reflections at certain angles.

THIS IS THE WORST IDEA EVER guys !!!!!!!!!!!!!
 
  • 1
Reactions:
We already had to deal with some limitations, but this is one more and I feel completely betrayed as a builder by this decision.


All the glass buildings will have to conform to this, they will obliagatory look weird at some angles during the day because the color underneath (if they are made to have light at night) will show.
 
Thanks for the info. So we can just continue to use the Illumination maps as they currently are? What about how the day cycle affects the illumination? I'm hoping the illumination turns off during the day because not everything that glows at night will be windows and we want to maintain desaturated colors. Perhaps there could be a way to set the map to where a certain value turns on and off during the day/night cycle.

I'm loving the inclusion of "Styles".
 
Guys you take it that we just want to light up the whole thing with bright white color or uniform color, but that's not what builders will and want to do.

We want to be able to have different tinted colors of windows during the night. And if the diffuse is used as the light color it just forbids us to do so or it will mess up the looks of our buildings during the day.

My latest tower... http://steamcommunity.com/sharedfiles/filedetails/?id=505937746

Thank you, I'm dead there. My only choice will be to have it light in red at the top... and not at all at the bottom because to get this effect I used a black/red gradient under the specular.
 
@co_damsku You said

"Provided you include buildings which covers all levels and densities used in the game, you will have a fully customized look for a given district \o/
We can't wait to see what new amazing combinations you are going to come up with!"

If you don't include all levels, What Happens when the game wants to increase level

Does the building Remain at the highest level that's available, does it disappear to an empty lot or does it generate an error because it can't level up.


I was just thinking, if you had a style called "Slum" and only run down Level 1 and Level 2 buildings would this be a way of creating a Slum District? Or am I misunderstanding.
 
  • 1
Reactions:
So is there going to be a way to deploy a whole style through the workshop, or will we be stuck having to download a set of related but, nevertheless individual, assets and manually setting them to a style?
Also can a style be set citywide like policies?
 
I'm now illustrating why I'm very unpleased :

5420072015082700001.jpg


Left, white diffuse under specular. If we want to have something different that just a white light during the night how will it look during the day ? Yes, we won't be able to do that

Middle, black diffuse under specular... well... simply forget that, we won't be able to do it anymore.

Right, red under specular. Now if we use colored glass during the day we are condemned to have it light the same color during the night. No choice.



Well ??? o_O
 
  • 1
  • 1
Reactions:
A question (might make it a bit less awfull).

If we use a value of 120 in the illumination map and the diffuse is pure black, what will happen ?).

If you make the illumination overcome the base color when pushed to the max, well it might still be "ok"... (but not what we would have liked to have at all).
 
Thanks for the diary! :)
Heck, I imagine sleepless nights fixing my mods after 'Afer Dark' comes out :( Looks like many of them will be affected by these changes. Still it's unclear to me will european buildings load for all biomes (and vise versa) or not ? Is 'Default' style what I call 'International' theme in my mods?
 
Looking good folks!

Will there be any mechanics to bid and deal with hosting hypothetical events (parades, sporting events) and the corresponding problems (tourism, traffic)?
 
  • 2
Reactions:
If not, will vanilla style (European/International) be selected on level load?

Or is it simply a name for mix of all growables (like current behavior)?
I think the inclusion of european buildings is set as a mod in the mods panel, you enable it before loading a game and then when you load the game all european is unlocked (or at least all growables) that way it's still a mod and doesn't break the min specs?

just guessing though *disclaimer
 
  • 1Like
Reactions:
Can you please please please add to option to add an (optional) interior map that is used instead of the difuse map if present. I am completely on one page with zed68 on this....
 
  • 1Like
Reactions: