Wie gewohnt die freie Übersetzung der am 27.08.2015 erschienenen Dev Diary.
Liebe Grüße an alle!
Heute werfen wir einen Blick auf die beiden größten Änderungen bzw. die neuen Sachen, die sich beim Modding ergeben werden.
Lasst uns damit beginnen, wie der Tag&Nacht-Zyklus den Asset Editor und Nutzer-kreierte Models beeinflusst:
Nachdem wir uns entschieden haben, dieses Feature neben dem Addon hinzuzufügen, war unsere erste Reaktion sich zu fragen, inwiefern dies die Unmengen an bereits veröffentlichten Gebäude im Steam Workshop beeinflussen wird. Wir wussten, dass es unmöglich sein wird, alle diese Gebäude in die Nachtzeit automatisch zu überführen, doch wir wollten natürlich auch den Schöpfern der Gebäude so wenig Arbeit aufhalsen wie irgend möglich.
Unser erster Schritt war es also, alle Objekte, von denen man ausgehen sollte, dass sie leuchten, auch wirklich als Leuchtobjekte einzubinden. Straßenlampen und Laternenmasten (wie unten) und all jene Dinge werden sehr häufig in spielergenerierten Gebäuden verwendet, daher war dieser Weg sehr naheliegend, um auch bereits erstellten Gebäuden eine Beleuchtung einzubauen.
[Blockierte Grafik: http://i.imgur.com/ul9359B.png]
Um eine größere Granularität (bessere Verteilungsmöglichkeiten) der Beleuchtung eines Gebäudes zu ermöglichen, banden wir auch viele andere Leuchtobjekte wie zum Beispiel Wandleuchten und Deckenbeleuchtung ein. Zusätzlich bauten wir natürlich auch eine neue Subkategorie zur Werkzeugleiste im Editor ein. Im nächsten Screenshot ist ein Beispiel dazu, wie man die Nachtansicht eines Wohngebäudes mit Wandbeleuchtung ausstatten kann, ebenso ein kleiner Ausblick auf die erwähnte Lichtobjekte-Toolleiste.
[Blockierte Grafik: http://i.imgur.com/rSdD1qL.jpg]
Um eine bessere Ansicht des Gebäudes sowohl bei Tag und Nacht zu erzeugen, ersetzten wir die vorherige Licht-Rotations-Leiste durch eine Tag&Nacht-Kontrollfunktion. Die Lichtanschalt-Animation werden im Editor genau so simuliert wie im Spiel, daher spiegelt die Vorschau also sehr genau den Tag&Nacht-Wechsel im Spiel wider.
[Blockierte Grafik: http://i.imgur.com/kCkyywE.png]
Die dynamische Beleuchtung war auch unser erster Aspekt, den wir genauer behandelten, aber wir brauchten auch eine Möglichkeit, die Fenster zu erleuchten, daher führten wir eine Unterstützung für texturbasierte Beleuchtungen mit Leuchtflächen ein.
Praktischerweise hatten wir natürlich schon die ganze Zeit Leuchtflächen im Einsatz (die auf _i endenden Bilder bei Einbindung eines Assets im Editor), aber sie wurden - sehr offensichtlich - bisher absolut von uns unterschätzt, da wir ja bis jetzt nur die Tageszeit unterstützt hatten.
Für gewöhnlich funktionieren Leuchtflächen als eine art Maske mit einer Spannweite von 0 (schwarz), also ohne Beleuchtung, bis hin zu 255 (weiss), also völlige Beleuchtung. Diese Einstellungen kann man in der Texturinformation einstellen.
Wir haben diese Einstellungen schonmal vorsorglich eingebaut, unterstützen derzeit aber nur eine Beleuchtung von 0 bis 120, wobei 0 immer noch keinerlei Beleuchtung bedeutet, hierbei dann aber 120 für ein hell erleuchtetes Fenster zählt. Wir haben dabei dann allerdings so eingestellt, dass die Fenster zwischen 128 und 255 zufällig hell beleuchtet werden. Ein Wert von 192 bedeutet "neutral", wollt ihr also, dass eure Gebäude nicht beleuchtet werden, dann sollte die Beleuchtungseinstellung auf 192 eingestellt werden. Die Wahrscheinlichkeit, dass ein Fenster zu einer bestimmten Zeit erleuchtet ist, sowie die Intensität ist völlig zufallsbasiert, wenn ihr Werte zwischen 128 und 255 wählt, mit einer größeren Wahrscheinlichkeit, je näher dieser Wert einem der beiden Grenzen angenähert ist.
Ein Beispiel für ein Wohngebäude mit erleuchteten und halb erleuchteten Fenstern, der Spiegel- und Leucht-Maps findet ihr im nächsten Screenshot.
[Blockierte Grafik: http://i.imgur.com/UUDTQfL.jpg]
In diesem Fall wurde das UV Mapping so eingestellt, dass die Fenster nur kleine Texturflächen brauchen, man sie aber deutlich in der unteren rechten Ecke jeder Textur erkennt. Achtet auch auf die Beleuchtungs-Map, die unbeleuchteten Flächen haben den Wert 192 bekommen.
Die Spiegel-Map ist natürlich irrelevant für die Beleuchtung, dennoch sieht man hier sehr gut, dass ihr bereits eine einfach Fenstermaske habt, wenn ihr die Beleuchtung einrichtet, denn Fenster sind in der Regel natürlich spiegelnde Objekte. Ihr habt also bereits eine deutlich aufgebohrte Farbvariante der Spiegel-Map.
Nun lasst uns über ein neues Feature sprechen, was sowohl die Gebäudegestalter und Spieler interessieren wird: Distrikt-Stile!
Nachdem wir den freien Patch mit den Europäischen Stilen und Gebäuden rausgehauen haben, fanden wir vermehrt Anfragen zu deutlich mehr Stilen und Gebäuden im Forum. Wir haben dergleichen noch nicht integriert, sowohl aus technischen als auch optischen Motiven:
- Der Speicherverbrauch wäre enorm hoch geworden, gerade im Hinblick auf unsere Spieler mit minimalen Systemvoraussetzungen hätten wir hier denen das Spiel verdorben.
- Gebäude haben immer spezielle Anforderungen, um in angrenzende Gebäude nahtlos überzugehen. Wir hätten also die gesamten vorhandenen Gebäude komplett neu aufsetzen müssen, um die Skalierung mit den Wand-an-Wand-Gebäuden durchführen zu können. Das war offensichtlich keine verfügbare Option für uns.
Zufälligerweise war eines der oft angefragten optischen Features die Option, eine Verordnung vergeben zu können, wie sich der Look eines Distrikts definiert.
Obwohl wir uns nicht wirklich wohl damit fühlten, diese Verordnung als Verordnung einzuführen - da Verordnungen nunmal eher etwas sein sollten, was das Gameplay deutlich verändert, und nicht nur optische Änderungen bringt - haben wir trotzdem eine Option eingeführt, die es ermöglicht, einen Stil für den Distrikt festzulegen, wählbar über das Distrikt Infofenster.
Wir fügten ein Standardset und ein Europäisches Gebäudeset ein, welche über ein Dropdown-Menü in den Distrikten wählbar sein werden.
[Blockierte Grafik: http://i.imgur.com/yFHlWqy.jpg]
Sobald ihr einen der Stile für den Distrikt festlegt, werden die Gebäude sich nach und nach ersetzen und an Level und Dichte der ausgewiesenen Zonen halten. Ihr könnt somit also auch Europäische Distrikte in euren Städten einrichten. Der folgende Screenshot zeigt Europäische Gebäude auf der alten Los Santos Karte, einer Karte im Tropischen Biom.
[Blockierte Grafik: http://i.imgur.com/H6UNbcu.jpg]
Das ist schon ziemlich cool, aber hier kommen die noch besseren News: Content Gestalter können jetzt auch ihre eigenen Stile im Steam Workshop erstellen! Im Content Manager wird es eine neue Kategorie geben, genannt Stile, hier könnt ihr eure Gebäude aus dem Steam Workshop einem Stil hinzufügen.
[Blockierte Grafik: http://i.imgur.com/otrq9jO.png]
[Blockierte Grafik: http://i.imgur.com/xcocjku.png]
Sofern ihr also Gebäude einplant, die alle Level und Dichten im Spiel abdecken, werdet ihr also einen komplett angepassten Look für einen Distrikt einrichten können!
Wir können es kaum erwarten, all diese neuen Kombinationen zu sehen, die ihr gestalten werdet!
Das wars für heute.
Danke, dass ihr eure Zeit damit verbracht habt, unseren Tagebucheintrag zu lesen. Ich gehe jetzt wieder weiter coden, denn es ist echt noch einiges an Arbeit zu erledigen. :9
Damsku
Technischer Leiter @ Colossal Order.
Original-Text [Quelle]
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.
[Blockierte Grafik: http://i.imgur.com/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.
[Blockierte Grafik: http://i.imgur.com/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.
[Blockierte Grafik: http://i.imgur.com/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.
[Blockierte Grafik: http://i.imgur.com/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.
[Blockierte Grafik: http://i.imgur.com/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.
[Blockierte Grafik: http://i.imgur.com/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.
[Blockierte Grafik: http://i.imgur.com/otrq9jO.png]
[Blockierte Grafik: http://i.imgur.com/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 [Blockierte Grafik: https://forum.paradoxplaza.com…default/xenforo/clear.png]
/damsku
Technical Director @ Colossal Order
[/quote]