Updated: 20 March 2024

Genscape

1 Overview

For my final project at university I created a tool for the Unity game engine that generates a procedural terrain.

I hypothesised and successfully demonstrated the benefits of delegating heightmap and colourmap generation to the GPU as opposed to the CPU. This involved measuring the performance of their generation on the CPU vs GPU and comparing the results.

Notable features:

Languages:

To start with the tool generates two texture maps, a heightmap and a colourmap/splatmap.

The heightmap is a grayscale image, each pixel of which constitutes a single floating-point number between 0.0 and 1.0; such that 0.0 represents the lowest point on the terrain and 1.0, the highest point. The heightmap is used to elevate the vertices of a 3D mesh that represents the terrain as percieved in the game world.

The colourmap, or splatmap is used to paint multiple textures onto the terrain by exposing them through the intensity of each colour channel of the image. For instance the red, green, blue and alpha channels can each have an associated texture that they expose.

Through the splatmap, textures may be applied at varying heights and blended between one another. There is also an option to specify an additional texture that is applied according to the inclination of the terrain. This is useful for simulating rock faces.

2 User Interface

The tool includes a custom inspector and windows to make it easier for the end-user to change various settings and select textures.

Though the terrain was planned to support PBR textures, I didn't have time to write such a shader, thus only the albedo map for each material is applicable.

3 Gallery