Ivruix / WGen

Heightmap generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WGen

This is an implementation of algorithm similar to the diamond-square algorithm, that can generate natural-looking heightmaps.

Installation

You can download this repo and then install required libraries by running this command in the project directory:

pip3 install -r requirements.txt

Usage

To generate new image, run this command in project directory:

python generate.py [iterations] [smoothness]
  • iterations - number of iterations. After each iteration image size is roughly doubled.
  • smoothness - smoothing factor. The bigger it is, the smoother the end picture.

After running this command, the generated.png file should appear in the working directory.

Examples

  • python generate.py 10 1.5 - generates 1025x1025 image.

  • python generate.py 10 10

  • python generate.py 10 0.9

License

MIT

About

Heightmap generator

License:MIT License


Languages

Language:Python 100.0%