From: marstr Date: Mon, 2 Sep 2024 13:15:16 +0000 (+0200) Subject: Added contour lines to buildings, additional tile completions textures. X-Git-Url: https://marstr.online/code/gitweb.cgi?a=commitdiff_plain;h=7b932854a19ad21825d9656bab850dff41296138;p=orthographic Added contour lines to buildings, additional tile completions textures. --- diff --git a/Textures/tile/completion/p10.png b/Textures/tile/completion/p10.png new file mode 100644 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 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 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 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 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 index 0000000..722aaf2 Binary files /dev/null and b/Textures/tile/completion/p9.png differ diff --git a/layergen.py b/layergen.py index 194ec9d..bb80559 100644 --- a/layergen.py +++ b/layergen.py @@ -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.") + diff --git a/maskgen.py b/maskgen.py index a31b2a8..e1fbe22 100644 --- a/maskgen.py +++ b/maskgen.py @@ -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.") +