maps4fs 1.0.5__tar.gz → 1.0.6__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.
Files changed (29) hide show
  1. {maps4fs-1.0.5 → maps4fs-1.0.6}/PKG-INFO +45 -45
  2. {maps4fs-1.0.5 → maps4fs-1.0.6}/README.md +44 -44
  3. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/background.py +82 -14
  4. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/dem.py +0 -16
  5. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/game.py +1 -1
  6. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/path_steps.py +16 -2
  7. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/tile.py +0 -4
  8. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs.egg-info/PKG-INFO +45 -45
  9. {maps4fs-1.0.5 → maps4fs-1.0.6}/pyproject.toml +1 -1
  10. {maps4fs-1.0.5 → maps4fs-1.0.6}/LICENSE.md +0 -0
  11. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/__init__.py +0 -0
  12. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/__init__.py +0 -0
  13. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/component.py +0 -0
  14. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/config.py +0 -0
  15. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/grle.py +0 -0
  16. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/i3d.py +0 -0
  17. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/map.py +0 -0
  18. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/qgis.py +0 -0
  19. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/generator/texture.py +0 -0
  20. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/logger.py +0 -0
  21. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/toolbox/__init__.py +0 -0
  22. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/toolbox/background.py +0 -0
  23. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs/toolbox/dem.py +0 -0
  24. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs.egg-info/SOURCES.txt +0 -0
  25. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs.egg-info/dependency_links.txt +0 -0
  26. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs.egg-info/requires.txt +0 -0
  27. {maps4fs-1.0.5 → maps4fs-1.0.6}/maps4fs.egg-info/top_level.txt +0 -0
  28. {maps4fs-1.0.5 → maps4fs-1.0.6}/setup.cfg +0 -0
  29. {maps4fs-1.0.5 → maps4fs-1.0.6}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 1.0.5
