GAN generated heightmaps

A StyleGAN2 trained to generate heightmaps from North America

As part of a class project for my Procedural Content Generation class in Fall 2020, I developed a system for realtime heightmap generation within a game engine. My tool has these components:

  1. 1. A trained StyleGAN2 that has learned to synthesis realistic looking heightmaps based on North American heightmaps. Each heightmap is 128x128 pixels, and represents roughly 1536 arcseconds, or roughly 50km in each direction.
  2. 2. A python server to serve endpoints to interact with the trained model
  3. 3. A set of unity scripts to (a) allow the user to specify "rules" about what their heightmap should look like, (b) issue requests to the server, and (c) update a heightmap in realtime.

With this tool, designers can query a GAN to find a desired heightmap. This can reduce the time it takes to get a working copy of a heightmap to prototype levels and game mechanics.

Clicking the button below will query the same trained GAN to generate a realistic looking heightmap. The code for this project can be found at here.