GithubHelp home page GithubHelp logo

wgen's Introduction

WGEN - a simple heightmap generator

There are a lot of great terrain generators out there but most of them have a free version with a terrain size limitation.

This is a much simpler generator, but it can export maps as big as you want.

Continent example, using a rough hill pattern and a high frequency FBM : continent example

Island example, using mid-point deplacement algorithm : island example

Smoother landscape using only hills generator : hills example

Exemple of (untextured) 4K x 4K landscape imported in Unreal Engine 5 : UE5 example

If you like this project and want to support its development, feel free to donate at Donate

Manual

Generators

This is where you control the world generation. You can stack several "generators" that applies some modification to the heightmap. Select the generator with the dropdown button, then press New step button to add it to the stack. You can click on a step label in the stack to select it and display its parameters. Click the Refresh button once you changed the parameters values to recompute the heightmap from this step.

Generators UI

The current version features those generators :

  • Hills : superposition of hemispheric hills to generate a smooth terrain
  • Fbm : fractal brownian motion can be used to add noise to an existing terrain or as first step to generate a continent-like terrain.
  • MidPoint : square-diamond mid-point deplacement generates a realistic looking heightmap
  • Normalize : scales the heightmap back to the range 0.0..1.0. Some generators work better with a normalized heightmap. Check your heightmap values range in the 2D preview.
  • LandMass : scale the terrain so that a defined proportion is above a defined water level. Also applies a x^3 curve above water level to have a nice plain/mountain ratio
  • MudSlide : smoothen the terrain by simulating earth sliding along slopes
  • WaterErosion : carves rivers by simulating rain drops dragging earth along slopes
  • Island : lower the altitude along the borders of the map

Masks

You can add a mask to a generator step by clicking the square next to the generator name. You can then edit the mask using a painting brush. The generator effect will be scaled depending on the mask color. Masks UI

Terrain preview

You have a 2D preview displaying the heightmap (at current selected step in the generators UI). You can change the preview heightmap size from 64x64 for very fast computation to 512x512 for a more precise visualization. If live preview button is checked, the 2D preview will be updated at every step during computation.

3D preview UI

You also have a 3D preview displaying the final 3D mesh. The mesh uses the same resolution as the 2D preview. You can change the view by dragging the mouse cursor in the view :

  • rotate the terrain with left button
  • zoom with middle button
  • pan with right button

You can also display a water plane with configurable height and a grid to help visualize the terrain.

3D preview UI

Save/Load project

Here you can save the current generator configuration (all the steps with their parameters) in a plain text file using RON format. You can also load a previously saved project, erasing the current configuration.

Save project UI

Exporter

You can export the resulting heightmap as a single PNG file or several tiled files using this panel.

Export UI

File names will be generated using _x?_y? pattern, for example for 2x2 tiles :

  • ..._x0_y0.png
  • ..._x1_y0.png
  • ..._x0_y1.png
  • ..._x1_y1.png

wgen's People

Contributors

jice-nospam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.