Skip to content

Commit

Permalink
Precise tags feature and trees by leaf type
Browse files Browse the repository at this point in the history
* Precise tags feature. Trees by leaf type.

* ReadME update.

* ReadME update.

* Rollback.

* Check if tags are not None.

* Logging update.

* Logging update.

* Rotation fix.

* DTM errors update.
  • Loading branch information
iwatkot authored Feb 22, 2025
1 parent f95dc73 commit c70fa39
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 143 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ Let's have a closer look at the fields:
- `invisible` - set it to True for the textures, which should not be drawn in the files, but only to save the data in the JSON file (related to the previous field).
- `procedural` - is a list of corresponding files, that will be used for a procedural generation. For example: `"procedural": ["PG_meadow", "PG_acres"]` - means that the texture will be used for two procedural generation files: `masks/PG_meadow.png` and `masks/PG_acres.png`. Note, that the one procuderal name can be applied to multiple textures, in this case they will be merged into one mask.
- `border` - this value defines the border between the texture and the edge of the map. It's used to prevent the texture from being drawn on the edge of the map. The value is in pixels.
- `precise_tags` - can be used for more specific tags, for example instead of `"natural": "wood"` you can use `"leaf_type": "broadleaved"` to draw only broadleaved trees.
- `precise_usage` - the same as `usage`, but being used with `precise_tags`.

## Background terrain

Expand Down Expand Up @@ -625,6 +627,8 @@ You can also apply some advanced settings to the map generation process.<br>

- Use cache - if enabled, the tool will use the cached OSM data for generating the map. It's useful when you're generating the same map multiple times and don't want to download the OSM data each time. But if you've made some changes to the OSM data, you should disable this option to get the updated data. By default, it's set to True. This option has no effect when you're using the custom OSM file.

- Use precise tags - if enabled, the tool will use the precise tags from the texture schema and will ignore basic tags specified for the texture. In the default schema being used for specific types of forests: broadleaved, needleleaved, mixed, and so on. Note, that if it's enabled and the object does not have the precise tag, it will not be drawn on the map. By default, it's set to False.

### Splines Advanced settings

- 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.
Expand Down
18 changes: 16 additions & 2 deletions data/fs25-texture-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,33 @@
"name": "forestGrass",
"count": 2,
"tags": { "natural": ["wood", "tree_row"], "landuse": "forest" },
"precise_tags": { "leaf_type": "mixed" },
"width": 2,
"color": [11, 66, 0],
"usage": "forest",
"precise_usage": "mixed_forest",
"priority": 5,
"procedural": ["PG_forests"]
},
{
"name": "forestLeaves",
"count": 2
"count": 2,
"precise_tags": { "leaf_type": "broadleaved" },
"color": [11, 66, 0],
"priority": 5,
"usage": "forest",
"precise_usage": "broadleaved_forest",
"procedural": ["PG_forests"]
},
{
"name": "forestNeedels",
"count": 2
"count": 2,
"precise_tags": { "leaf_type": "needleleaved" },
"color": [11, 66, 0],
"priority": 5,
"usage": "forest",
"precise_usage": "needleleaved_forest",
"procedural": ["PG_forests"]
},
{
"name": "forestRockRoots",
Expand Down
Loading

0 comments on commit c70fa39

Please sign in to comment.