2. The Basics
Here’s a little info you’ll need to know about UE4’s capabilities. Some of it’s a little dull, but it will come in handy later.
GEOGRAPHIC DATA SUPPORT
UE4 doesn’t natively have the ability to read or use geographic data. It can read images (height map/masks etc.), but doesn’t allow you to import GIS (Geographic Information System) formatted files like ESRI Shapefile (.shp). The TerraForm plugin adds this capability.
The world is round, right? Wrong! Due to centrifugal force caused by the Earth’s rotation, its circumference is actually slightly larger at the equator than it is at the poles – it has an “equatorial bulge”. Mathematical equations that are used to try to account for this are known as “projections”. The origin (0,0 point) of a projection is known as its “datum”. Since over small distances the curvature of the Earth’s surface has minimal effect, it is reasonable to exclude its impact for small scale coordinate systems and therefore some local projections are in a Cartesian format.
The geographical position of a point on a sphere (or oblate spheroid) is stated in terms of angles (e.g. degrees latitude/longitude) and therefore GIS data may be stored in pixel values measured in degrees. Games engines like UE4 work in a Cartesian coordinate system with linear units for X, Y, and Z, axes (e.g. metres or inches). GIS software provides fairly simple methods for ‘reprojecting’ GIS data from spherical to Cartesian coordinate systems.
FLOATING POINT PRECISION
Whilst the term sounds complicated, it’s actually fairly straightforward. It refers to the number of bits of data used to define a value (e.g. a distance in metres). Single floating point precision gives you 32-bits to specify a value; double floating point gives you 64-bits.
Over small distances, the rounding errors of 32-bit are minimal and not a problem. Over large distances, they cause more significant issues. UE4 supports single floating point precision only, so you either need to specify a relatively small terrain size, or use a work-around (e.g. ‘Enable World Origin Rebasing’). We’re working with a relatively small area, so this won’t be a problem.
UE4’s origins are in first person shooter games where the environment maps/terrains are generally small, but highly detailed and realistic. As a result, the engine is most at home rendering smaller terrains.
Recent developments add landscape tile streaming and tiled data import. This capability is still in its infancy, so initially we’ll focus on creating a real world landscape using single tile source data.
Landscapes in UE4 are measured in ‘quads’, ‘sections’ and ‘components’. Further information can be found in UE4’s Landscape Technical Guide.
Pixel dimensions are not restricted by UE4, but there are practical rendering limits caused by its single floating point precision (see above). We’re going for a high resolution terrain, so we’ll define our pixel size as 1m/pixel and we’ll create a landscape approximately 3.2km by 2.6km. (With TerraForm, you can create rectangular as well as square landscapes in UE4.)