Kartenvorlage | Map Template
Beschreibung
Die Mod "Kartenvorlage" kann euch dabei unterstützen, Luftbilder o. Ä. in eine Spielwelt zu übertragen. Sie ist Anfang 2020 durch die Vorschläge von /// M Power und wicked1133 entstanden. Anfangs war sie nur im Forum zu finden, jetzt auch hier bei den Downloads.
Bevor ihr Probleme mit dem richtigen Größenverhältnis bekommt:
Möchtet ihr selbst zugeschnittenes Karten-/Bildmaterial nutzen, müsst ihr das Material eventuell so skalieren, dass ein korrektes Verhältnis zur echten Welt entsteht. Zum Beispiel könnt ihr mithilfe von einigen Online-Kartendiensten Luftlinien abmessen und die Messergebnisse mit eurem Material abgleichen. Stellt auch gerne Fragen, falls ihr nicht weiterkommt.
Auch könnt ihr euch mit dieser Mod (Mainz und Wiesbaden mit Industrie 1:1) und der zugehörigen Anleitung auseinandersetzen, wo unter anderem auf die Verwendung von nicht vorbereitetem Material näher eingegangen wird.
The mod "Map Template" can help you to transfer aerial photos or similar into a game world. It was created in the beginning of 2020 by the suggestions of /// M Power and wicked1133. At the beginning it was only available in the forum, now also here at the downloads.
Before you get problems with the correct size ratio:
If you want to use self-tailored map/image material, you may need to scale the material so that it has a correct relationship to the real world. For example, you can use some online mapping services to measure air lines and match the measurements to your material. Feel free to ask questions if you get stuck.
You can also have a look at this mod (Mainz und Wiesbaden mit Industrie 1:1) and its manual, where among other things the use of unprepared material is discussed in more detail.
Neben meiner Mod können euch auch diese Mods anderer Modder beim Hinzufügen von Luftbildern usw. behilflich sein, ihr solltet euch die Mod mit den größten Vorteilen für euch aussuchen:
- https://steamcommunity.com/sharedfiles/filedetails/?id=1939067713 - Map overlay tool - Beta and a bit ;)
- Mainz und Wiesbaden mit Industrie 1:1
Bitte beachtet die folgenden Hinweise zu meiner Mod:
Diese Mod ist als Hilfe-Mod zu verstehen, die grob gesehen die Schnittstelle zwischen Transport Fever 2 und Bilddateien auf eurem Computer bildet. Das bedeutet, dass es unter Umständen trotzdem noch viel Aufwand für euch sein kann, Luftbilder tatsächlich ins Spiel zu bekommen. Es hängt von mehreren Faktoren ab:
- Wie genau soll das Ergebnis werden?
- Sollen die Luftbilder/Karten hoch aufgelöst sein?
- Sollen die Luftbilder über eine Karte gelegt werden, die auf realen Höhendaten (Heightmap) basiert?
- Reichen Screenshots von Online-Karten für euch aus?
Ihr müsst die Terrain-Texturen eigenhändig zusammenstellen und auftragen, Näheres dazu wird in den nachfolgenden Abschnitten erklärt. Jedenfalls sind sehr genaue Ergebnisse möglich. Um das zu erreichen, läuft es allerdings auf präzises Karten-/Bildmaterial hinaus. In Deutschland wird solches z.B. von mehreren (oder sogar allen) Bundesländern bereitgestellt. Für Transport Fever (1) hat snowball hier einen Weg beschrieben, um Luftbilder ins Spiel zu bringen. Dort sind auch weitere Informationen zu Luftbildern zu finden.
Kartenvorlagen erstellen
Grundsätze zu Terrain-Texturen
- eine Spielwelt benötigt mindestens vier Terrain-Texturen, weil sich in der Mitte immer die Ecken
befinden:
- eine Terrain-Textur muss immer die Abmessungen 4096x4096 Pixel besitzen
- wird in der Config-Datei einer Terrain-Textur für detailSize z.B. der Wert 1 / 2000 angegeben, dann wird die Textur auf ziemlich (oder ganz) genau 2000 m Durchmesser skaliert
Wie kann man starten?
Im einfachsten Fall stellt man insgesamt nur vier Terrain-Texturen zusammen, das ist die Mindestanzahl, um eine beliebig große Spielwelt mit unterschiedlichen Texturen komplett zu bedecken. So größer die Spielwelt allerdings, desto schlechter wird die Auflösung der vier Texturen am Ende, da die Skalierung mit zunehmender Spielweltgröße erhöht werden muss. Mit zunehmender Spielweltgröße sollte also auch in Betracht gezogen werden, die Anzahl der Terrain-Texturen zu erhöhen und die Skalierung damit gering zu halten. Die Weltgröße, Skalierung der Terrain-Texturen und die benötigte Anzahl an Terrain-Texturen sollte gut geplant werden, hierzu ein Beispiel:
- eine normal große quadratische Spielwelt (12x12 km) benötigt bei einer Textur-Skalierung auf 1000 m etwa 12x12, also 144 Terrain-Texturen (das ist mit viel Arbeit verbunden)
- besser ist es dann, eine Skalierung der Terrain-Texturen auf 3000 m zu wählen, so würden nur noch 4x4, also 16 Terrain-Texturen benötigt werden
Noch ein Tipp ist, bei mehr als vier benötigten Terrain-Texturen, beim Erstellen der Terrain-Texturen aus der Mitte der Spielwelt nach außen zu arbeiten.
Beispiele für verschieden große Skalierungen
Nachfolgend gibt es paar Beispiele verschiedener Skalierungen samt den Auswirkungen auf eine Spielwelt mit 12x12 km Größe (der rote Rahmen stellt jeweils die Grenze der Spielwelt dar).
Beispiel 1:
Skalierung der Terrain-Texturen: detailSize = 1 / 4000
Umgerechnete Breite einer Textur: 4000 m
Ein Pixel der Terrain-Textur entspricht im Spiel: 0,9766 m
Bewertung: simpel anzuwenden, wenn ein Einzelbild z.B. exakt 1 km² abbildet - 16 1-km²-Einzelbilder können jeweils zu einer 4x4-km-Terrain-Textur zusammengefügt werden
Anzahl benötigter Terrain-Texturen bei Spielwelt 12x12 km: 16 (4x4)
Beispiel 2:
Skalierung der Terrain-Texturen: detailSize = 1 / 4096
Umgerechnete Breite einer Textur: 4096 m
Ein Pixel der Terrain-Textur entspricht im Spiel: 1 m
Anzahl benötigter Terrain-Texturen bei Spielwelt 12x12 km: 16 (4x4)
Beispiel 3:
Skalierung der Terrain-Texturen: detailSize = 1 / 2048
Umgerechnete Breite einer Textur: 2048 m
Ein Pixel der Terrain-Textur entspricht im Spiel: 0,5 m
Anzahl benötigter Terrain-Texturen bei Spielwelt 12x12 km: 36 (6x6)
Beispiel 4:
Skalierung der Terrain-Texturen: detailSize = 1 / 3072
Umgerechnete Breite einer Textur: 3072 m
Ein Pixel der Terrain-Textur entspricht im Spiel: 0,75 m
Anzahl benötigter Terrain-Texturen bei Spielwelt 12x12 km: 16 (4x4)
Kurzanleitung zum Hinzufügen von Bild-/Kartenmaterial zur Modifikation
- eine einzelne Terrain-Textur benötigt immer eine Config-Datei (Pfad: relozu_terrain_material_map_template_1/res/config/terrain_material/shared)
- eine einzelne Terrain-Textur benötigt außerdem immer mehrere Texturdateien (Pfad: relozu_terrain_material_map_template_1/res/textures/terrain/relozu_terrain_material_template)
- die Config-Datei führt die Texturdateien zusammen
- für neue Karten-Terrain-Texturen werden immer jeweils eine neue Config-Datei und eine Texturdatei mit der Endung
_albedo benötigt, andere Texturdateien können wiederholt verwendet und daher ignoriert werden
- bei der Albedo-Textur sind die Farben so, wie sie im Spiel zu sehen sind - die Albedo-Textur wird fürs Karten-/Luftbild verwendet
- beim Erstellen in einem Editor wie GIMP muss die Textur vertikal gespiegelt und als dds mit der Kompression BC1/DXT1 und generierten Mipmaps exportiert werden
- ihr könnt die in der Mod enthaltene Textur als Basis nehmen (Datei kopieren, umbenennen, bearbeiten und exportieren)
- auch die Config-Datei könnt ihr immer wieder kopieren und müsst darin dann Folgendes ändern:
- name – der Anzeigename der Terrain-Textur
- detailColorTexture – der Name der Albedo-Textur
- detailSize - ggf. anpassen, detailSize wird in den vorherigen Abschnitten erklärt
- Benennungen können sich z.B. an einem 2D-Koordinatensystem orientieren:
- Terrain-Textur am weitesten südwestlich (links unten): meine_textur_0_0
- Terrain-Textur östlich davon (rechts daneben): meine_textur_1_0
- usw.
Übliche Fehler, die beim Verwenden der Kartenvorlagen-Mod auftreten können:
| Unknown exception - Size mismatch | Größe einer Textur ist nicht 4096 px x 4096 px oder Ebenengröße und Bildgröße einer Textur sind ungleich. |
| Unknown exception - Format mismatch | Falsches Kompressionsformat für eine Textur verwendet. |
| Unknown exception - Mipmap level count mismatch | Anzahl der erwarteten Mipmaps weicht ab, da die Größe einer Textur nicht 4096 px x 4096 px beträgt oder keine Mipmaps vorhanden sind. |
| Unknown exception - File not found | Der Dateiname einer Textur oder der Verweis auf eine Textur stimmt nicht. |
Nutzung im Spiel
Bitte beachtet, dass die Bodentexturen-Einstellung in den Grafik-Einstellungen auf "Sehr hoch" gesetzt sein muss, um die Qualität der Terrain-Texturen im Spiel unverfälscht sehen zu können.
Falls ihr die Kartenvorlagen-Terrain-Textur der Mod behaltet, könnt ihr am Anfang damit ein Gitter malen und nachher eure Terrain-Texturen in die entsprechenden Felder malen. Für ein größeres Mal-Tool kann z.B. eine von diesen Mods verwendet werden:
Ist ein Bereich später fertig bebaut, kann der Radiergummi verwendet werden, um die Terrain-Texturen in den Ursprungszustand zurückzuversetzen.
Performance-Probleme...?
Viele Terrain-Texturen konnten in früheren Spiel-Builds massive Performance-Probleme verursachen, spätestens ab dem Build 31994 sollten diese aber nicht mehr auftreten. Solltet ihr dennoch Probleme feststellen, lasst es mich gerne wissen. Was mittlerweile üblich ist, ist dass viele Terrain-Texturen zu einem Spielabsturz führen können, sollen also hochaufgelöste Karten-/Luftbilder im Spiel verwendet werden, müssen eventuell andere Terrain-Texturen oder komplette Mods deaktiviert werden. Auch denkbar ist ein begrenzter Einsatz einzelner Karten-Terrain-Texturen, die danach aus dem Mod-Ordner wieder entfernt und durch die nächsten ersetzt werden.
Bekannte Probleme
Unschöne Effekte auf Terrain mit stärkerer Steigung:
Weitere Informationen
Du hast bezüglich der Mod Fragen, Probleme oder dir ist ein (kleiner) Fehler aufgefallen? Schreibe mich dazu privat an oder nutze dazu dieses Thema.
Späte nachträgliche Änderungen der Mod-Beschreibung:
- Design-Anpassung gegen verrutschte Bilder
- Anpassung falscher Angaben in km²
- Hinweis für selbst zugeschnittenes Material und Tabelle für übliche Fehlermeldungen hinzugefügt
- Hinweis für die korrekte Texturen-Grafik-Einstellung hinzugefügt
Haftungsausschluss
Für durch meine Modifikation entstandene Schäden an Hardware und/oder Software hafte ich nicht.
Partially manually edited computer translation.
Besides my mod, these mods from other modders can also help you add aerial photos etc, you should choose the mod with the most advantages for you:
- https://steamcommunity.com/sharedfiles/filedetails/?id=1939067713 - Map overlay tool - Beta and a bit ;)
- Mainz
und Wiesbaden mit Industrie 1:1
Please see the following notes about my mod:
This mod is meant to be a help mod that roughly interfaces Transport Fever 2 with image files on your computer. This means that it may still be a lot of work for you to actually get aerial images into the game. It depends on several factors:
- How accurate do you want the result to be?
- Do you want the aerial images/maps to be high resolution?
- Should the aerial images be overlaid on a map based on real height data (heightmap)?
- Are screenshots of online maps sufficient for you?
You will have to compose and apply the terrain materials by yourself, more details will be explained in the following sections. Anyway, very accurate results are possible. To achieve this, however, it boils down to precise map/image material. In Germany, for example, such material is provided by several (or even all) federal states. For Transport Fever (1), snowball described a way to bring aerial imagery into the game here. There you can also find more information about aerial images.
Create map templates
Principles about terrain materials
- a game world needs at least four terrain materials because the corners are always in the middle:
- a terrain material must always have the dimensions 4096x4096 pixels
- if in the config file of a terrain material the value 1 / 2000 is specified for detailSize, for example, then the texture will be scaled to almost (or quite) exactly 2000 m diameter
How to start?
In the simplest case, you only create a total of four terrain materials, which is the minimum number needed to completely cover a game world of any size with different textures. However, the larger the game world, the worse the resolution of the four textures will be in the end, since the scaling has to be increased with increasing game world size. So as the game world size increases, you should also consider increasing the number of terrain materials and thus keep the scaling small. The world size, scaling of terrain materials and the required number of terrain materials should be well planned, here is an example:
- a normal sized square game world (12x12 km) needs about 12x12, so 144 terrain materials when scaling the textures to 1000 m (this is a lot of work)
- it is better to scale the terrain materials to 3000 m, so only 4x4, i.e. 16 terrain materials would be needed
Another tip is, if more than four terrain materials are needed, work from the center of the game world outwards when creating the terrain materials.
Examples of different scales
Below are a few examples of different scalings including the effects on a game world with 12x12 km size (the red frame represents the edges of the game world in each case).
Example 1:
Scaling of terrain materials: detailSize = 1 / 4000
Converted width of a texture: 4000 m
One pixel of the terrain material corresponds in the game: 0.9766 m
Rating: easy to use, if a single image represents e.g. exactly 1 km² - 16 1-km² single images can be combined to a 4x4-km terrain material each
Number of required terrain materials for game world 12x12 km: 16 (4x4)
Example 2:
Scaling of terrain materials: detailSize = 1 / 4096
Converted width of a texture: 4096 m
One pixel of the terrain material corresponds in the game to: 1 m
Number of required terrain materials for game world 12x12 km: 16 (4x4)
Example 3:
Scaling of terrain materials: detailSize = 1 / 2048
Converted width of a texture: 2048 m
One pixel of the terrain material corresponds in the game to: 0.5 m
Number of required terrain materials for game world 12x12 km: 36 (6x6)
Example 4:
Scaling of terrain materials: detailSize = 1 / 3072
Converted width of a texture: 3072 m
One pixel of the terrain material corresponds in the game to: 0.75 m
Number of required terrain materials for game world 12x12 km: 16 (4x4)
Quick guide to add image/map material for modification
- a single terrain material always needs a config file (path: relozu_terrain_material_map_template_1/res/config/terrain_material/shared)
- a single terrain material also always needs multiple texture files (path: relozu_terrain_material_map_template_1/res/textures/terrain/relozu_terrain_material_template)
- the config file merges the texture files
- for new map terrain materials always a new config file and a texture file with the extension _albedo are needed,
other texture files can be used repeatedly and therefore ignored
- with the albedo texture the colors are as they are seen in the game - the albedo texture is used for the map/aerial image
- when creating in an editor like GIMP, the texture must be mirrored vertically and exported as dds with compression BC1/DXT1 and generated mipmaps
- you can take the texture included in the mod as base (copy file, rename, edit and export)
- also you can copy the config file again and again and then you have to change the following in it:
- name - the display name of the terrain material
- detailColorTexture - the name of the albedo texture
- detailSize - adjust if necessary, detailSize is explained in the previous sections
- Names can be based e.g. on a 2D coordinate system:
- terrain material furthest southwest (lower left): my_texture_0_0
- terrain material east of it (to the right of it): my_texture_1_0
- etc.
Common errors that can occur when using the map template mod:
| Unknown exception - Size mismatch | Size of a texture is not 4096 px x 4096 px or layer size and image size of a texture are not equal. |
| Unknown exception - Format mismatch | Wrong compression format used for a texture. |
| Unknown exception - Mipmap level count mismatch | Number of expected mipmaps is different because the size of a texture is not 4096 px x 4096 px or there are no mipmaps. |
| Unknown exception - File not found | The file name of a texture or the reference to a texture is not correct. |
Usage in the game
Please note that the terrain textures setting in the graphics settings must be set to "Very High" in order to see the quality of the terrain materials in the game unaltered.
If you keep the mod's map template terrain material, you can use it to paint a grid at the beginning, and then paint your customized terrain materials in the appropriate fields later. For a larger painting tool, you can use one of these mods, for example:
If an area is later finished, the eraser can be used to return the terrain materials to their original state.
Performance problems...?
Many terrain materials could cause massive performance problems in previous game builds, but at the latest as of build 31994 these should no longer occur. If you still experience problems, please let me know. What is common by now is that many terrain materials can lead to a game crash, so if you want to use high resolution map/air images in the game, you might have to disable other terrain materials or complete mods. Also conceivable is a limited use of individual map terrain materials, which are then removed again from the mod folder and replaced by the next ones.
Known problems
Unattractive effects on terrain with steeper gradients:
More information
You have questions about the mod, problems or you noticed a (small) mistake? Write me privately or use this topic.
Late subsequent changes to the mod description:
- design adjustment against slipped images
- adjustment of wrong data in km²
- added note for self-tailored material and common error messages
- added hint for correct textures graphics setting
Disclaimer
I am not liable for any damage to hardware and/or software caused by my modification.
Kommentare 2
Neu erstellte Kommentare unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.
Neu erstellte Kommentare unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.
Vetkoplayzz
DANKE


SM1ausHOT
Besten Dank für die Arbeit.