Vector Line Source Data
As with DTM data, TerraForm requires that you do a little work to prepare your GIS vector line data before importing it as landscape splines into UE4. The processes to meet the specifications are very straightforward, but necessary to ensure you achieve the best results in UE4. We’ve created Step-by-Step Tutorials to show you how to prepare data (using the open source QGIS software). You can find them here: Tutorials.
In time, we’ll add further functionality into the TerraForm tools to automate the process of preparing your data for UE4, such as supporting more data formats, re-projecting data in different projections, and editing spline control point spacing (among other things).
TerraForm initially supports only GIS vector line data in ESRI Shapefile (.shp) format. This is the most common (industry standard) vector line format and all GIS software can export it.
Your vector line data can be stored in any projection/datum combination – TerraForm will re-project your data to same projection as your DTM data when you import it.
TerraForm will set the height value of each control point along your spline to the altitude of the landscape onto which it is imported. If the vector line data is exactly the same extent as the DTM (or larger), it’s possible there will be no landscape underneath the spline control point and height values will default to zero. For this reason we recommend you export your GIS vector line data to an area slightly smaller (by at least one source pixel dimension) than your DTM data.
The number of points in your GIS vector line data directly affects how the spline is applied to the terrain, and how the spline mesh is applied to the spline.
Too Few Data Points
If your data is too sparse (there are too few vertices in your vector line), the height calculation for each control point will be spaced too far apart and your landscape’s terrain may vary considerably in between:
This is problematic because when you deform the landscape to meet your spline, you may create ridges or cut channels that look unrealistic (see below).
Too Many Data Points
UE4 uses tangents to determine the distribution of the spline mesh along the landscape spline segments. If your data points are too close together (data is too dense), these tangents are squashed and your spline meshes will be squashed too.
As a general rule, the spline points should be spaced at least 1.5x the length of the spline mesh you intend to use.
Scale vs Data Volume
It’s easily possible to overload UE4 system resources with GIS data, so you need to be mindful to optimise as much as possible. If you’re building a very large area, you won’t be able to use very detailed line vectors – there will simply be too many data points for UE4 to handle. You may need to iterate the process of refining and importing vectors to get the best balance between performance, detail and accuracy.
Multi-Part Vector Lines
GIS vector line data can be single-part or multi-part – the difference being that multi-part line vectors are the considered the same line, but aren’t connected. UE4 uses a single spline for each line and doesn’t understand multi-part line vectors – it will crash if you try to import them. Make sure to convert multi-part vector lines to single-part before importing into Unreal.
We’re not currently reading attributes in vector line Shapefiles, but we are working towards support for this. Reading/using attributes in shapefiles will allow you to, for example, automatically set different width values at each control point along the length of your river, or import a shapefile containing many different types of roads and assign different meshes/width options to each spline.