From ed34dec4fa0aa37f59530743510cdb6da3293490 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Sun, 12 Apr 2020 17:26:37 +0200 Subject: [PATCH] Adjust number of octaves in function of map size --- terrain_rivers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terrain_rivers.py b/terrain_rivers.py index 032949a..3487658 100755 --- a/terrain_rivers.py +++ b/terrain_rivers.py @@ -22,7 +22,7 @@ n = np.zeros((mapsize, mapsize)) #micronoise_depth = 0.05 params = { - "octaves" : 8, + "octaves" : int(np.log2(mapsize)), "persistence" : 0.5, "lacunarity" : 2., }