How to create Terrain like in Civiliazation 5


so I really could need a little kickstart on this. What I am trying to do, is ti create a terrain for a hex based game like Civilization.
I have seen some threads in these forums, where ppl made Hex based terrains that use separate meshes for each hex tile. However, in Civ 5 for example, the terrain seem to be made in one piece. Coastlines, mountains and all this stuff, seem to be very fluid and naturally looking, like the whole terrain is made in one piece. If you were to remove the hex grid overlay, you would even have a hard time realizing that this terrain is actually hex based to begin with. Now as we know, these maps are procedurally generated. I just wonder how it is done. Is it composed of single meshes or is the terrain procedurally generated. But then, how do they achieve this natural look and feel? If it is all meshes, how do you manage to blend them all together this well?

My guess is they would do something similar to Minecraft to define separate areas using ‘biomes’ and within those areas generate those hex based meshes as you described. Only using the specific biome set. (hills, tundra, etc)

You might find this intresting. From the looks of it, it seems like what HaxO said, is correct

Good to see another Civ developer! The genre really needs more attention from all angles. What is the idea behind your project?

I wish Firaxis had spent half as much time on the map algorithms as they did on making the existing terrain pretty… :stuck_out_tongue:

If Epic ever makes the landscape system procedurally accessible from blueprint I might see what I can do to use my map information to carve into a planet.

I was about to post link to Zeustiak Map Generator 3.0.

Well the idea is to make a mix of Civlization, Warhammer 40k and Lord of the Rings. No details yet, since I am struggeling right now to get the terrain rendered.

I managed to get a basic mesh that renders my Hex field, basically in any size I want. Now I want to texture it, but I dont know what a good approach would be here. Can I use a single Material that contains layered texture? And if so, how do i tell the material which hex needs to get which texture?

The brute force approach is to have a texture type for each hex biome type, then a second texture for a hex border between two biomes based on the type of each hex. You can see it somewhat in this screenshot in the lower left. There’s a green grass hex with a forest to the left. Above it is wetlands, also with a forest to the left. The forest texture between the hexes is very similar for both positions.

My knowledge on textures and materials is unfortunately pretty basic. I do know I saw some multi-layered textures/materials in one of the content examples that looked amazing, but also performance expensive.

In addition to the multi-layered materials, you might take a look at decals and see if you can find a way to use them for your tiles. Maybe decal the tile, then decal the space between the tiles.

Well the problem with the layered materials in the examples i found, is that they are somehow tied to the landscape system of UE. What I have now, is currently one single mesh, that displays my whole terrain. What I need is a material that I can feed information about the hex grid and the corresponding texture that should be displayed on that hex. I have found some examples of layered materials. What I need now is probably to preocedurally generate a mask per texture, that is rendered into an image which is then fed into the material as a mask. But I dont know how that works.

if your mesh is dense enough you could use vertex color for the masks and interpolate the edges of that mask with noise textures to get interesting transitions.

I saw some layered materials that I am pretty sure were only a simple mesh. There might have been a decal version too, but it has been awhile since I have been in there.

First try and change the mask during runtime using blueprint period. If you can do that, tying your map into it should be the easy part.