Wiki

Clone wiki

WorldCreator / Advanced_Heightmaps

Advanced Heightmaps

If you haven't already checked out the Getting Started page you may want to complete that first.

Heightmaps in WorldCreator have 3 properties stored in the red, green and blue channels of the image.

Red Channel

This channel sets the upper height of the world. A value of 0 corresponds to no blocks. 255 corresponds to the block at 255. This is the channel you'll be using the most to define your terrain.

Green Channel

This channel sets the lower block limit of the world. A value of 0 means the blocks will start at the lowest block. A value greater than that of the red channel will cause no blocks to be created. This is useful if you want to create floating islands in the void, or have your world break away when players venture far enough out.

Blue Channel

This channel sets the water height of the world. A value of zero means no water will be placed. A value above the value of the red channel will cause water to be created above the solid terrain up to the height specified. This is useful for creating oceans, rivers, lakes etc. The water doesn't have to be a constant height either. You would probably want to maintain the same height though for individual water bodies.

Interesting terrain

The next few ections explain a couple of interesting terrain effects you can perform. I am using GIMP to generate these images, although you'll find similar tools in other image editors such as photosohp.

Perlin noise

This technique will generate some random height terrain. It consists of multiple steps, one of which is rendering Filters->Clouds->Solid noise in GIMP.

  1. Start with a 512x512 image, and set the background to white
  2. Go to Filters->Clouds->Solid noise. Play with these values until you get some nice looking noise
  3. Next open the Levels dialog and set the Green and Blue output levels to zero. We do this since we're not going to be using the lower height limit or water
  4. In the same dialog Adjust the output levels for the red channel to a suitable range. I chose 20 to 100 which will correspond to terrain with heights within this range. Your image should look something like this: perlin_source.png
  5. Save the file as heightmap_<x>_<z>.png where <x> and <z> are the x and z coordinates of the region you want to render.
  6. Regenerate the terrain to see your results. Here's what I got: perlin_result.png

Cliffs

This technique extends on from the Perlin Noise completed previously. It will generate terrain with a multi-level canyon type terrain.

  1. Open the image created from the Perlin Noise technique earlier
  2. Go to Colors->Posterise (Under filters in photoshop I believe). Choose an appropriate number of levels for your terrain
  3. If you're using photoshop you can also apply a blur between the levels. This will make the cliff edges no so sharp. To do the same in GIMP apply a gaussian blur to get a similar effect. You should end up with something like this: posterise_source.png
  4. Save and regenerate to see the results. You terrain should now look something like this: posterise_result.png

Updated