3
+ Version: 1.0.6
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="#Step-by-step">Create a map in 10 steps</a> •
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 of tasks 🆕<br>
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 world data.<br><br>
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:** open the [maps4fs](https://maps4fs.streamlit.app) on StreamLit and generate a map template in a few clicks.<br>
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. Texure dissolving is disabled (they will look worse). </i><br>
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
  ![Basic WebUI](https://github.com/user-attachments/assets/52f499cc-f28a-4da3-abef-0e818abe8dbe)
101
105
 
102
106
  ### 😎 For advanced users
103
- **Option 2:** run the Docker version in your browser. Launch the following command in your terminal:
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 a multiple previews of the map. Here's the list of them:
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 looking textures and advanced settings.
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
  ![Modder Toolbox](https://github.com/user-attachments/assets/dffb252f-f5c0-4021-9d45-31e5bccc0d9b)
232
232
 
233
- ### Tool categories
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 the height map using it.
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 splitted to the different sections, which represents 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>
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 path to the files are stored.
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 exact 2X the size of the map.<br>
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's required to obtain the satellite images in the QGIS,<br>
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 consist of the 8 tiles, each one represents the tile, that surrounds the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on.<br>
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's required to obtain the satellite images in the QGIS,<br>
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 of supported games this file has unique entries, but the structure is the same. Here's an example of the schema for Farming Simulator 25:
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 have count `0`, it's the waterPuddle texture from FS22, which not present in FS25.
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 have 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.
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's just means that this texture has no `weight` postfix, that's all.
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, because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane which can (and should) be texture 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 convinient approach to work with one file, one texture and then just cut the map from it.<br>
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
  ![Complete background terrain in Blender](https://github.com/user-attachments/assets/7266b8f1-bfa2-4c14-a740-1c84b1030a66)
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 sinlge file it's much easier to do.*
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: Blender, the Blender Exporter Plugins and the QGIS. You'll find the download links in the [Resources](#resources) section.<br>
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 prepaired detailed step-by-step instructions for you, you'll find them in the separate README files. Here are the steps you need to follow:
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 it you need to resize the image to 4096x4096 pixels and convert it to the `.dds` format.
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's 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>
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 a specific values for the map size.<br><br>
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
  ![Advanced settings](https://github.com/user-attachments/assets/e7406adf-6b82-41a0-838a-13dd8877bebf)
456
456
 
@@ -458,14 +458,14 @@ 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 avaiable 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 paramter in [docs](docs/dem.md). By default, it's set to 1.
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
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 as a Minecraft-like map.
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.
464
464
 
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, which appears to be in a "low" place. By default, it's set to 0.
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.
466
466
 
467
467
  ## 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>
468
+ In this section, you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
469
469
  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
470
 
471
471
  1. [Giants Editor](https://gdn.giants-software.com/downloads.php) - the official tool for creating maps for the Farming Simulator.
@@ -473,7 +473,7 @@ To create a basic map, you only need the Giants Editor. But if you want to creat
473
473
  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
474
  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
475
  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.
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.
477
477
 
478
478
  ## Bugs and feature requests
479
479
  ➡️ 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="#Step-by-step">Create a map in 10 steps</a> •
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 of tasks 🆕<br>
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 world data.<br><br>
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:** open the [maps4fs](https://maps4fs.streamlit.app) on StreamLit and generate a map template in a few clicks.<br>
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. Texure dissolving is disabled (they will look worse). </i><br>
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
  ![Basic WebUI](https://github.com/user-attachments/assets/52f499cc-f28a-4da3-abef-0e818abe8dbe)
76
80
 
77
81
  ### 😎 For advanced users
78
- **Option 2:** run the Docker version in your browser. Launch the following command in your terminal:
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 a multiple previews of the map. Here's the list of them:
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 looking textures and advanced settings.
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
  ![Modder Toolbox](https://github.com/user-attachments/assets/dffb252f-f5c0-4021-9d45-31e5bccc0d9b)
207
207
 
208
- ### Tool categories
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 the height map using it.
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 splitted to the different sections, which represents 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>
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 path to the files are stored.
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 exact 2X the size of the map.<br>
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's required to obtain the satellite images in the QGIS,<br>
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 consist of the 8 tiles, each one represents the tile, that surrounds the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on.<br>
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's required to obtain the satellite images in the QGIS,<br>
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 of supported games this file has unique entries, but the structure is the same. Here's an example of the schema for Farming Simulator 25:
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 have count `0`, it's the waterPuddle texture from FS22, which not present in FS25.
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 have 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.
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's just means that this texture has no `weight` postfix, that's all.
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, because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane which can (and should) be texture 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 convinient approach to work with one file, one texture and then just cut the map from it.<br>
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
  ![Complete background terrain in Blender](https://github.com/user-attachments/assets/7266b8f1-bfa2-4c14-a740-1c84b1030a66)
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 sinlge file it's much easier to do.*
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: Blender, the Blender Exporter Plugins and the QGIS. You'll find the download links in the [Resources](#resources) section.<br>
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 prepaired detailed step-by-step instructions for you, you'll find them in the separate README files. Here are the steps you need to follow:
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 it you need to resize the image to 4096x4096 pixels and convert it to the `.dds` format.
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's 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>
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 a specific values for the map size.<br><br>
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
  ![Advanced settings](https://github.com/user-attachments/assets/e7406adf-6b82-41a0-838a-13dd8877bebf)
431
431
 
@@ -433,14 +433,14 @@ 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 avaiable 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 paramter in [docs](docs/dem.md). By default, it's set to 1.
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
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 as a Minecraft-like map.
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.
439
439
 
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, which appears to be in a "low" place. By default, it's set to 0.
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.
441
441
 
442
442
  ## 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>
443
+ In this section, you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
444
444
  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
445
 
446
446
  1. [Giants Editor](https://gdn.giants-software.com/downloads.php) - the official tool for creating maps for the Farming Simulator.
@@ -448,7 +448,7 @@ To create a basic map, you only need the Giants Editor. But if you want to creat
448
448
  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
449
  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
450
  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.
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.
452
452
 
453
453
  ## Bugs and feature requests
454
454
  ➡️ Please, before creating an issue or asking some questions, check the [FAQ](docs/FAQ.md) section.<br>
@@ -4,6 +4,7 @@ around the map."""
4
4
  from __future__ import annotations
5
5
 
6
6
  import os
7
+ import shutil
7
8
 
8
9
  import cv2
9
10
  import numpy as np
@@ -15,13 +16,15 @@ from maps4fs.generator.dem import (
15
16
  DEFAULT_MULTIPLIER,
16
17
  DEFAULT_PLATEAU,
17
18
  )
18
- from maps4fs.generator.path_steps import PATH_FULL_NAME, get_steps
19
+ from maps4fs.generator.path_steps import (
20
+ PATH_FULL_NAME,
21
+ PATH_FULL_PREVIEW_NAME,
22
+ get_steps,
23
+ )
19
24
  from maps4fs.generator.tile import Tile
20
25
 
21
26
  RESIZE_FACTOR = 1 / 4
22
- SIMPLIFY_FACTOR = 10
23
27
  FULL_RESIZE_FACTOR = 1 / 8
24
- FULL_SIMPLIFY_FACTOR = 20
25
28
 
26
29
 
27
30
  class Background(Component):
@@ -42,8 +45,10 @@ class Background(Component):
42
45
  self.tiles: list[Tile] = []
43
46
  origin = self.coordinates
44
47
 
48
+ only_full_tiles = self.kwargs.get("only_full_tiles", True)
49
+
45
50
  # Getting a list of 8 tiles around the map starting from the N(North) tile.
46
- for path_step in get_steps(self.map_height, self.map_width):
51
+ for path_step in get_steps(self.map_height, self.map_width, only_full_tiles):
47
52
  # Getting the destination coordinates for the current tile.
48
53
  if path_step.angle is None:
49
54
  # For the case when generating the overview map, which has the same
@@ -52,6 +57,11 @@ class Background(Component):
52
57
  else:
53
58
  tile_coordinates = path_step.get_destination(origin)
54
59
 
60
+ if path_step.code == PATH_FULL_PREVIEW_NAME:
61
+ auto_process = False
62
+ else:
63
+ auto_process = self.kwargs.get("auto_process", False)
64
+
55
65
  # Create a Tile component, which is needed to save the DEM image.
56
66
  tile = Tile(
57
67
  game=self.game,
@@ -61,7 +71,7 @@ class Background(Component):
61
71
  map_directory=self.map_directory,
62
72
  logger=self.logger,
63
73
  tile_code=path_step.code,
64
- auto_process=False,
74
+ auto_process=auto_process,
65
75
  blur_radius=self.kwargs.get("blur_radius", DEFAULT_BLUR_RADIUS),
66
76
  multiplier=self.kwargs.get("multiplier", DEFAULT_MULTIPLIER),
67
77
  plateau=self.kwargs.get("plateau", DEFAULT_PLATEAU),
@@ -83,9 +93,27 @@ class Background(Component):
83
93
  generated."""
84
94
  for tile in self.tiles:
85
95
  tile.process()
96
+ if tile.code == PATH_FULL_NAME:
97
+ cutted_dem_path = self.cutout(tile.dem_path)
98
+ if self.game.additional_dem_name is not None:
99
+ self.make_copy(cutted_dem_path, self.game.additional_dem_name)
86
100
 
87
101
  self.generate_obj_files()
88
102
 
103
+ def make_copy(self, dem_path: str, dem_name: str) -> None:
104
+ """Copies DEM data to additional DEM file.
105
+
106
+ Arguments:
107
+ dem_path (str): Path to the DEM file.
108
+ dem_name (str): Name of the additional DEM file.
109
+ """
110
+ dem_directory = os.path.dirname(dem_path)
111
+
112
+ additional_dem_path = os.path.join(dem_directory, dem_name)
113
+
114
+ shutil.copyfile(dem_path, additional_dem_path)
115
+ self.logger.info("Additional DEM data was copied to %s.", additional_dem_path)
116
+
89
117
  def info_sequence(self) -> dict[str, dict[str, str | float | int]]:
90
118
  """Returns a dictionary with information about the tiles around the map.
91
119
  Adds the EPSG:3857 string to the data for convenient usage in QGIS.
@@ -152,6 +180,42 @@ class Background(Component):
152
180
  dem_data = cv2.imread(tile.dem_path, cv2.IMREAD_UNCHANGED) # pylint: disable=no-member
153
181
  self.plane_from_np(tile.code, dem_data, save_path) # type: ignore
154
182
 
183
+ def cutout(self, dem_path: str) -> str:
184
+ """Cuts out the center of the DEM (the actual map) and saves it as a separate file.
185
+
186
+ Arguments:
187
+ dem_path (str): The path to the DEM file.
188
+
189
+ Returns:
190
+ str -- The path to the cutout DEM file.
191
+ """
192
+ dem_data = cv2.imread(dem_path, cv2.IMREAD_UNCHANGED) # pylint: disable=no-member
193
+
194
+ center = (dem_data.shape[0] // 2, dem_data.shape[1] // 2)
195
+ half_size = self.map_height // 2
196
+ x1 = center[0] - half_size
197
+ x2 = center[0] + half_size
198
+ y1 = center[1] - half_size
199
+ y2 = center[1] + half_size
200
+ dem_data = dem_data[x1:x2, y1:y2]
201
+
202
+ output_size = self.map_height + 1
203
+
204
+ # pylint: disable=no-member
205
+ dem_data = cv2.resize(dem_data, (output_size, output_size), interpolation=cv2.INTER_LINEAR)
206
+
207
+ main_dem_path = self.game.dem_file_path(self.map_directory)
208
+
209
+ try:
210
+ os.remove(main_dem_path)
211
+ except FileNotFoundError:
212
+ pass
213
+
214
+ cv2.imwrite(main_dem_path, dem_data) # pylint: disable=no-member
215
+ self.logger.info("DEM cutout saved: %s", main_dem_path)
216
+
217
+ return main_dem_path
218
+
155
219
  # pylint: disable=too-many-locals
156
220
  def plane_from_np(self, tile_code: str, dem_data: np.ndarray, save_path: str) -> None:
157
221
  """Generates a 3D obj file based on DEM data.
@@ -163,10 +227,8 @@ class Background(Component):
163
227
  """
164
228
  if tile_code == PATH_FULL_NAME:
165
229
  resize_factor = FULL_RESIZE_FACTOR
166
- simplify_factor = FULL_SIMPLIFY_FACTOR
167
230
  else:
168
231
  resize_factor = RESIZE_FACTOR
169
- simplify_factor = SIMPLIFY_FACTOR
170
232
  dem_data = cv2.resize( # pylint: disable=no-member
171
233
  dem_data, (0, 0), fx=resize_factor, fy=resize_factor
172
234
  )
@@ -213,14 +275,21 @@ class Background(Component):
213
275
  mesh.apply_transform(rotation_matrix_y)
214
276
  mesh.apply_transform(rotation_matrix_z)
215
277
 
216
- self.logger.debug("Mesh generated with %s faces, will be simplified", len(mesh.faces))
217
-
218
- # Simplify the mesh to reduce the number of faces.
219
- mesh = mesh.simplify_quadric_decimation(face_count=len(faces) // simplify_factor)
220
- self.logger.debug("Mesh simplified to %s faces", len(mesh.faces))
278
+ if tile_code == PATH_FULL_PREVIEW_NAME:
279
+ # Simplify the preview mesh to reduce the size of the file.
280
+ mesh = mesh.simplify_quadric_decimation(face_count=len(mesh.faces) // 2**7)
221
281
 
222
- if tile_code == PATH_FULL_NAME:
282
+ # Apply scale to make the preview mesh smaller in the UI.
283
+ mesh.apply_scale([0.5, 0.5, 0.5])
223
284
  self.mesh_to_stl(mesh)
285
+ else:
286
+ multiplier = self.kwargs.get("multiplier", DEFAULT_MULTIPLIER)
287
+ if multiplier != 1:
288
+ z_scaling_factor = 1 / multiplier
289
+ else:
290
+ z_scaling_factor = 1 / 2**5
291
+ self.logger.debug("Z scaling factor: %s", z_scaling_factor)
292
+ mesh.apply_scale([1 / resize_factor, 1 / resize_factor, z_scaling_factor])
224
293
 
225
294
  mesh.export(save_path)
226
295
  self.logger.debug("Obj file saved: %s", save_path)
@@ -234,7 +303,6 @@ class Background(Component):
234
303
  mesh (trimesh.Trimesh) -- The mesh to convert to an STL file.
235
304
  """
236
305
  preview_path = os.path.join(self.previews_directory, "background_dem.stl")
237
- mesh = mesh.simplify_quadric_decimation(percent=0.05)
238
306
  mesh.export(preview_path)
239
307
 
240
308
  self.logger.info("STL file saved: %s", preview_path)
@@ -225,22 +225,6 @@ class DEM(Component):
225
225
  cv2.imwrite(self._dem_path, resampled_data)
226
226
  self.logger.info("DEM data was saved to %s.", self._dem_path)
227
227
 
228
- if self.game.additional_dem_name is not None:
229
- self.make_copy(self.game.additional_dem_name)
230
-
231
- def make_copy(self, dem_name: str) -> None:
232
- """Copies DEM data to additional DEM file.
233
-
234
- Arguments:
235
- dem_name (str): Name of the additional DEM file.
236
- """
237
- dem_directory = os.path.dirname(self._dem_path)
238
-
239
- additional_dem_path = os.path.join(dem_directory, dem_name)
240
-
241
- shutil.copyfile(self._dem_path, additional_dem_path)
242
- self.logger.info("Additional DEM data was copied to %s.", additional_dem_path)
243
-
244
228
  def _tile_info(self, lat: float, lon: float) -> tuple[str, str]:
245
229
  """Returns latitude band and tile name for SRTM tile from coordinates.
246
230
 
@@ -39,7 +39,7 @@ class Game:
39
39
  _grle_schema: str | None = None
40
40
 
41
41
  # Order matters! Some components depend on others.
42
- components = [Texture, I3d, DEM, Config, GRLE, Background]
42
+ components = [Texture, DEM, I3d, Config, GRLE, Background]
43
43
 
44
44
  def __init__(self, map_template_path: str | None = None):
45
45
  if map_template_path:
@@ -6,6 +6,7 @@ from geopy.distance import distance # type: ignore
6
6
 
7
7
  DEFAULT_DISTANCE = 2048
8
8
  PATH_FULL_NAME = "FULL"
9
+ PATH_FULL_PREVIEW_NAME = "FULL_PREVIEW"
9
10
 
10
11
 
11
12
  class PathStep(NamedTuple):
@@ -40,13 +41,14 @@ class PathStep(NamedTuple):
40
41
  return destination.latitude, destination.longitude
41
42
 
42
43
 
43
- def get_steps(map_height: int, map_width: int) -> list[PathStep]:
44
+ def get_steps(map_height: int, map_width: int, only_full_tiles: bool = True) -> list[PathStep]:
44
45
  """Return a list of PathStep objects for each tile, which represent a step in the path.
45
46
  Moving from the center of the map to North, then clockwise.
46
47
 
47
48
  Arguments:
48
49
  map_height {int} -- Height of the map in pixels
49
50
  map_width {int} -- Width of the map in pixels
51
+ only_full_tiles {bool} -- Whether to return only full tiles or all tiles
50
52
 
51
53
  Returns:
52
54
  list[PathStep] -- List of PathStep objects
@@ -57,7 +59,7 @@ def get_steps(map_height: int, map_width: int) -> list[PathStep]:
57
59
 
58
60
  half_default_distance = int(DEFAULT_DISTANCE / 2)
59
61
 
60
- return [
62
+ tiles = [
61
63
  PathStep("N", 0, half_height + half_default_distance, (map_width, DEFAULT_DISTANCE)),
62
64
  PathStep(
63
65
  "NE", 90, half_width + half_default_distance, (DEFAULT_DISTANCE, DEFAULT_DISTANCE)
@@ -74,10 +76,22 @@ def get_steps(map_height: int, map_width: int) -> list[PathStep]:
74
76
  PathStep(
75
77
  "NW", 0, half_height + half_default_distance, (DEFAULT_DISTANCE, DEFAULT_DISTANCE)
76
78
  ),
79
+ ]
80
+ full_tiles = [
77
81
  PathStep(
78
82
  PATH_FULL_NAME,
79
83
  None,
80
84
  None,
81
85
  (map_width + DEFAULT_DISTANCE * 2, map_height + DEFAULT_DISTANCE * 2),
82
86
  ),
87
+ PathStep(
88
+ PATH_FULL_PREVIEW_NAME,
89
+ None,
90
+ None,
91
+ (map_width + DEFAULT_DISTANCE * 2, map_height + DEFAULT_DISTANCE * 2),
92
+ ),
83
93
  ]
94
+
95
+ if only_full_tiles:
96
+ return full_tiles
97
+ return tiles + full_tiles
@@ -49,7 +49,3 @@ class Tile(DEM):
49
49
  tuple[int, int]: The width and height of the output image.
50
50
  """
51
51
  return self.map_width, self.map_height
52
-
53
- def make_copy(self, *args, **kwargs) -> None:
54
- """Override the method to prevent copying the tile."""
55
- pass # pylint: disable=unnecessary-pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 1.0.5
3
+ Version: 1.0.6
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="#Step-by-step">Create a map in 10 steps</a> •
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 of tasks 🆕<br>
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 world data.<br><br>
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:** open the [maps4fs](https://maps4fs.streamlit.app) on StreamLit and generate a map template in a few clicks.<br>
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. Texure dissolving is disabled (they will look worse). </i><br>
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
  ![Basic WebUI](https://github.com/user-attachments/assets/52f499cc-f28a-4da3-abef-0e818abe8dbe)
101
105
 
102
106
  ### 😎 For advanced users
103
- **Option 2:** run the Docker version in your browser. Launch the following command in your terminal:
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 a multiple previews of the map. Here's the list of them:
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 looking textures and advanced settings.
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
  ![Modder Toolbox](https://github.com/user-attachments/assets/dffb252f-f5c0-4021-9d45-31e5bccc0d9b)
232
232
 
233
- ### Tool categories
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 the height map using it.
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 splitted to the different sections, which represents 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>
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 path to the files are stored.
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 exact 2X the size of the map.<br>
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's required to obtain the satellite images in the QGIS,<br>
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 consist of the 8 tiles, each one represents the tile, that surrounds the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on.<br>
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's required to obtain the satellite images in the QGIS,<br>
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 of supported games this file has unique entries, but the structure is the same. Here's an example of the schema for Farming Simulator 25:
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 have count `0`, it's the waterPuddle texture from FS22, which not present in FS25.
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 have 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.
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's just means that this texture has no `weight` postfix, that's all.
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, because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane which can (and should) be texture 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 convinient approach to work with one file, one texture and then just cut the map from it.<br>
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
  ![Complete background terrain in Blender](https://github.com/user-attachments/assets/7266b8f1-bfa2-4c14-a740-1c84b1030a66)
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 sinlge file it's much easier to do.*
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: Blender, the Blender Exporter Plugins and the QGIS. You'll find the download links in the [Resources](#resources) section.<br>
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 prepaired detailed step-by-step instructions for you, you'll find them in the separate README files. Here are the steps you need to follow:
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 it you need to resize the image to 4096x4096 pixels and convert it to the `.dds` format.
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's 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>
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 a specific values for the map size.<br><br>
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
  ![Advanced settings](https://github.com/user-attachments/assets/e7406adf-6b82-41a0-838a-13dd8877bebf)
456
456
 
@@ -458,14 +458,14 @@ 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 avaiable 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 paramter in [docs](docs/dem.md). By default, it's set to 1.
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
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 as a Minecraft-like map.
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.
464
464
 
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, which appears to be in a "low" place. By default, it's set to 0.
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.
466
466
 
467
467
  ## 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>
468
+ In this section, you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
469
469
  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
470
 
471
471
  1. [Giants Editor](https://gdn.giants-software.com/downloads.php) - the official tool for creating maps for the Farming Simulator.
@@ -473,7 +473,7 @@ To create a basic map, you only need the Giants Editor. But if you want to creat
473
473
  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
474
  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
475
  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.
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.
477
477
 
478
478
  ## Bugs and feature requests
479
479
  ➡️ Please, before creating an issue or asking some questions, check the [FAQ](docs/FAQ.md) section.<br>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "1.0.5"
7
+ version = "1.0.6"
8
8
  description = "Generate map templates for Farming Simulator from real places."
9
9
  authors = [{name = "iwatkot", email = "iwatkot@gmail.com"}]
10
10
  license = {text = "MIT License"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes