Added contour lines to buildings, additional tile completions textures.

This commit is contained in:
marstr 2024-09-02 15:15:16 +02:00
parent 66b8fabd8c
commit 7b932854a1
8 changed files with 10 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

@ -368,13 +368,19 @@ 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"): 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) amt = randrange(1,5)
for i in range(1, amt): 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") 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 ) 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 ) 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 # We now need to add the seamless border
layer.alpha_composite( brd_src ) layer.alpha_composite( brd_src )
mstr_msg("layergen", "Layer image completed") mstr_msg("layergen", "Layer image completed")
@ -647,3 +653,4 @@ class mstr_layergen:
# Store layer # 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" ) 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.") mstr_msg("layergen", "Layer image finalized and saved.")

View File

@ -182,3 +182,4 @@ class mstr_maskgen:
mask_img.save(mstr_datafolder + "_cache\\" + fstr + "_" + self._tag + "-" + self._value + ".png") mask_img.save(mstr_datafolder + "_cache\\" + fstr + "_" + self._tag + "-" + self._value + ".png")
# Inform # Inform
mstr_msg("maskgen", "Mask built.") mstr_msg("maskgen", "Mask built.")