Commit Graph

  • ecd2c7d3f9 Completely change flow routing algorithm, use a local flow calculation, determine depressions, and link them using a minimum spanning tree (Boruvka's algorithm). This is based on a paper by Cordonnier et al, 2019. Gael-de-Sailly 2020-12-04 01:03:03 +01:00
  • 40098d6be3 Use standard int instead of uint8, int32, etc. Much faster with NumPy. Gael-de-Sailly 2020-12-03 23:30:57 +01:00
  • faef1658a9 Fixed map centering, and converted polygon coordinates to map nodes instead of grid nodes. Gael-de-Sailly 2020-12-22 16:38:30 +01:00
  • d5cf4a6267 Optionally center the map around x=0 z=0 Gael-de-Sailly 2020-12-20 22:28:54 +01:00
  • 53f88d337d Protect map preview from exceptions Since map preview is optional, an exception should not propagate to terrain calculation, so print an error message + traceback but keep the script running. Gael-de-Sailly 2020-11-25 13:12:24 +01:00
  • 3644965842 Fix bool settings being improperly loaded as strings Gael-de-Sailly 2020-11-17 20:56:02 +01:00
  • 9725979363 Fix increments for argument parsing Gael-de-Sailly 2020-11-17 20:45:11 +01:00
  • ebacd3cdd4 Add license, update/improve documentation Gael-de-Sailly 2020-11-15 11:43:30 +01:00
  • fc0a158385 Disable glaciers by default Gael-de-Sailly 2020-11-15 11:26:50 +01:00
  • 050ca3b779 Change demo data, update to a grid using new default parameters Gael-de-Sailly 2020-11-15 11:19:28 +01:00
  • 1f41423104 Print a clear message when grid is ready Also use plt.pause before plotting, ensuring plot is updated in real time Gael-de-Sailly 2020-11-15 11:13:42 +01:00
  • 52766e8918 Added settingtypes Gael-de-Sailly 2020-11-15 11:10:19 +01:00
  • 28c674d57c Decrease default diffusion factor Gael-de-Sailly 2020-11-14 19:14:09 +01:00
  • 90f60ea6fb typo Gael-de-Sailly 2020-11-14 19:13:58 +01:00
  • 803114aaab Generate data in river_data instead of data Gael-de-Sailly 2020-11-14 19:12:12 +01:00
  • 9594a79f8b Configurable output directory Now relative to the directory the script is *run in*. Gael-de-Sailly 2020-11-14 18:26:13 +01:00
  • d93234c9b7 Moved Python files inside a folder (package), except the 2 that are directly executable Gael-de-Sailly 2020-11-14 16:10:32 +01:00
  • 7acd0af550 Use biomegen.generate_all Gael-de-Sailly 2020-11-11 13:58:23 +01:00
  • 3792cd5dc8 Added support for biomegen mod Gael-de-Sailly 2020-11-10 13:25:04 +01:00
  • 6b9c091dd5 Fix file opening mode on the Lua side, to avoid crashes on Windows Gael-de-Sailly 2020-11-14 17:31:36 +01:00
  • b90cecdaf7 Allow command-line options for Python processing Gael-de-Sailly 2020-11-14 14:30:36 +01:00
  • c33f2d9582 Python side: rework config system. Load terrain.conf of the script directory by default. Add a terrain_higher.conf for alternative terrain. Gael-de-Sailly 2020-11-14 12:19:40 +01:00
  • 8a15bc924d Dynamic map displaying Map is displayed at every iteration if matplotlib library is installed Gael-de-Sailly 2020-11-14 12:05:52 +01:00
  • 3fda369fb5 Rewritten map viewer Now displays map statistics even if there is no matplotlib Gael-de-Sailly 2020-11-13 11:04:27 +01:00
  • 0a1c08648d Use biomegen.generate_all biomegen Gael-de-Sailly 2020-11-11 13:58:23 +01:00
  • 290b998735 Added support for biomegen mod Gael-de-Sailly 2020-11-10 13:25:04 +01:00
  • 30136bf60a Added scale (blocksize) parameter for view_map.py Gael-de-Sailly 2020-11-10 13:19:20 +01:00
  • 9475b49b8d Removed duplicate calls to 2 scripts Gael-de-Sailly 2020-11-10 13:18:02 +01:00
  • 36b49a7fe2 Add settings for parameters in terrain_rivers.py Gael-de-Sailly 2020-05-30 12:03:34 +02:00
  • 103cd49d78 Optionally disable distorsion by setting 'mapgen_rivers_distort = false' in minetest.conf Gaël de Sailly 2020-07-21 14:01:29 +02:00
  • 25c5cb2e1f Reverse axes order for heightmaps (iterate in Z direction first instead of X) Gaël de Sailly 2020-07-21 12:46:23 +02:00
  • 6f43430574 Added glaciers, and re-organized noise definitions horznoise Gael-de-Sailly 2020-05-24 11:38:47 +02:00
  • 625768f967 Added snow and ice in function of temperature. Uses noise parameters of builtin biomegen Gael-de-Sailly 2020-05-23 18:13:00 +02:00
  • 4edd1a946e Horizontal shifting according to 3D noises: makes slopes more irregular and natural-looking, allows overhanging. This is done by generating an intermediate 2D elevation map and, for each node in 3D, add a 2D offset vector to the position, and seek this position on the heightmap. Gael-de-Sailly 2020-05-23 15:52:16 +02:00
  • f56857e804 Fix water not being set at lower chunk borders Gael-de-Sailly 2020-05-08 10:02:04 +02:00
  • a73a0dd80b Avoid some redundant calculation on corners (not very significant, but why not) Gael-de-Sailly 2020-04-27 21:08:15 +02:00
  • a9ab0e53d3 Change folder structure: data files are now in a directory. Also added a demo 400x400 map, that is overriden on pre-processing. Gael-de-Sailly 2020-04-26 23:29:36 +02:00
  • b429b302e1 Rewritten part of code to calculate river depth Fixes bathymetry problems on turns or confluences, as well as abrupt riverbanks. Gaël de Sailly 2020-04-26 22:19:05 +02:00
  • cd4b517585 terrain_rivers.py: mapsize is now the number of intervals instead of the number of nodes. Gael-de-Sailly 2020-04-26 19:51:21 +02:00
  • cd90a21df4 Enhanced visualization code to display colormaps, and reuse the same code for initial and further viewing, in view_map.py Gael-de-Sailly 2020-04-26 18:30:29 +02:00
  • 206c68813e Switch again to using river direction and flux instead of table of bounds Gael-de-Sailly 2020-04-26 18:10:23 +02:00
  • 6af6795d90 Comment and clarify Gael-de-Sailly 2020-04-26 17:13:38 +02:00
  • 49bc397718 Fix parameters for Simplex noise, to make sure the last octave has not a greater scale than 1 Also use a 401x401 grid instead of 400, so that there are 400 intervals Gael-de-Sailly 2020-04-26 16:52:40 +02:00
  • 9700e948b9 Position should be strictly beyond river threshold to be a river Prevents some wrongly placed water pixels. Gael-de-Sailly 2020-04-14 21:54:05 +02:00
  • 55725ad94b Re-organized the code. All polygon-related calculations go to polygons.lua. Gael-de-Sailly 2020-04-14 21:11:54 +02:00
  • 43211fc31b Removed useless functions get_point_location and geometry.area Gael-de-Sailly 2020-04-14 20:22:13 +02:00
  • 14163681cc Use settings from minetest.conf settings Gael-de-Sailly 2020-04-14 17:53:36 +02:00
  • af7a7ce26d Compress data files (reduces size by a factor 3-4) Gael-de-Sailly 2020-04-13 15:59:34 +02:00
  • da98a538bb Draw outer corners of river turns. Gael-de-Sailly 2020-04-13 15:01:54 +02:00
  • b5db63d267 Re-added river flow data because needed for map preview Gael-de-Sailly 2020-04-13 13:45:52 +02:00
  • 1adb4fbece Added an offset of 0.5 on terrain elevation This prevents rounding errors and improves interpolation on nearly flat areas variable_width Gael-de-Sailly 2020-04-13 12:27:24 +02:00
  • 13d3e70b66 Implemented variable river width. Also changed the river data exported by terrain_rivers.py. They will not be compatible with what's generated by older versions. Gael-de-Sailly 2020-04-13 12:15:10 +02:00
  • 4b63ed371e Add more information in the polygon table Gael-de-Sailly 2020-04-13 10:31:38 +02:00
  • eba90803fe Removed useless debug print Gael-de-Sailly 2020-04-13 10:01:23 +02:00
  • 34de4269ee Add directly a reference to the polygon table in the polygon list, instead of adding an index Gael-de-Sailly 2020-04-13 09:54:04 +02:00
  • 4e8288afbe Added screenshot in README Gael-de-Sailly 2020-04-12 18:17:57 +02:00
  • 56cebecb13 More robust and faster code for grid twisting on the Lua side. At chunkgen init, build a list of the polygons instead of calculating them for every node. Gael-de-Sailly 2020-04-12 16:42:03 +02:00
  • b7c6f71635 Implemented grid twisting. Still many possible bugs, potentially clumsy implementation, but it seems to work. Gael-de-Sailly 2020-04-12 09:40:10 +02:00
  • 6314117642 Added bounds.py: twists the grid as if the rivers were elastic bounds. Unused for now. Gael-de-Sailly 2020-04-11 14:29:39 +02:00
  • 4772cddf39 Added screenshot in README twist Gael-de-Sailly 2020-04-12 18:17:57 +02:00
  • ed34dec4fa Adjust number of octaves in function of map size Gael-de-Sailly 2020-04-12 17:26:37 +02:00
  • 538bfb6d6d Added script to view map, using matplotlib Gael-de-Sailly 2020-04-12 16:44:29 +02:00
  • 30cbc14302 More robust and faster code for grid twisting on the Lua side. At chunkgen init, build a list of the polygons instead of calculating them for every node. Gael-de-Sailly 2020-04-12 16:42:03 +02:00
  • e227755531 Implemented grid twisting. Still many possible bugs, potentially clumsy implementation, but it seems to work. Gael-de-Sailly 2020-04-12 09:40:10 +02:00
  • c8139de6d7 Added bounds.py: twists the grid as if the rivers were elastic bounds. Unused for now. Gael-de-Sailly 2020-04-11 14:29:39 +02:00
  • ecba126983 Add a small random number to DEM when calculating flow direction, to smooth flat areas Gael-de-Sailly 2020-04-11 14:27:56 +02:00
  • 8b78f6c5b4 Implemented isostatic rebound: loss of weight due to erosion will compensate at regional scale Gael-de-Sailly 2020-04-10 19:37:27 +02:00
  • 6752ffa91d Added README Gael-de-Sailly 2020-04-10 17:29:32 +02:00
  • 0bf351b2f6 Initial commit: working example using a basis of Simplex noise and implementing river flowing, lakes, and erosion Gael-de-Sailly 2020-04-09 21:13:38 +02:00