]> marstr Code Repo - orthographic/commitdiff
Added contour lines to buildings, additional tile completions textures.
authormarstr <marcus@marstr.online>
Mon, 2 Sep 2024 13:15:16 +0000 (15:15 +0200)
committermarstr <marcus@marstr.online>
Mon, 2 Sep 2024 13:15:16 +0000 (15:15 +0200)
Textures/tile/completion/p10.png [new file with mode: 0644]
Textures/tile/completion/p11.png [new file with mode: 0644]
Textures/tile/completion/p12.png [new file with mode: 0644]
Textures/tile/completion/p13.png [new file with mode: 0644]
Textures/tile/completion/p8.png [new file with mode: 0644]
Textures/tile/completion/p9.png [new file with mode: 0644]
layergen.py
maskgen.py

diff --git a/Textures/tile/completion/p10.png b/Textures/tile/completion/p10.png
new file mode 100644 (file)
index 0000000..d5b0614
Binary files /dev/null and b/Textures/tile/completion/p10.png differ
diff --git a/Textures/tile/completion/p11.png b/Textures/tile/completion/p11.png
new file mode 100644 (file)
index 0000000..4077b51
Binary files /dev/null and b/Textures/tile/completion/p11.png differ
diff --git a/Textures/tile/completion/p12.png b/Textures/tile/completion/p12.png
new file mode 100644 (file)
index 0000000..22c3a8c
Binary files /dev/null and b/Textures/tile/completion/p12.png differ
diff --git a/Textures/tile/completion/p13.png b/Textures/tile/completion/p13.png
new file mode 100644 (file)
index 0000000..4517e3f
Binary files /dev/null and b/Textures/tile/completion/p13.png differ
diff --git a/Textures/tile/completion/p8.png b/Textures/tile/completion/p8.png
new file mode 100644 (file)
index 0000000..fa456c6
Binary files /dev/null and b/Textures/tile/completion/p8.png differ
diff --git a/Textures/tile/completion/p9.png b/Textures/tile/completion/p9.png
new file mode 100644 (file)
index 0000000..722aaf2
Binary files /dev/null and b/Textures/tile/completion/p9.png differ
index 194ec9d5f89092e708d02ba604218561b9f3e14d..bb805590ed81c310ce5cd79a643572e2c69e2369 100644 (file)
@@ -368,11 +368,17 @@ class mstr_layergen:
             if (self._tag == "landuse" and self._value == "meadow") or (self._tag == "natural" and self._value == "grassland") or (self._tag == "natural" and self._value == "heath"):
                 amt = randrange(1,5)
                 for i in range(1, amt):
-                    ptc = randrange(1, 7)
+                    ptc = randrange(1, 14)
                     img = Image.open(mstr_datafolder + "Textures\\tile\\completion\\p" + str(ptc)+".png")
                     lx = randrange( int(layer.width/20), layer.width - (int(layer.width/20)) - img.width ) 
                     ly = randrange( int(layer.width/20), layer.width - (int(layer.width/20)) - img.width )
-                    layer.alpha_composite( img, (lx, ly) ) 
+                    layer.alpha_composite( img, (lx, ly) )
+
+
+            # Let's do something nice with buildings
+            if self._tag == "building":
+                osm_edge = osm_edge.filter(ImageFilter.GaussianBlur(radius=3))
+                layer.alpha_composite(osm_edge)
 
 
             # We now need to add the seamless border
@@ -647,3 +653,4 @@ class mstr_layergen:
             # Store layer
             layer_comp.save( mstr_datafolder + "_cache\\" + str(self._latitude) + "-" + str(self._lat_number) + "_" + str(self._longitude) + "-" + str(self._lng_number) + "_" + self._tag + "-" + self._value + "_layer.png" )
             mstr_msg("layergen", "Layer image finalized and saved.")
+
index a31b2a8292ad2fb2b401a5afdca4614d09de2041..e1fbe22f860d232d6a591398c42e97ea98765156 100644 (file)
@@ -182,3 +182,4 @@ class mstr_maskgen:
         mask_img.save(mstr_datafolder + "_cache\\" + fstr + "_" + self._tag + "-" + self._value + ".png")
         # Inform
         mstr_msg("maskgen", "Mask built.")
+