Monat: Feber 2017

Terrain Generator For Unity – Step 6

In this step we will create the ground textures, also called „splat maps“. Unity stores the information about ground textures in a three-dimensional float array. The first two dimensions are the coordinates (x, y), the third dimension is the index of the texture that is to be used at that position. The index refers to the…


Terrain Generator For Unity – Step 5

In this step we will tweak the height map a bit to make it look more realistic. First of all we will add a water layer. We will also post process the height map so that areas close to water are made more flat (like beaches or riversides) and mountain areas are made higher to…


Terrain Generator For Unity – Step 4

In this step we will make the terrain generator more customizable. Instead of changing values in the source code we would like to change values in the editor. Fortunately Unity makes it easy to add fields to the inspector of the script, simply by making fields public. 1 We actually have four variables that are…


Terrain Generator For Unity – Step 3

In this step we will add some more detail to the terrain. What we have now is the basis but it lacks variation. We will do this by adding more layers of perlin noise to the existing layer. Furthermore the height map will be normalized before passing it to Unity. 1 Add another height variable…