[9/50] The ground beneath your feet - Landscapes in Unreal (Part 2)

In the part 1 of this series, we looked at using Unreal Engine's in-built landscape tools to sculpt landscapes. In this part, we will take a look at using height-maps to generate beautiful landscape terrains.
A height-map is essentially a monochrome image which the engine interprets as height data - the White areas on the image map to relatively taller areas in the landscape compared to the Black ones (contrived).
A great technique to expedite the landscape building process is to use external tools to generate a base height-map that can be used inside Unreal. The base height-map for your Landscape can be rapidly created using tools like World Machine and Gaea. It can then be imported, fixed up, or altered using the editing tools in Unreal Editor to better fit the world and the intended game play.



After experimenting with some free Custom Height maps, we decided to integrate Gaea in our workflow to help achieve a logical landmass formation. Gaea includes not just geological formations but also complex simulations of erosion, snow, and rivers, rock tools, and one of the most complete texture generating packages in straightforward, understandable nodes that artists can use after a few minutes of playing around. You have complete control over the workflow thanks to its non-destructive nature and can repeat a formation and effortlessly create millions of variations.

One of the better features of Gaea is the Arboreal Node. It creates simulations for vegetation which can later be imported into Unreal as texture maps for foliage placement. Because Gaea is quite logic based and reflects real life terrain formation, vegetation growth on these are also quite logical. For example it simulates conifer trees only on land-forms where the slope is not too steep as roots fail to hold on to the land-form. This is not something you have to define- it will do it for you.
You can extract tree masks of these vegetation placements and use them on your landscape. You can also define if you want the vegetation to avoid water bodies or seek water-bodies, which is honestly pretty cool.

Key takeaway
For the sake of your sanity, use smaller map tiles. The bigger the map, the bigger the list of problems. One of the biggest issues we faced with this was not being able to build lighting on bigger terrains- you will need dynamic lighting which increases the lighting shader complexity. It also leads to lighting artifacts that can be very frustrating to get rid of. It can differ based on preference but for us we found a 5x5 tile map the most effective.

Landscape Seams and World Partition
Unless you are using world partition, seams can be a bit of a tricky situation. You have to be careful with the vista silhouette and need to strategically block the seam otherwise the player can see the edge of the tile. While there are many techniques to help with this issue the easiest and primary one is to not start the composition from the edge of the map. Leave sufficient space from the edge and the player start point to create an illusion of fake space and depth that the player cannot access. Further HDRI maps, Baked silhouettes or low poly sculpted terrains can be placed on the edges. Ideally try to avoid having extreme uneven edges that can cause seam blending problems, but if you do end up with an extreme edge like we did for one of our environments- placing low poly terrain is the easiest way to go.
However if you are using world partition, there's a bit of different workflow that can be integrated. This needs a blog post of its own.
All in all it is a trial and error method of work and you need to figure out what works best for you. One of our biggest problems using height map, which we realized sometime later in the process was not being able to use the water body engine provides with custom height maps. There will be a dedicated blog post on that later.