maps4fs 1.2.3__py3-none-any.whl → 1.4.1__py3-none-any.whl
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.
Potentially problematic release.
This version of maps4fs might be problematic. Click here for more details.
- maps4fs/__init__.py +10 -1
- maps4fs/generator/background.py +196 -36
- maps4fs/generator/component.py +85 -23
- maps4fs/generator/config.py +1 -1
- maps4fs/generator/dem.py +11 -13
- maps4fs/generator/game.py +1 -1
- maps4fs/generator/grle.py +13 -14
- maps4fs/generator/i3d.py +169 -35
- maps4fs/generator/map.py +184 -7
- maps4fs/generator/texture.py +119 -33
- {maps4fs-1.2.3.dist-info → maps4fs-1.4.1.dist-info}/METADATA +44 -17
- maps4fs-1.4.1.dist-info/RECORD +21 -0
- maps4fs-1.2.3.dist-info/RECORD +0 -21
- {maps4fs-1.2.3.dist-info → maps4fs-1.4.1.dist-info}/LICENSE.md +0 -0
- {maps4fs-1.2.3.dist-info → maps4fs-1.4.1.dist-info}/WHEEL +0 -0
- {maps4fs-1.2.3.dist-info → maps4fs-1.4.1.dist-info}/top_level.txt +0 -0
maps4fs/generator/texture.py
CHANGED
@@ -64,6 +64,7 @@ class Texture(Component):
|
|
64
64
|
priority: int | None = None,
|
65
65
|
info_layer: str | None = None,
|
66
66
|
usage: str | None = None,
|
67
|
+
background: bool = False,
|
67
68
|
):
|
68
69
|
self.name = name
|
69
70
|
self.count = count
|
@@ -74,6 +75,7 @@ class Texture(Component):
|
|
74
75
|
self.priority = priority
|
75
76
|
self.info_layer = info_layer
|
76
77
|
self.usage = usage
|
78
|
+
self.background = background
|
77
79
|
|
78
80
|
def to_json(self) -> dict[str, str | list[str] | bool]: # type: ignore
|
79
81
|
"""Returns dictionary with layer data.
|
@@ -90,6 +92,7 @@ class Texture(Component):
|
|
90
92
|
"priority": self.priority,
|
91
93
|
"info_layer": self.info_layer,
|
92
94
|
"usage": self.usage,
|
95
|
+
"background": self.background,
|
93
96
|
}
|
94
97
|
|
95
98
|
data = {k: v for k, v in data.items() if v is not None}
|
@@ -174,25 +177,32 @@ class Texture(Component):
|
|
174
177
|
]
|
175
178
|
|
176
179
|
def preprocess(self) -> None:
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
+
"""Preprocesses the data before the generation."""
|
181
|
+
custom_schema = self.kwargs.get("texture_custom_schema")
|
182
|
+
if custom_schema:
|
183
|
+
layers_schema = custom_schema # type: ignore
|
184
|
+
self.logger.info("Custom schema loaded with %s layers.", len(layers_schema))
|
185
|
+
else:
|
186
|
+
if not os.path.isfile(self.game.texture_schema):
|
187
|
+
raise FileNotFoundError(
|
188
|
+
f"Texture layers schema not found: {self.game.texture_schema}"
|
189
|
+
)
|
180
190
|
|
181
|
-
|
182
|
-
|
191
|
+
try:
|
192
|
+
with open(self.game.texture_schema, "r", encoding="utf-8") as f:
|
193
|
+
layers_schema = json.load(f)
|
194
|
+
except json.JSONDecodeError as e:
|
195
|
+
raise ValueError(f"Error loading texture layers schema: {e}") from e
|
183
196
|
|
184
197
|
try:
|
185
|
-
|
186
|
-
|
187
|
-
except
|
188
|
-
raise ValueError(f"Error loading texture layers
|
189
|
-
|
190
|
-
self.layers = [self.Layer.from_json(layer) for layer in layers_schema]
|
191
|
-
self.logger.info("Loaded %s layers.", len(self.layers))
|
198
|
+
self.layers = [self.Layer.from_json(layer) for layer in layers_schema] # type: ignore
|
199
|
+
self.logger.info("Loaded %s layers.", len(self.layers))
|
200
|
+
except Exception as e: # pylint: disable=W0703
|
201
|
+
raise ValueError(f"Error loading texture layers: {e}") from e
|
192
202
|
|
193
203
|
base_layer = self.get_base_layer()
|
194
204
|
if base_layer:
|
195
|
-
self.logger.
|
205
|
+
self.logger.debug("Base layer found: %s.", base_layer.name)
|
196
206
|
else:
|
197
207
|
self.logger.warning("No base layer found.")
|
198
208
|
|
@@ -215,6 +225,14 @@ class Texture(Component):
|
|
215
225
|
return layer
|
216
226
|
return None
|
217
227
|
|
228
|
+
def get_background_layers(self) -> list[Layer]:
|
229
|
+
"""Returns list of background layers.
|
230
|
+
|
231
|
+
Returns:
|
232
|
+
list[Layer]: List of background layers.
|
233
|
+
"""
|
234
|
+
return [layer for layer in self.layers if layer.background]
|
235
|
+
|
218
236
|
def get_layer_by_usage(self, usage: str) -> Layer | None:
|
219
237
|
"""Returns layer by usage.
|
220
238
|
|
@@ -295,7 +313,7 @@ class Texture(Component):
|
|
295
313
|
|
296
314
|
for layer in self.layers:
|
297
315
|
self._generate_weights(layer)
|
298
|
-
self.logger.
|
316
|
+
self.logger.debug("Prepared weights for %s layers.", len(self.layers))
|
299
317
|
|
300
318
|
def _generate_weights(self, layer: Layer) -> None:
|
301
319
|
"""Generates weight files for textures. Each file is a numpy array of zeros and
|
@@ -354,7 +372,7 @@ class Texture(Component):
|
|
354
372
|
),
|
355
373
|
)
|
356
374
|
|
357
|
-
# pylint: disable=no-member
|
375
|
+
# pylint: disable=no-member, R0912
|
358
376
|
def draw(self) -> None:
|
359
377
|
"""Iterates over layers and fills them with polygons from OSM data."""
|
360
378
|
layers = self.layers_by_priority()
|
@@ -370,6 +388,9 @@ class Texture(Component):
|
|
370
388
|
info_layer_data = defaultdict(list)
|
371
389
|
|
372
390
|
for layer in layers:
|
391
|
+
if self.map.texture_settings.skip_drains and layer.usage == "drain":
|
392
|
+
self.logger.debug("Skipping layer %s because of the usage.", layer.name)
|
393
|
+
continue
|
373
394
|
if not layer.tags:
|
374
395
|
self.logger.debug("Layer %s has no tags, there's nothing to draw.", layer.name)
|
375
396
|
continue
|
@@ -388,26 +409,48 @@ class Texture(Component):
|
|
388
409
|
|
389
410
|
mask = cv2.bitwise_not(cumulative_image)
|
390
411
|
|
391
|
-
for polygon in self.
|
412
|
+
for polygon in self.objects_generator( # type: ignore
|
413
|
+
layer.tags, layer.width, layer.info_layer
|
414
|
+
):
|
392
415
|
if layer.info_layer:
|
393
|
-
info_layer_data[layer.info_layer].append(
|
416
|
+
info_layer_data[layer.info_layer].append(
|
417
|
+
self.np_to_polygon_points(polygon) # type: ignore
|
418
|
+
)
|
394
419
|
cv2.fillPoly(layer_image, [polygon], color=255) # type: ignore
|
395
420
|
|
421
|
+
if layer.info_layer == "roads":
|
422
|
+
for linestring in self.objects_generator(
|
423
|
+
layer.tags, layer.width, layer.info_layer, yield_linestrings=True
|
424
|
+
):
|
425
|
+
info_layer_data[f"{layer.info_layer}_polylines"].append(
|
426
|
+
linestring # type: ignore
|
427
|
+
)
|
428
|
+
|
396
429
|
output_image = cv2.bitwise_and(layer_image, mask)
|
397
430
|
|
398
431
|
cumulative_image = cv2.bitwise_or(cumulative_image, output_image)
|
399
432
|
|
400
433
|
cv2.imwrite(layer_path, output_image)
|
401
|
-
self.logger.
|
434
|
+
self.logger.debug("Texture %s saved.", layer_path)
|
402
435
|
|
403
436
|
# Save info layer data.
|
437
|
+
if os.path.isfile(self.info_layer_path):
|
438
|
+
self.logger.debug(
|
439
|
+
"File %s already exists, will update to avoid overwriting.", self.info_layer_path
|
440
|
+
)
|
441
|
+
with open(self.info_layer_path, "r", encoding="utf-8") as f:
|
442
|
+
info_layer_data.update(json.load(f))
|
443
|
+
|
404
444
|
with open(self.info_layer_path, "w", encoding="utf-8") as f:
|
405
445
|
json.dump(info_layer_data, f, ensure_ascii=False, indent=4)
|
446
|
+
self.logger.debug("Info layer data saved to %s.", self.info_layer_path)
|
406
447
|
|
407
448
|
if cumulative_image is not None:
|
408
449
|
self.draw_base_layer(cumulative_image)
|
409
450
|
|
410
|
-
if
|
451
|
+
if self.map.texture_settings.dissolve and self.game.code != "FS22":
|
452
|
+
# FS22 has textures splitted into 4 sublayers, which leads to a very
|
453
|
+
# long processing time when dissolving them.
|
411
454
|
self.dissolve()
|
412
455
|
else:
|
413
456
|
self.logger.debug("Skipping dissolve in light version of the map.")
|
@@ -461,8 +504,6 @@ class Texture(Component):
|
|
461
504
|
|
462
505
|
self.logger.info("Dissolved layer %s.", layer.name)
|
463
506
|
|
464
|
-
self.logger.info("Dissolving finished.")
|
465
|
-
|
466
507
|
def draw_base_layer(self, cumulative_image: np.ndarray) -> None:
|
467
508
|
"""Draws base layer and saves it into the png file.
|
468
509
|
Base layer is the last layer to be drawn, it fills the remaining area of the map.
|
@@ -476,7 +517,7 @@ class Texture(Component):
|
|
476
517
|
self.logger.debug("Drawing base layer %s.", layer_path)
|
477
518
|
img = cv2.bitwise_not(cumulative_image)
|
478
519
|
cv2.imwrite(layer_path, img)
|
479
|
-
self.logger.
|
520
|
+
self.logger.debug("Base texture %s saved.", layer_path)
|
480
521
|
|
481
522
|
def get_relative_x(self, x: float) -> int:
|
482
523
|
"""Converts UTM X coordinate to relative X coordinate in map image.
|
@@ -596,35 +637,80 @@ class Texture(Component):
|
|
596
637
|
converters = {"Polygon": self._skip, "LineString": self._sequence, "Point": self._sequence}
|
597
638
|
return converters.get(geom_type) # type: ignore
|
598
639
|
|
599
|
-
def
|
600
|
-
self,
|
601
|
-
|
640
|
+
def objects_generator(
|
641
|
+
self,
|
642
|
+
tags: dict[str, str | list[str] | bool],
|
643
|
+
width: int | None,
|
644
|
+
info_layer: str | None = None,
|
645
|
+
yield_linestrings: bool = False,
|
646
|
+
) -> Generator[np.ndarray, None, None] | Generator[list[tuple[int, int]], None, None]:
|
602
647
|
"""Generator which yields numpy arrays of polygons from OSM data.
|
603
648
|
|
604
649
|
Arguments:
|
605
650
|
tags (dict[str, str | list[str]]): Dictionary of tags to search for.
|
606
651
|
width (int | None): Width of the polygon in meters (only for LineString).
|
652
|
+
info_layer (str | None): Name of the corresponding info layer.
|
653
|
+
yield_linestrings (bool): Flag to determine if the LineStrings should be yielded.
|
607
654
|
|
608
655
|
Yields:
|
609
|
-
Generator[np.ndarray, None, None]
|
656
|
+
Generator[np.ndarray, None, None] | Generator[list[tuple[int, int]], None, None]:
|
657
|
+
Numpy array of polygon points or list of point coordinates.
|
610
658
|
"""
|
611
|
-
is_fieds = "
|
659
|
+
is_fieds = info_layer == "fields"
|
612
660
|
try:
|
613
|
-
|
661
|
+
if self.map.custom_osm is not None:
|
662
|
+
objects = ox.features_from_xml(self.map.custom_osm, tags=tags)
|
663
|
+
else:
|
664
|
+
objects = ox.features_from_bbox(bbox=self.new_bbox, tags=tags)
|
614
665
|
except Exception as e: # pylint: disable=W0718
|
615
|
-
self.logger.
|
616
|
-
self.logger.warning(e)
|
666
|
+
self.logger.debug("Error fetching objects for tags: %s. Error: %s.", tags, e)
|
617
667
|
return
|
618
668
|
objects_utm = ox.projection.project_gdf(objects, to_latlong=False)
|
619
669
|
self.logger.debug("Fetched %s elements for tags: %s.", len(objects_utm), tags)
|
620
670
|
|
671
|
+
method = self.linestrings_generator if yield_linestrings else self.polygons_generator
|
672
|
+
|
673
|
+
yield from method(objects_utm, width, is_fieds)
|
674
|
+
|
675
|
+
def linestrings_generator(
|
676
|
+
self, objects_utm: pd.core.frame.DataFrame, *args, **kwargs
|
677
|
+
) -> Generator[list[tuple[int, int]], None, None]:
|
678
|
+
"""Generator which yields lists of point coordinates which represent LineStrings from OSM.
|
679
|
+
|
680
|
+
Arguments:
|
681
|
+
objects_utm (pd.core.frame.DataFrame): Dataframe with OSM objects in UTM format.
|
682
|
+
|
683
|
+
Yields:
|
684
|
+
Generator[list[tuple[int, int]], None, None]: List of point coordinates.
|
685
|
+
"""
|
686
|
+
for _, obj in objects_utm.iterrows():
|
687
|
+
geometry = obj["geometry"]
|
688
|
+
if isinstance(geometry, shapely.geometry.linestring.LineString):
|
689
|
+
points = [
|
690
|
+
(self.get_relative_x(x), self.get_relative_y(y)) for x, y in geometry.coords
|
691
|
+
]
|
692
|
+
yield points
|
693
|
+
|
694
|
+
def polygons_generator(
|
695
|
+
self, objects_utm: pd.core.frame.DataFrame, width: int | None, is_fieds: bool
|
696
|
+
) -> Generator[np.ndarray, None, None]:
|
697
|
+
"""Generator which yields numpy arrays of polygons from OSM data.
|
698
|
+
|
699
|
+
Arguments:
|
700
|
+
objects_utm (pd.core.frame.DataFrame): Dataframe with OSM objects in UTM format.
|
701
|
+
width (int | None): Width of the polygon in meters (only for LineString).
|
702
|
+
is_fieds (bool): Flag to determine if the fields should be padded.
|
703
|
+
|
704
|
+
Yields:
|
705
|
+
Generator[np.ndarray, None, None]: Numpy array of polygon points.
|
706
|
+
"""
|
621
707
|
for _, obj in objects_utm.iterrows():
|
622
708
|
polygon = self._to_polygon(obj, width)
|
623
709
|
if polygon is None:
|
624
710
|
continue
|
625
711
|
|
626
|
-
if is_fieds and self.fields_padding > 0:
|
627
|
-
padded_polygon = polygon.buffer(-self.fields_padding)
|
712
|
+
if is_fieds and self.map.texture_settings.fields_padding > 0:
|
713
|
+
padded_polygon = polygon.buffer(-self.map.texture_settings.fields_padding)
|
628
714
|
|
629
715
|
if not isinstance(padded_polygon, shapely.geometry.polygon.Polygon):
|
630
716
|
self.logger.warning("The padding value is too high, field will not padded.")
|
@@ -688,5 +774,5 @@ class Texture(Component):
|
|
688
774
|
preview_path = os.path.join(self.previews_directory, "textures_osm.png")
|
689
775
|
|
690
776
|
cv2.imwrite(preview_path, merged) # type: ignore
|
691
|
-
self.logger.
|
777
|
+
self.logger.debug("Preview saved to %s.", preview_path)
|
692
778
|
return preview_path
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: maps4fs
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.4.1
|
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
|
@@ -22,6 +22,7 @@ Requires-Dist: trimesh
|
|
22
22
|
Requires-Dist: imageio
|
23
23
|
Requires-Dist: tifffile
|
24
24
|
Requires-Dist: pympler
|
25
|
+
Requires-Dist: pydantic
|
25
26
|
|
26
27
|
<div align="center" markdown>
|
27
28
|
<a href="https://discord.gg/Sj5QKKyE42">
|
@@ -60,7 +61,8 @@ Requires-Dist: pympler
|
|
60
61
|
[](https://mypy-lang.org/)
|
61
62
|
[](https://github.com/iwatkot/maps4fs/actions)
|
62
63
|
[](https://codeclimate.com/github/iwatkot/maps4fs/test_coverage)
|
63
|
-
[](https://github.com/iwatkot/maps4fs/stargazers)
|
64
|
+
[](https://github.com/iwatkot/maps4fs/stargazers)<br>
|
65
|
+
[](https://github.com/iwatkot/maps4fs)
|
64
66
|
|
65
67
|
</div>
|
66
68
|
|
@@ -70,7 +72,10 @@ Requires-Dist: pympler
|
|
70
72
|
🌽 Automatically generates farmlands 🆕<br>
|
71
73
|
🌿 Automatically generates decorative foliage 🆕<br>
|
72
74
|
🌲 Automatically generates forests 🆕<br>
|
75
|
+
🌊 Automatically generates water planes 🆕<br>
|
76
|
+
📈 Automatically generates splines 🆕<br>
|
73
77
|
🌍 Based on real-world data from OpenStreetMap<br>
|
78
|
+
🗺️ Supports [custom OSM maps](/docs/custom_osm.md)<br>
|
74
79
|
🏞️ Generates height map using SRTM dataset<br>
|
75
80
|
📦 Provides a ready-to-use map template for the Giants Editor<br>
|
76
81
|
🚜 Supports Farming Simulator 22 and 25<br>
|
@@ -78,7 +83,6 @@ Requires-Dist: pympler
|
|
78
83
|
📄 Generates scripts to download high-resolution satellite images from [QGIS](https://qgis.org/download/) in one click<br>
|
79
84
|
📕 Detailed [documentation](/docs) and tutorials <br>
|
80
85
|
🧰 Modder Toolbox to help you with various tasks <br>
|
81
|
-
|
82
86
|
<p align="center">
|
83
87
|
<img src="https://github.com/user-attachments/assets/cf8f5752-9c69-4018-bead-290f59ba6976"><br>
|
84
88
|
🌎 Detailed terrain based on real-world data.<br><br>
|
@@ -90,6 +94,10 @@ Requires-Dist: pympler
|
|
90
94
|
🌿 Automatically generates decorative foliage.<br><br>
|
91
95
|
<img src="https://github.com/user-attachments/assets/27a5e541-a9f5-4504-b8d2-64aae9fb3e52"><br>
|
92
96
|
🌲 Automatically generates forests.<br><br>
|
97
|
+
<img src="https://github.com/user-attachments/assets/cce7d4e0-cba2-4dd2-b22d-03137fb2e860"><br>
|
98
|
+
🌊 Automatically generates water planes.<br><br>
|
99
|
+
<img src="https://github.com/user-attachments/assets/0b05b511-a595-48e7-a353-8298081314a4"><br>
|
100
|
+
📈 Automatically generates splines.<br><br>
|
93
101
|
<img src="https://github.com/user-attachments/assets/80e5923c-22c7-4dc0-8906-680902511f3a"><br>
|
94
102
|
🗒️ True-to-life blueprints for fast and precise modding.<br><br>
|
95
103
|
<img width="480" src="https://github.com/user-attachments/assets/1a8802d2-6a3b-4bfa-af2b-7c09478e199b"><br>
|
@@ -101,17 +109,13 @@ Requires-Dist: pympler
|
|
101
109
|
<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>
|
102
110
|
<p align="center"><i>How to Generate a Map for Farming Simulator 25 and 22 from a real place using maps4FS.</i></p>
|
103
111
|
|
112
|
+

|
113
|
+
<p align="center"><i>Map example generated with maps4fs.</i></p>
|
114
|
+
|
104
115
|
## Quick Start
|
105
116
|
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>
|
106
117
|
### 🚜 For most users
|
107
|
-
**Option 1:** Open the [maps4fs](https://maps4fs.
|
108
|
-
<i>Note, that StreamLit community hosting has some limitations, such as: <br>
|
109
|
-
1. Maximum map size is 4096x4096 meters. <br>
|
110
|
-
2. Advanced settings are disabled. <br>
|
111
|
-
3. Texture dissolving is disabled (they will look worse). </i><br>
|
112
|
-
|
113
|
-
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>
|
114
|
-
So, jump to [Docker version](#option-2-docker-version) to launch the tool with one command and get the full experience.<br>
|
118
|
+
**Option 1:** Open the [maps4fs](https://maps4fs.xyz) and generate a map template in a few clicks.<br>
|
115
119
|
|
116
120
|

|
117
121
|
|
@@ -159,13 +163,13 @@ Don't know where to start? Don't worry, just follow this [step-by-step guide](do
|
|
159
163
|
|
160
164
|
## How-To-Run
|
161
165
|
|
162
|
-
### Option 1:
|
163
|
-
🟢 Recommended for all users.
|
166
|
+
### Option 1: Public version
|
167
|
+
🟢 Recommended for all users.
|
164
168
|
🛠️ Don't need to install anything.
|
165
|
-
🗺️ Supported map sizes: 2x2, 4x4 km.
|
166
|
-
⚙️ Advanced settings:
|
167
|
-
🖼️ Texture dissolving:
|
168
|
-
Using the [
|
169
|
+
🗺️ Supported map sizes: 2x2, 4x4, 8x8 km.
|
170
|
+
⚙️ Advanced settings: enabled.
|
171
|
+
🖼️ Texture dissolving: enabled.
|
172
|
+
Using the public version on [maps4fs.xyz](https://maps4fs.xyz) is the easiest way to generate a map template. Just open the link and follow the instructions.
|
169
173
|
Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
|
170
174
|
|
171
175
|
Using it is easy and doesn't require any guides. Enjoy!
|
@@ -476,10 +480,16 @@ You can also apply some advanced settings to the map generation process. Note th
|
|
476
480
|
|
477
481
|
- 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.
|
478
482
|
|
483
|
+
- Water depth: this value will be subtracted from each pixel of the DEM image, where water resources are located. Pay attention that it's not in meters, instead it in the pixel value of DEM, which is 16 bit image with possible values from 0 to 65535. When this value is set, the same value will be added to the plateau setting to avoid negative heights.
|
484
|
+
|
479
485
|
### Texture Advanced settings
|
480
486
|
|
481
487
|
- Fields padding - this value (in meters) will be applied to each field, making it smaller. It's useful when the fields are too close to each other and you want to make them smaller. By default, it's set to 0.
|
482
488
|
|
489
|
+
- Texture dissolving - if enabled, the values from one layer will be splitted between different layers of texture, making it look more natural. By default, it's set to True. Can be turned of for faster processing.
|
490
|
+
|
491
|
+
- Skip drains - if enabled, the tool will not generate the drains and ditches on the map. By default, it's set to False. Use this if you don't need the drains on the map.
|
492
|
+
|
483
493
|
### Farmlands Advanced settings
|
484
494
|
|
485
495
|
- Farmlands margin - this value (in meters) will be applied to each farmland, making it bigger. You can use the value to adjust how much the farmland should be bigger than the actual field. By default, it's set to 3.
|
@@ -490,6 +500,18 @@ You can also apply some advanced settings to the map generation process. Note th
|
|
490
500
|
|
491
501
|
- Random plants - when adding decorative foliage, enabling this option will add different species of plants to the map. If unchecked only basic grass (smallDenseMix) will be added. Defaults to True.
|
492
502
|
|
503
|
+
### Background terrain Advanced settings
|
504
|
+
|
505
|
+
- Generate background - if enabled, the obj files for the background terrain will be generated. You can turn it off if you already have those files or don't need them. By default, it's set to True.
|
506
|
+
|
507
|
+
- Generate water - if enabled, the water planes obj files will be generated. You can turn it off if you already have those files or don't need them. By default, it's set to True.
|
508
|
+
|
509
|
+
- Resize factor - the factor by which the background terrain will be resized. It will be used as 1 / resize_factor while generating the models. Which means that the larger the value the more the terrain will be resized. The lowest value is 1, in this case background terrain will not be resized. Note, than low values will lead to long processing and enormous size of the obj files.
|
510
|
+
|
511
|
+
## Splines Advanced settings
|
512
|
+
|
513
|
+
- Splines density - number of points, which will be added (interpolate) between each pair of existing points. The higher the value, the denser the spline will be. It can smooth the splines, but high values can in opposite make the splines look unnatural.
|
514
|
+
|
493
515
|
## Resources
|
494
516
|
In this section, you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
|
495
517
|
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>
|
@@ -514,3 +536,8 @@ But also, I want to thank the people who helped me with the project in some way,
|
|
514
536
|
- [Ka5tis](https://github.com/Ka5tis) - for investigating the issue with a "spiky terrain" and finding a solution - changing the `DisplacementLayer` size to a higher value.
|
515
537
|
- [Kalderone](https://www.youtube.com/@Kalderone_FS22) - for useful feedback, suggestions, expert advice on the map-making process and highlihting some important settings in the Giants Editor.
|
516
538
|
- [OneSunnySunday](https://www.artstation.com/onesunnysunday) - for expert advice on Blender, help in processing background terrain, and compiling detailed tutorials on how to prepare the OBJ files for use in Giants Editor.
|
539
|
+
- [BFernaesds](https://github.com/BFernaesds) - for the manual tests of the app.
|
540
|
+
- [gamerdesigns](https://github.com/gamerdesigns) - for the manual tests of the app.
|
541
|
+
- [Tox3](https://github.com/Tox3) - for the manual tests of the app.
|
542
|
+
- [Lucandia](https://github.com/Lucandia) - for the awesome StreamLit [widget to preview STL files](https://github.com/Lucandia/streamlit_stl).
|
543
|
+
- [H4rdB4se](https://github.com/H4rdB4se) - for investigating the issue with custom OSM files and finding a proper way to work with the files in JOSM.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
maps4fs/__init__.py,sha256=LMzzORK3Q3OjXmmRJ03CpS2SMP6zTwKNnUUei3P7s40,300
|
2
|
+
maps4fs/logger.py,sha256=B-NEYpMjPAAqlV4VpfTi6nbBFnEABVtQOaYe6nMpidg,1489
|
3
|
+
maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
4
|
+
maps4fs/generator/background.py,sha256=ySABP9HLji8R0aXi1BwjUQtP2uDqZPkrlmugowa9Gkk,22836
|
5
|
+
maps4fs/generator/component.py,sha256=58UQgdR-7KlWHTfwLesNNK76BTRsiVngRa6B64OKjhc,20065
|
6
|
+
maps4fs/generator/config.py,sha256=0QmK052B8bxyHVhg3jzCORLfOBMMmqVfhhbqXKf6OMk,4383
|
7
|
+
maps4fs/generator/dem.py,sha256=MZf3ZjawJ977TxqB1q9nNpvPZUNwfmm2EaJDtVU-eCU,15939
|
8
|
+
maps4fs/generator/game.py,sha256=jjo7CTwHHSkRpeD_QgRXkhR_NxI09C4kMxz-nYOTM4A,7931
|
9
|
+
maps4fs/generator/grle.py,sha256=onhZovvRtireDfw7wEOL0CZmOmoVzRPY-R4TlvbOUMI,17561
|
10
|
+
maps4fs/generator/i3d.py,sha256=vbH7G0kDOGC6gbNDE-QYxMnKOMJ-vCGYdaKhWwci4ZU,23748
|
11
|
+
maps4fs/generator/map.py,sha256=JwrlUdjyvSYB82HfseJ6w2-ZDFwplyfPCn84Z5awdCY,11721
|
12
|
+
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
13
|
+
maps4fs/generator/texture.py,sha256=fZN0soGWk8-f3GuQWiwJ2yQTsmL9fLWVlgqeLI6ePi4,30648
|
14
|
+
maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
15
|
+
maps4fs/toolbox/background.py,sha256=9BXWNqs_n3HgqDiPztWylgYk_QM4YgBpe6_ZNQAWtSc,2154
|
16
|
+
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
17
|
+
maps4fs-1.4.1.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
18
|
+
maps4fs-1.4.1.dist-info/METADATA,sha256=GYS-0gCIT-DmBEL29mDjwQIcn-7t_XYYH05ObyMOQSc,32421
|
19
|
+
maps4fs-1.4.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
20
|
+
maps4fs-1.4.1.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
21
|
+
maps4fs-1.4.1.dist-info/RECORD,,
|
maps4fs-1.2.3.dist-info/RECORD
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
maps4fs/__init__.py,sha256=da4jmND2Ths9AffnkAKgzLHNkvKFOc_l21gJisPXqWY,155
|
2
|
-
maps4fs/logger.py,sha256=B-NEYpMjPAAqlV4VpfTi6nbBFnEABVtQOaYe6nMpidg,1489
|
3
|
-
maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
4
|
-
maps4fs/generator/background.py,sha256=fLWk7FSNL08gk3skHfi0iVchnKrYjnLLKAT1g_7sRzc,15907
|
5
|
-
maps4fs/generator/component.py,sha256=_d9rHmGh348KOMrLWR8rRDVsbZ2xwJQwZGIGvMIYXPM,17533
|
6
|
-
maps4fs/generator/config.py,sha256=b7qY0luC-_WM_c72Ohtlf4FrB37X5cALInbestSdUsw,4382
|
7
|
-
maps4fs/generator/dem.py,sha256=rc7ADzjvlZzStOqagsWW0Vrm9-X86aPpoR1RhBF_-OE,16025
|
8
|
-
maps4fs/generator/game.py,sha256=ZQeYzPzPB3CG41avdhNCyTZpHEeedqNBuAbNevTZuXg,7931
|
9
|
-
maps4fs/generator/grle.py,sha256=3hcr5e2YLXemFi-_x2cLHWbMVb06591k0PZxaBVovH8,17600
|
10
|
-
maps4fs/generator/i3d.py,sha256=oK5pKjzvT-gydma5Q6CcDYTVODGxK7MIGajLrAV9JkU,18370
|
11
|
-
maps4fs/generator/map.py,sha256=lA1MNAcMwsDtsYxbwwm7DjwP3zraHKnri_xnLUu30j0,5326
|
12
|
-
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
13
|
-
maps4fs/generator/texture.py,sha256=MSkM-rH_836l8zgq1WVcYJeYrUofWBpC8OKJglSmGGQ,26558
|
14
|
-
maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
15
|
-
maps4fs/toolbox/background.py,sha256=9BXWNqs_n3HgqDiPztWylgYk_QM4YgBpe6_ZNQAWtSc,2154
|
16
|
-
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
17
|
-
maps4fs-1.2.3.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
18
|
-
maps4fs-1.2.3.dist-info/METADATA,sha256=F3YcAPR8CA5160fvsWtnxEq3CtObEpiAG5B1DS6iSkg,29885
|
19
|
-
maps4fs-1.2.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
20
|
-
maps4fs-1.2.3.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
21
|
-
maps4fs-1.2.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|