Book Image

Building Levels in Unity

By : Volodymyr Gerasimov
Book Image

Building Levels in Unity

By: Volodymyr Gerasimov

Overview of this book

Table of Contents (17 chapters)
Building Levels in Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Dealing with Basic Animations
Index

Creating the terrain using heightmaps


Scale is one of the most common issues that designers face when dealing with terrain for the first time. The process of fixing the scale can lead to a lot of frustration, and to re-edit large parts of the terrain, you can't simply shrink or extend selected areas with the default toolset; you have to manually redraw them. Thankfully, there is an easy way to get close to what we want in the first attempt, and that's by using heightmaps.

Heightmaps work in the same way as brushes; the engine interprets the grayscale colors as elevation data and applies it to the terrain. They can be easily created with any app that supports exporting in the .raw format (such as GIMP and Photoshop).

To increase our precision with the heightmap, we could take a top-down screenshot of the greyblock level and use the location of the placed primitives as reference points while drawing.

Let's look at how to create our own heightmaps using GIMP 2.

Drawing a heightmap

Start by creating...