maps4fs 1.0.4__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {maps4fs-1.0.4 → maps4fs-1.0.7}/PKG-INFO +47 -45
- {maps4fs-1.0.4 → maps4fs-1.0.7}/README.md +46 -44
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/background.py +88 -16
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/dem.py +3 -19
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/game.py +1 -1
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/path_steps.py +16 -2
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/tile.py +0 -4
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs.egg-info/PKG-INFO +47 -45
- {maps4fs-1.0.4 → maps4fs-1.0.7}/pyproject.toml +1 -1
- {maps4fs-1.0.4 → maps4fs-1.0.7}/LICENSE.md +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/__init__.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/__init__.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/component.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/config.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/grle.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/i3d.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/map.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/qgis.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/generator/texture.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/logger.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/toolbox/__init__.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/toolbox/background.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs/toolbox/dem.py +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs.egg-info/SOURCES.txt +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs.egg-info/dependency_links.txt +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs.egg-info/requires.txt +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/maps4fs.egg-info/top_level.txt +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/setup.cfg +0 -0
- {maps4fs-1.0.4 → maps4fs-1.0.7}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: maps4fs
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.7
|
4
4
|
Summary: Generate map templates for Farming Simulator from real places.
|
5
5
|
Author-email: iwatkot <iwatkot@gmail.com>
|
6
6
|
License: MIT License
|
@@ -31,7 +31,7 @@ Requires-Dist: pympler
|
|
31
31
|
<p align="center">
|
32
32
|
<a href="#Quick-Start">Quick Start</a> •
|
33
33
|
<a href="#Overview">Overview</a> •
|
34
|
-
<a href="
|
34
|
+
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
35
35
|
<a href="#How-To-Run">How-To-Run</a><br>
|
36
36
|
<a href="docs/FAQ.md">FAQ</a> •
|
37
37
|
<a href="docs/map_structure.md">Map Structure</a> •
|
@@ -69,12 +69,12 @@ Requires-Dist: pympler
|
|
69
69
|
🚜 Supports Farming Simulator 22 and 25<br>
|
70
70
|
🔷 Generates *.obj files for background terrain based on the real-world height map<br>
|
71
71
|
📄 Generates scripts to download high-resolution satellite images from [QGIS](https://qgis.org/download/) in one click<br>
|
72
|
-
🧰 Modder Toolbox to help you with various
|
72
|
+
🧰 Modder Toolbox to help you with various tasks 🆕<br>
|
73
73
|
🌾 Automatically generates fields 🆕<br>
|
74
74
|
|
75
75
|
<p align="center">
|
76
76
|
<img src="https://github.com/user-attachments/assets/cf8f5752-9c69-4018-bead-290f59ba6976"><br>
|
77
|
-
🌎 Detailed terrain based on real
|
77
|
+
🌎 Detailed terrain based on real-world data.<br><br>
|
78
78
|
<img src="https://github.com/user-attachments/assets/7f238ab4-9ff4-4c6e-ba07-5796be012baa"><br>
|
79
79
|
🛰️ Realistic background terrain objects with satellite images.<br><br>
|
80
80
|
<img src="https://github.com/user-attachments/assets/80e5923c-22c7-4dc0-8906-680902511f3a"><br>
|
@@ -85,14 +85,18 @@ Requires-Dist: pympler
|
|
85
85
|
📏 Almost any possible map sizes.
|
86
86
|
</p>
|
87
87
|
|
88
|
+
📹 A complete step-by-step video tutorial is here!
|
89
|
+
<a href="https://www.youtube.com/watch?v=Nl_aqXJ5nAk" target="_blank"><img src="https://github.com/user-attachments/assets/4845e030-0e73-47ab-a5a3-430308913060"/></a>
|
90
|
+
<i>How to Generate a Map for Farming Simulator 25 and 22 from a real place using maps4FS</i>
|
91
|
+
|
88
92
|
## Quick Start
|
89
93
|
There are several ways to use the tool. You obviously need the **first one**, but you can choose any of the others depending on your needs.<br>
|
90
94
|
### 🚜 For most users
|
91
|
-
**Option 1:**
|
95
|
+
**Option 1:** Open the [maps4fs](https://maps4fs.streamlit.app) on StreamLit and generate a map template in a few clicks.<br>
|
92
96
|
<i>Note, that StreamLit community hosting has some limitations, such as: <br>
|
93
97
|
1. Maximum map size is 4096x4096 meters. <br>
|
94
98
|
2. Advanced settings are disabled. <br>
|
95
|
-
3.
|
99
|
+
3. Texture dissolving is disabled (they will look worse). </i><br>
|
96
100
|
|
97
101
|
If you run the application locally, you won't have any of these limitations and will be able to generate maps of any size with any settings you want and nice looking textures.<br>
|
98
102
|
So, jump to [Docker version](#option-2-docker-version) to launch the tool with one command and get the full experience.<br>
|
@@ -100,7 +104,7 @@ So, jump to [Docker version](#option-2-docker-version) to launch the tool with o
|
|
100
104
|

|
101
105
|
|
102
106
|
### 😎 For advanced users
|
103
|
-
**Option 2:**
|
107
|
+
**Option 2:** Run the Docker version in your browser. Launch the following command in your terminal:
|
104
108
|
```bash
|
105
109
|
docker run -d -p 8501:8501 iwatkot/maps4fs
|
106
110
|
```
|
@@ -126,7 +130,7 @@ So, if you're new to map making, here's a quick overview of the process:
|
|
126
130
|
|
127
131
|
### Previews
|
128
132
|
|
129
|
-
The generator also creates
|
133
|
+
The generator also creates multiple previews of the map. Here's the list of them:
|
130
134
|
1. General preview - merging all the layers into one image with different colors.
|
131
135
|
2. Grayscale DEM preview - a grayscale image of the height map (as it is).
|
132
136
|
3. Colored DEM preview - a colored image of the height map (from blue to red). The blue color represents the lowest point, and the red color represents the highest point.
|
@@ -143,10 +147,6 @@ Don't know where to start? Don't worry, just follow this [step-by-step guide](do
|
|
143
147
|
|
144
148
|
## How-To-Run
|
145
149
|
|
146
|
-
You'll find detailed instructions on how to run the project below. But if you prefer video tutorials, here's one for you:
|
147
|
-
<a href="https://www.youtube.com/watch?v=ujwWKHVKsw8" target="_blank"><img src="https://github.com/user-attachments/assets/6dbbbc71-d04f-40b2-9fba-81e5e4857407"/></a>
|
148
|
-
<i>Video tutorial: How to generate a Farming Simulator 22 map from real-world data.</i>
|
149
|
-
|
150
150
|
### Option 1: StreamLit
|
151
151
|
🟢 Recommended for all users.
|
152
152
|
🛠️ Don't need to install anything.
|
@@ -159,7 +159,7 @@ Note: due to CPU and RAM limitations of the hosting, the generation may take som
|
|
159
159
|
Using it is easy and doesn't require any guides. Enjoy!
|
160
160
|
|
161
161
|
### Option 2: Docker version
|
162
|
-
🟠 Recommended for users who want bigger maps, fast generation, nice
|
162
|
+
🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
|
163
163
|
🛠️ Launch with one single command.
|
164
164
|
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
165
165
|
⚙️ Advanced settings: enabled.
|
@@ -192,7 +192,7 @@ import maps4fs as mfs
|
|
192
192
|
|
193
193
|
game = mfs.Game.from_code("FS25")
|
194
194
|
```
|
195
|
-
In this case the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
|
195
|
+
In this case, the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
|
196
196
|
Structure example:<br>
|
197
197
|
|
198
198
|
```text
|
@@ -230,12 +230,12 @@ The tool now has a Modder Toolbox, which is a set of tools to help you with vari
|
|
230
230
|
|
231
231
|

|
232
232
|
|
233
|
-
### Tool
|
233
|
+
### Tool Categories
|
234
234
|
Tools are divided into categories, which are listed below.
|
235
|
-
#### Textures and DEM
|
236
|
-
- **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create
|
235
|
+
#### For Textures and DEM
|
236
|
+
- **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create a height map using it.
|
237
237
|
|
238
|
-
#### Background terrain
|
238
|
+
#### For Background terrain
|
239
239
|
- **Convert image to obj model** - allows you to convert the image to the obj model. You can use this tool to create the background terrain for your map. It can be extremely useful if you have access to the sources of high-resolution DEM data and want to create the background terrain using it.
|
240
240
|
|
241
241
|
## Supported objects
|
@@ -254,13 +254,13 @@ The project is based on the [OpenStreetMap](https://www.openstreetmap.org/) data
|
|
254
254
|
The list will be updated as the project develops.
|
255
255
|
|
256
256
|
## Generation info
|
257
|
-
The script will generate the `generation_info.json` file in the `output` folder. It
|
257
|
+
The script will generate the `generation_info.json` file in the `output` folder. It is split into different sections, which represent the components of the map generator. You may need this information to use some other tools and services to obtain additional data for your map.<br>
|
258
258
|
|
259
259
|
List of components:
|
260
260
|
- `Config` - this component handles the `map.xml` file, where the basic description of the map is stored.
|
261
261
|
- `Texture` - this component describes the textures, that were used to generate the map.
|
262
262
|
- `DEM` - this component describes the Digital Elevation Model (the one which creates terrain on your map), which was used to generate the height map and related to the `dem.png` file.
|
263
|
-
- `I3d` - this component describes the i3d file, where some specific attributes properties and
|
263
|
+
- `I3d` - this component describes the i3d file, where some specific attributes properties, and paths to the files are stored.
|
264
264
|
- `Background` - this component describes the 8 tiles, that surround the map.
|
265
265
|
|
266
266
|
Below you'll find descriptions of the components and the fields that they contain.<br>
|
@@ -281,9 +281,9 @@ Example of the `Config` component:
|
|
281
281
|
}
|
282
282
|
},
|
283
283
|
```
|
284
|
-
The `Overview` section contains information to create an overview image, which represents the in-game map. You can use the `epsg3857_string` to obtain the satellite images in the QGIS. So this section describes the region of the map plus the borders. Usually, it's
|
284
|
+
The `Overview` section contains information to create an overview image, which represents the in-game map. You can use the `epsg3857_string` to obtain the satellite images in the QGIS. So this section describes the region of the map plus the borders. Usually, it's exactly 2X the size of the map.<br>
|
285
285
|
And here's the list of the fields:
|
286
|
-
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it
|
286
|
+
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it is required to obtain the satellite images in the QGIS,<br>
|
287
287
|
- `"south"` - the southern border of overview region,<br>
|
288
288
|
- `"west"` - the western border of overview region,<br>
|
289
289
|
- `"north"` - the northern border of overview region,<br>
|
@@ -328,7 +328,7 @@ And here's the list of the fields:
|
|
328
328
|
|
329
329
|
### Background
|
330
330
|
|
331
|
-
The background component
|
331
|
+
The background component consists of the 8 tiles, each one representing the tile, that surrounds the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on.<br>
|
332
332
|
Example of the `Background` component:
|
333
333
|
|
334
334
|
```json
|
@@ -350,7 +350,7 @@ Example of the `Background` component:
|
|
350
350
|
And here's the list of the fields:
|
351
351
|
- `"center_latitude"` - the latitude of the center of the tile,<br>
|
352
352
|
- `"center_longitude"` - the longitude of the center of the tile,<br>
|
353
|
-
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it
|
353
|
+
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it is required to obtain the satellite images in the QGIS,<br>
|
354
354
|
- `"height"` - the height of the tile in meters,<br>
|
355
355
|
- `"width"` - the width of the tile in meters,<br>
|
356
356
|
- `"north"` - the northern border of the tile,<br>
|
@@ -359,7 +359,7 @@ And here's the list of the fields:
|
|
359
359
|
- `"west"` - the western border of the tile,<br>
|
360
360
|
|
361
361
|
## Texture schema
|
362
|
-
maps4fs uses a simple JSON file to define the texture schema. For each
|
362
|
+
maps4fs uses a simple JSON file to define the texture schema. For each ofthe supported games, this file has unique entries, but the structure is the same. Here's an example of the schema for Farming Simulator 25:
|
363
363
|
|
364
364
|
```json
|
365
365
|
[
|
@@ -395,39 +395,39 @@ maps4fs uses a simple JSON file to define the texture schema. For each of suppor
|
|
395
395
|
Let's have a closer look at the fields:
|
396
396
|
- `name` - the name of the texture. Just the way the file will be named.
|
397
397
|
- `count` - the number of textures of this type. For example, for the **dirtMedium** texture there will be two textures: **dirtMedium01_weight.png** and **dirtMedium02_weight.png**.
|
398
|
-
ℹ️ There's one texture that
|
398
|
+
ℹ️ There's one texture that has count `0`, it's the waterPuddle texture from FS22, which is not present in FS25.
|
399
399
|
- `tags` - the tags from the OpenStreetMap data. Refer to the section [Supported objects](#supported-objects) to see the list of supported tags. If there are no tags, the texture file will be generated empty and no objects will be placed on it.
|
400
400
|
- `width` - the width of the texture in meters. Some of the objects from OSM (roads, for example) are lines, not areas. So, to draw them correctly, the tool needs to know the width of the line.
|
401
|
-
- `color` - the color of the texture. It's used only in the preview images and
|
401
|
+
- `color` - the color of the texture. It's used only in the preview images and has no effect on the map itself. But remember that previews are crucial for the map-making process, so it's better to set the color to something that represents the texture.
|
402
402
|
- `priority` - the priority of the texture for overlapping. Textures with higher priorities will be drawn over the textures with lower priorities.
|
403
403
|
ℹ️ The texture with 0 priority considers the base layer, which means that all empty areas will be filled with this texture.
|
404
|
-
- `exclude_weight` - this only used for the forestRockRoots texture from FS25. It
|
404
|
+
- `exclude_weight` - this is only used for the forestRockRoots texture from FS25. It just means that this texture has no `weight` postfix, that's all.
|
405
405
|
|
406
406
|
## Background terrain
|
407
|
-
The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it
|
408
|
-
So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj
|
409
|
-
If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a
|
407
|
+
The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane that can (and should) be textured to look fine.<br>
|
408
|
+
So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj`, and so on.<br>
|
409
|
+
If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a convenient approach to work with one file, one texture, and then just cut the map from it.<br>
|
410
410
|
|
411
411
|

|
412
412
|
|
413
|
-
➡️ *No matter which approach you choose, you still need to adjust the background terrain to connect it to the map without any gaps. But with a
|
413
|
+
➡️ *No matter which approach you choose, you still need to adjust the background terrain to connect it to the map without any gaps. But with a single file, it's much easier to do.*
|
414
414
|
|
415
|
-
If you're willing to create a background terrain, you will need
|
415
|
+
If you're willing to create a background terrain, you will need Blender, the Blender Exporter Plugins, and the QGIS. You'll find the download links in the [Resources](#resources) section.<br>
|
416
416
|
|
417
|
-
If you're afraid of this task, please don't be. It's really simple and I've
|
417
|
+
If you're afraid of this task, please don't be. It's really simple and I've prepared detailed step-by-step instructions for you, you'll find them in the separate README files. Here are the steps you need to follow:
|
418
418
|
|
419
419
|
1. [Download high-resolution satellite images](docs/download_satellite_images.md).
|
420
420
|
2. [Prepare the i3d files](docs/create_background_terrain.md).
|
421
421
|
3. [Import the i3d files to Giants Editor](docs/import_to_giants_editor.md).
|
422
422
|
|
423
423
|
## Overview image
|
424
|
-
The overview image is an image that is used as in-game map. No matter what the size of the map, this file is always `4096x4096 pixels`, while the region of your map is `2048x2048 pixels` in center of this file. The rest of the image is just here for nice view, but you still may add satellite pictures to this region.<br>
|
424
|
+
The overview image is an image that is used as an in-game map. No matter what the size of the map, this file is always `4096x4096 pixels`, while the region of your map is `2048x2048 pixels` in the center of this file. The rest of the image is just here for a nice view, but you still may add satellite pictures to this region.<br>
|
425
425
|
|
426
426
|
<img width="400" src="https://github.com/user-attachments/assets/ede9ea81-ef97-4914-9dbf-9761ef1eb7ca">
|
427
427
|
|
428
428
|
Cool image by [@ZenJakey](https://github.com/ZenJakey).
|
429
429
|
|
430
|
-
So, the same way you've downloaded the satellite images for the background terrain, you can download them for the overview image. Just use the `epsg3857_string` from the `generation_info.json` file. You'll find the needed string in the `Config` component in the `Overview` section:
|
430
|
+
So, in the same way, you've downloaded the satellite images for the background terrain, you can download them for the overview image. Just use the `epsg3857_string` from the `generation_info.json` file. You'll find the needed string in the `Config` component in the `Overview` section:
|
431
431
|
|
432
432
|
```json
|
433
433
|
"Config": {
|
@@ -437,20 +437,20 @@ So, the same way you've downloaded the satellite images for the background terra
|
|
437
437
|
},
|
438
438
|
```
|
439
439
|
|
440
|
-
After
|
440
|
+
After that, you need to resize the image to 4096x4096 pixels and convert it to the `.dds` format.
|
441
441
|
|
442
442
|
## DDS conversion
|
443
|
-
The `.dds` format is the format used in the Farming Simulator for the textures, icons, overview and preview images. There
|
443
|
+
The `.dds` format is the format used in the Farming Simulator for the textures, icons, overview, and preview images. There a plenty of options to convert the images to the `.dds` format, you can just google something like `png to dds`, and the first link probably will help you with it.<br>
|
444
444
|
|
445
445
|
List of the important DDS files:
|
446
446
|
- `icon.dds` - 256x256 pixels, the icon of the map,
|
447
|
-
- `preview.dds` - 2048x2048 pixels, the preview image of the map on loading screen,
|
447
|
+
- `preview.dds` - 2048x2048 pixels, the preview image of the map on the loading screen,
|
448
448
|
- `mapsUS/overview.dds` - 4096x4096 pixels, the overview image of the map (in-game map)
|
449
449
|
|
450
450
|
## For advanced users
|
451
451
|
The tool supports the custom size of the map. To use this feature select `Custom` in the `Map size` dropdown and enter the desired size. The tool will generate a map with the size you entered.<br>
|
452
452
|
|
453
|
-
⛔️ Do not use this feature, if you don't know what you're doing. In most cases the Giants Editor will just crash on opening the file, because you need to enter
|
453
|
+
⛔️ Do not use this feature, if you don't know what you're doing. In most cases, the Giants Editor will just crash on opening the file, because you need to enter specific values for the map size.<br><br>
|
454
454
|
|
455
455
|

|
456
456
|
|
@@ -458,14 +458,16 @@ You can also apply some advanced settings to the map generation process. Note th
|
|
458
458
|
|
459
459
|
Here's the list of the advanced settings:
|
460
460
|
|
461
|
-
- DEM multiplier: the height of the map is multiplied by this value. So the DEM map is just a 16-bit grayscale image, which means that the maximum
|
461
|
+
- DEM multiplier: the height of the map is multiplied by this value. So the DEM map is just a 16-bit grayscale image, which means that the maximum available value there is 65535, while the actual difference between the deepest and the highest point on Earth is about 20 km. Just note that this setting mostly does not matter, because you can always adjust it in the Giants Editor, learn more about the DEM file and the heightScale parameter in [docs](docs/dem.md). By default, it's set to 1.
|
462
|
+
|
463
|
+
- DEM Blur radius: the radius of the Gaussian blur filter applied to the DEM map. By default, it's set to 21. This filter just makes the DEM map smoother, so the height transitions will be more natural. You can set it to 1 to disable the filter, but it will result in a Minecraft-like map.
|
462
464
|
|
463
|
-
- DEM
|
465
|
+
- DEM Plateau height: this value will be added to each pixel of the DEM image, making it "higher". It's useful when you want to add some negative heights on the map, that appear to be in a "low" place. By default, it's set to 0.
|
464
466
|
|
465
|
-
-
|
467
|
+
- Background Terrain Generate only full tiles: if checked (by default) the small tiles (N, NE, E, and so on) will not be generated, only the full tile will be created. It's useful when you don't want to work with separate tiles, but with one big file. Since the new method of cutting the map from the background terrain added to the documentation, and now it's possible to perfectly align the map with the background terrain, this option will remain just as a legacy one.
|
466
468
|
|
467
469
|
## Resources
|
468
|
-
In this section you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
|
470
|
+
In this section, you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
|
469
471
|
To create a basic map, you only need the Giants Editor. But if you want to create a background terrain - the world around the map, so it won't look like it's floating in the void - you also need Blender and the Blender Exporter Plugins. To create realistic textures for the background terrain, the QGIS is required to obtain high-resolution satellite images.<br>
|
470
472
|
|
471
473
|
1. [Giants Editor](https://gdn.giants-software.com/downloads.php) - the official tool for creating maps for the Farming Simulator.
|
@@ -473,7 +475,7 @@ To create a basic map, you only need the Giants Editor. But if you want to creat
|
|
473
475
|
3. [Blender Exporter Plugins](https://gdn.giants-software.com/downloads.php) - the official plugins for exporting models from Blender to i3d format (the format used in the Farming Simulator).
|
474
476
|
4. [QGIS](https://qgis.org/download/) - the open-source GIS software that you can use to obtain high-resolution satellite images for your map.
|
475
477
|
5. [CompressPngCom](https://www.compresspng.com/) - the online tool to compress the PNG images. May be useful to reduce the size of the satellite images.
|
476
|
-
6. [AnyConv](https://anyconv.com/png-to-dds-converter/) - the online tool to convert the PNG images to the DDS format. You'll need this format for the textures, icons, overview and preview images.
|
478
|
+
6. [AnyConv](https://anyconv.com/png-to-dds-converter/) - the online tool to convert the PNG images to the DDS format. You'll need this format for the textures, icons, overview, and preview images.
|
477
479
|
|
478
480
|
## Bugs and feature requests
|
479
481
|
➡️ Please, before creating an issue or asking some questions, check the [FAQ](docs/FAQ.md) section.<br>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<p align="center">
|
7
7
|
<a href="#Quick-Start">Quick Start</a> •
|
8
8
|
<a href="#Overview">Overview</a> •
|
9
|
-
<a href="
|
9
|
+
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
10
10
|
<a href="#How-To-Run">How-To-Run</a><br>
|
11
11
|
<a href="docs/FAQ.md">FAQ</a> •
|
12
12
|
<a href="docs/map_structure.md">Map Structure</a> •
|
@@ -44,12 +44,12 @@
|
|
44
44
|
🚜 Supports Farming Simulator 22 and 25<br>
|
45
45
|
🔷 Generates *.obj files for background terrain based on the real-world height map<br>
|
46
46
|
📄 Generates scripts to download high-resolution satellite images from [QGIS](https://qgis.org/download/) in one click<br>
|
47
|
-
🧰 Modder Toolbox to help you with various
|
47
|
+
🧰 Modder Toolbox to help you with various tasks 🆕<br>
|
48
48
|
🌾 Automatically generates fields 🆕<br>
|
49
49
|
|
50
50
|
<p align="center">
|
51
51
|
<img src="https://github.com/user-attachments/assets/cf8f5752-9c69-4018-bead-290f59ba6976"><br>
|
52
|
-
🌎 Detailed terrain based on real
|
52
|
+
🌎 Detailed terrain based on real-world data.<br><br>
|
53
53
|
<img src="https://github.com/user-attachments/assets/7f238ab4-9ff4-4c6e-ba07-5796be012baa"><br>
|
54
54
|
🛰️ Realistic background terrain objects with satellite images.<br><br>
|
55
55
|
<img src="https://github.com/user-attachments/assets/80e5923c-22c7-4dc0-8906-680902511f3a"><br>
|
@@ -60,14 +60,18 @@
|
|
60
60
|
📏 Almost any possible map sizes.
|
61
61
|
</p>
|
62
62
|
|
63
|
+
📹 A complete step-by-step video tutorial is here!
|
64
|
+
<a href="https://www.youtube.com/watch?v=Nl_aqXJ5nAk" target="_blank"><img src="https://github.com/user-attachments/assets/4845e030-0e73-47ab-a5a3-430308913060"/></a>
|
65
|
+
<i>How to Generate a Map for Farming Simulator 25 and 22 from a real place using maps4FS</i>
|
66
|
+
|
63
67
|
## Quick Start
|
64
68
|
There are several ways to use the tool. You obviously need the **first one**, but you can choose any of the others depending on your needs.<br>
|
65
69
|
### 🚜 For most users
|
66
|
-
**Option 1:**
|
70
|
+
**Option 1:** Open the [maps4fs](https://maps4fs.streamlit.app) on StreamLit and generate a map template in a few clicks.<br>
|
67
71
|
<i>Note, that StreamLit community hosting has some limitations, such as: <br>
|
68
72
|
1. Maximum map size is 4096x4096 meters. <br>
|
69
73
|
2. Advanced settings are disabled. <br>
|
70
|
-
3.
|
74
|
+
3. Texture dissolving is disabled (they will look worse). </i><br>
|
71
75
|
|
72
76
|
If you run the application locally, you won't have any of these limitations and will be able to generate maps of any size with any settings you want and nice looking textures.<br>
|
73
77
|
So, jump to [Docker version](#option-2-docker-version) to launch the tool with one command and get the full experience.<br>
|
@@ -75,7 +79,7 @@ So, jump to [Docker version](#option-2-docker-version) to launch the tool with o
|
|
75
79
|

|
76
80
|
|
77
81
|
### 😎 For advanced users
|
78
|
-
**Option 2:**
|
82
|
+
**Option 2:** Run the Docker version in your browser. Launch the following command in your terminal:
|
79
83
|
```bash
|
80
84
|
docker run -d -p 8501:8501 iwatkot/maps4fs
|
81
85
|
```
|
@@ -101,7 +105,7 @@ So, if you're new to map making, here's a quick overview of the process:
|
|
101
105
|
|
102
106
|
### Previews
|
103
107
|
|
104
|
-
The generator also creates
|
108
|
+
The generator also creates multiple previews of the map. Here's the list of them:
|
105
109
|
1. General preview - merging all the layers into one image with different colors.
|
106
110
|
2. Grayscale DEM preview - a grayscale image of the height map (as it is).
|
107
111
|
3. Colored DEM preview - a colored image of the height map (from blue to red). The blue color represents the lowest point, and the red color represents the highest point.
|
@@ -118,10 +122,6 @@ Don't know where to start? Don't worry, just follow this [step-by-step guide](do
|
|
118
122
|
|
119
123
|
## How-To-Run
|
120
124
|
|
121
|
-
You'll find detailed instructions on how to run the project below. But if you prefer video tutorials, here's one for you:
|
122
|
-
<a href="https://www.youtube.com/watch?v=ujwWKHVKsw8" target="_blank"><img src="https://github.com/user-attachments/assets/6dbbbc71-d04f-40b2-9fba-81e5e4857407"/></a>
|
123
|
-
<i>Video tutorial: How to generate a Farming Simulator 22 map from real-world data.</i>
|
124
|
-
|
125
125
|
### Option 1: StreamLit
|
126
126
|
🟢 Recommended for all users.
|
127
127
|
🛠️ Don't need to install anything.
|
@@ -134,7 +134,7 @@ Note: due to CPU and RAM limitations of the hosting, the generation may take som
|
|
134
134
|
Using it is easy and doesn't require any guides. Enjoy!
|
135
135
|
|
136
136
|
### Option 2: Docker version
|
137
|
-
🟠 Recommended for users who want bigger maps, fast generation, nice
|
137
|
+
🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
|
138
138
|
🛠️ Launch with one single command.
|
139
139
|
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
140
140
|
⚙️ Advanced settings: enabled.
|
@@ -167,7 +167,7 @@ import maps4fs as mfs
|
|
167
167
|
|
168
168
|
game = mfs.Game.from_code("FS25")
|
169
169
|
```
|
170
|
-
In this case the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
|
170
|
+
In this case, the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
|
171
171
|
Structure example:<br>
|
172
172
|
|
173
173
|
```text
|
@@ -205,12 +205,12 @@ The tool now has a Modder Toolbox, which is a set of tools to help you with vari
|
|
205
205
|
|
206
206
|

|
207
207
|
|
208
|
-
### Tool
|
208
|
+
### Tool Categories
|
209
209
|
Tools are divided into categories, which are listed below.
|
210
|
-
#### Textures and DEM
|
211
|
-
- **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create
|
210
|
+
#### For Textures and DEM
|
211
|
+
- **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create a height map using it.
|
212
212
|
|
213
|
-
#### Background terrain
|
213
|
+
#### For Background terrain
|
214
214
|
- **Convert image to obj model** - allows you to convert the image to the obj model. You can use this tool to create the background terrain for your map. It can be extremely useful if you have access to the sources of high-resolution DEM data and want to create the background terrain using it.
|
215
215
|
|
216
216
|
## Supported objects
|
@@ -229,13 +229,13 @@ The project is based on the [OpenStreetMap](https://www.openstreetmap.org/) data
|
|
229
229
|
The list will be updated as the project develops.
|
230
230
|
|
231
231
|
## Generation info
|
232
|
-
The script will generate the `generation_info.json` file in the `output` folder. It
|
232
|
+
The script will generate the `generation_info.json` file in the `output` folder. It is split into different sections, which represent the components of the map generator. You may need this information to use some other tools and services to obtain additional data for your map.<br>
|
233
233
|
|
234
234
|
List of components:
|
235
235
|
- `Config` - this component handles the `map.xml` file, where the basic description of the map is stored.
|
236
236
|
- `Texture` - this component describes the textures, that were used to generate the map.
|
237
237
|
- `DEM` - this component describes the Digital Elevation Model (the one which creates terrain on your map), which was used to generate the height map and related to the `dem.png` file.
|
238
|
-
- `I3d` - this component describes the i3d file, where some specific attributes properties and
|
238
|
+
- `I3d` - this component describes the i3d file, where some specific attributes properties, and paths to the files are stored.
|
239
239
|
- `Background` - this component describes the 8 tiles, that surround the map.
|
240
240
|
|
241
241
|
Below you'll find descriptions of the components and the fields that they contain.<br>
|
@@ -256,9 +256,9 @@ Example of the `Config` component:
|
|
256
256
|
}
|
257
257
|
},
|
258
258
|
```
|
259
|
-
The `Overview` section contains information to create an overview image, which represents the in-game map. You can use the `epsg3857_string` to obtain the satellite images in the QGIS. So this section describes the region of the map plus the borders. Usually, it's
|
259
|
+
The `Overview` section contains information to create an overview image, which represents the in-game map. You can use the `epsg3857_string` to obtain the satellite images in the QGIS. So this section describes the region of the map plus the borders. Usually, it's exactly 2X the size of the map.<br>
|
260
260
|
And here's the list of the fields:
|
261
|
-
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it
|
261
|
+
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it is required to obtain the satellite images in the QGIS,<br>
|
262
262
|
- `"south"` - the southern border of overview region,<br>
|
263
263
|
- `"west"` - the western border of overview region,<br>
|
264
264
|
- `"north"` - the northern border of overview region,<br>
|
@@ -303,7 +303,7 @@ And here's the list of the fields:
|
|
303
303
|
|
304
304
|
### Background
|
305
305
|
|
306
|
-
The background component
|
306
|
+
The background component consists of the 8 tiles, each one representing the tile, that surrounds the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on.<br>
|
307
307
|
Example of the `Background` component:
|
308
308
|
|
309
309
|
```json
|
@@ -325,7 +325,7 @@ Example of the `Background` component:
|
|
325
325
|
And here's the list of the fields:
|
326
326
|
- `"center_latitude"` - the latitude of the center of the tile,<br>
|
327
327
|
- `"center_longitude"` - the longitude of the center of the tile,<br>
|
328
|
-
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it
|
328
|
+
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it is required to obtain the satellite images in the QGIS,<br>
|
329
329
|
- `"height"` - the height of the tile in meters,<br>
|
330
330
|
- `"width"` - the width of the tile in meters,<br>
|
331
331
|
- `"north"` - the northern border of the tile,<br>
|
@@ -334,7 +334,7 @@ And here's the list of the fields:
|
|
334
334
|
- `"west"` - the western border of the tile,<br>
|
335
335
|
|
336
336
|
## Texture schema
|
337
|
-
maps4fs uses a simple JSON file to define the texture schema. For each
|
337
|
+
maps4fs uses a simple JSON file to define the texture schema. For each ofthe supported games, this file has unique entries, but the structure is the same. Here's an example of the schema for Farming Simulator 25:
|
338
338
|
|
339
339
|
```json
|
340
340
|
[
|
@@ -370,39 +370,39 @@ maps4fs uses a simple JSON file to define the texture schema. For each of suppor
|
|
370
370
|
Let's have a closer look at the fields:
|
371
371
|
- `name` - the name of the texture. Just the way the file will be named.
|
372
372
|
- `count` - the number of textures of this type. For example, for the **dirtMedium** texture there will be two textures: **dirtMedium01_weight.png** and **dirtMedium02_weight.png**.
|
373
|
-
ℹ️ There's one texture that
|
373
|
+
ℹ️ There's one texture that has count `0`, it's the waterPuddle texture from FS22, which is not present in FS25.
|
374
374
|
- `tags` - the tags from the OpenStreetMap data. Refer to the section [Supported objects](#supported-objects) to see the list of supported tags. If there are no tags, the texture file will be generated empty and no objects will be placed on it.
|
375
375
|
- `width` - the width of the texture in meters. Some of the objects from OSM (roads, for example) are lines, not areas. So, to draw them correctly, the tool needs to know the width of the line.
|
376
|
-
- `color` - the color of the texture. It's used only in the preview images and
|
376
|
+
- `color` - the color of the texture. It's used only in the preview images and has no effect on the map itself. But remember that previews are crucial for the map-making process, so it's better to set the color to something that represents the texture.
|
377
377
|
- `priority` - the priority of the texture for overlapping. Textures with higher priorities will be drawn over the textures with lower priorities.
|
378
378
|
ℹ️ The texture with 0 priority considers the base layer, which means that all empty areas will be filled with this texture.
|
379
|
-
- `exclude_weight` - this only used for the forestRockRoots texture from FS25. It
|
379
|
+
- `exclude_weight` - this is only used for the forestRockRoots texture from FS25. It just means that this texture has no `weight` postfix, that's all.
|
380
380
|
|
381
381
|
## Background terrain
|
382
|
-
The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it
|
383
|
-
So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj
|
384
|
-
If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a
|
382
|
+
The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane that can (and should) be textured to look fine.<br>
|
383
|
+
So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj`, and so on.<br>
|
384
|
+
If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a convenient approach to work with one file, one texture, and then just cut the map from it.<br>
|
385
385
|
|
386
386
|

|
387
387
|
|
388
|
-
➡️ *No matter which approach you choose, you still need to adjust the background terrain to connect it to the map without any gaps. But with a
|
388
|
+
➡️ *No matter which approach you choose, you still need to adjust the background terrain to connect it to the map without any gaps. But with a single file, it's much easier to do.*
|
389
389
|
|
390
|
-
If you're willing to create a background terrain, you will need
|
390
|
+
If you're willing to create a background terrain, you will need Blender, the Blender Exporter Plugins, and the QGIS. You'll find the download links in the [Resources](#resources) section.<br>
|
391
391
|
|
392
|
-
If you're afraid of this task, please don't be. It's really simple and I've
|
392
|
+
If you're afraid of this task, please don't be. It's really simple and I've prepared detailed step-by-step instructions for you, you'll find them in the separate README files. Here are the steps you need to follow:
|
393
393
|
|
394
394
|
1. [Download high-resolution satellite images](docs/download_satellite_images.md).
|
395
395
|
2. [Prepare the i3d files](docs/create_background_terrain.md).
|
396
396
|
3. [Import the i3d files to Giants Editor](docs/import_to_giants_editor.md).
|
397
397
|
|
398
398
|
## Overview image
|
399
|
-
The overview image is an image that is used as in-game map. No matter what the size of the map, this file is always `4096x4096 pixels`, while the region of your map is `2048x2048 pixels` in center of this file. The rest of the image is just here for nice view, but you still may add satellite pictures to this region.<br>
|
399
|
+
The overview image is an image that is used as an in-game map. No matter what the size of the map, this file is always `4096x4096 pixels`, while the region of your map is `2048x2048 pixels` in the center of this file. The rest of the image is just here for a nice view, but you still may add satellite pictures to this region.<br>
|
400
400
|
|
401
401
|
<img width="400" src="https://github.com/user-attachments/assets/ede9ea81-ef97-4914-9dbf-9761ef1eb7ca">
|
402
402
|
|
403
403
|
Cool image by [@ZenJakey](https://github.com/ZenJakey).
|
404
404
|
|
405
|
-
So, the same way you've downloaded the satellite images for the background terrain, you can download them for the overview image. Just use the `epsg3857_string` from the `generation_info.json` file. You'll find the needed string in the `Config` component in the `Overview` section:
|
405
|
+
So, in the same way, you've downloaded the satellite images for the background terrain, you can download them for the overview image. Just use the `epsg3857_string` from the `generation_info.json` file. You'll find the needed string in the `Config` component in the `Overview` section:
|
406
406
|
|
407
407
|
```json
|
408
408
|
"Config": {
|
@@ -412,20 +412,20 @@ So, the same way you've downloaded the satellite images for the background terra
|
|
412
412
|
},
|
413
413
|
```
|
414
414
|
|
415
|
-
After
|
415
|
+
After that, you need to resize the image to 4096x4096 pixels and convert it to the `.dds` format.
|
416
416
|
|
417
417
|
## DDS conversion
|
418
|
-
The `.dds` format is the format used in the Farming Simulator for the textures, icons, overview and preview images. There
|
418
|
+
The `.dds` format is the format used in the Farming Simulator for the textures, icons, overview, and preview images. There a plenty of options to convert the images to the `.dds` format, you can just google something like `png to dds`, and the first link probably will help you with it.<br>
|
419
419
|
|
420
420
|
List of the important DDS files:
|
421
421
|
- `icon.dds` - 256x256 pixels, the icon of the map,
|
422
|
-
- `preview.dds` - 2048x2048 pixels, the preview image of the map on loading screen,
|
422
|
+
- `preview.dds` - 2048x2048 pixels, the preview image of the map on the loading screen,
|
423
423
|
- `mapsUS/overview.dds` - 4096x4096 pixels, the overview image of the map (in-game map)
|
424
424
|
|
425
425
|
## For advanced users
|
426
426
|
The tool supports the custom size of the map. To use this feature select `Custom` in the `Map size` dropdown and enter the desired size. The tool will generate a map with the size you entered.<br>
|
427
427
|
|
428
|
-
⛔️ Do not use this feature, if you don't know what you're doing. In most cases the Giants Editor will just crash on opening the file, because you need to enter
|
428
|
+
⛔️ Do not use this feature, if you don't know what you're doing. In most cases, the Giants Editor will just crash on opening the file, because you need to enter specific values for the map size.<br><br>
|
429
429
|
|
430
430
|

|
431
431
|
|
@@ -433,14 +433,16 @@ You can also apply some advanced settings to the map generation process. Note th
|
|
433
433
|
|
434
434
|
Here's the list of the advanced settings:
|
435
435
|
|
436
|
-
- DEM multiplier: the height of the map is multiplied by this value. So the DEM map is just a 16-bit grayscale image, which means that the maximum
|
436
|
+
- DEM multiplier: the height of the map is multiplied by this value. So the DEM map is just a 16-bit grayscale image, which means that the maximum available value there is 65535, while the actual difference between the deepest and the highest point on Earth is about 20 km. Just note that this setting mostly does not matter, because you can always adjust it in the Giants Editor, learn more about the DEM file and the heightScale parameter in [docs](docs/dem.md). By default, it's set to 1.
|
437
|
+
|
438
|
+
- DEM Blur radius: the radius of the Gaussian blur filter applied to the DEM map. By default, it's set to 21. This filter just makes the DEM map smoother, so the height transitions will be more natural. You can set it to 1 to disable the filter, but it will result in a Minecraft-like map.
|
437
439
|
|
438
|
-
- DEM
|
440
|
+
- DEM Plateau height: this value will be added to each pixel of the DEM image, making it "higher". It's useful when you want to add some negative heights on the map, that appear to be in a "low" place. By default, it's set to 0.
|
439
441
|
|
440
|
-
-
|
442
|
+
- Background Terrain Generate only full tiles: if checked (by default) the small tiles (N, NE, E, and so on) will not be generated, only the full tile will be created. It's useful when you don't want to work with separate tiles, but with one big file. Since the new method of cutting the map from the background terrain added to the documentation, and now it's possible to perfectly align the map with the background terrain, this option will remain just as a legacy one.
|
441
443
|
|
442
444
|
## Resources
|
443
|
-
In this section you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
|
445
|
+
In this section, you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
|
444
446
|
To create a basic map, you only need the Giants Editor. But if you want to create a background terrain - the world around the map, so it won't look like it's floating in the void - you also need Blender and the Blender Exporter Plugins. To create realistic textures for the background terrain, the QGIS is required to obtain high-resolution satellite images.<br>
|
445
447
|
|
446
448
|
1. [Giants Editor](https://gdn.giants-software.com/downloads.php) - the official tool for creating maps for the Farming Simulator.
|
@@ -448,7 +450,7 @@ To create a basic map, you only need the Giants Editor. But if you want to creat
|
|
448
450
|
3. [Blender Exporter Plugins](https://gdn.giants-software.com/downloads.php) - the official plugins for exporting models from Blender to i3d format (the format used in the Farming Simulator).
|
449
451
|
4. [QGIS](https://qgis.org/download/) - the open-source GIS software that you can use to obtain high-resolution satellite images for your map.
|
450
452
|
5. [CompressPngCom](https://www.compresspng.com/) - the online tool to compress the PNG images. May be useful to reduce the size of the satellite images.
|
451
|
-
6. [AnyConv](https://anyconv.com/png-to-dds-converter/) - the online tool to convert the PNG images to the DDS format. You'll need this format for the textures, icons, overview and preview images.
|
453
|
+
6. [AnyConv](https://anyconv.com/png-to-dds-converter/) - the online tool to convert the PNG images to the DDS format. You'll need this format for the textures, icons, overview, and preview images.
|
452
454
|
|
453
455
|
## Bugs and feature requests
|
454
456
|
➡️ Please, before creating an issue or asking some questions, check the [FAQ](docs/FAQ.md) section.<br>
|