1. Cleared Hot
  2. News
  3. Choosing a Terrain System

Choosing a Terrain System

Welcome back, devoted wishlisters. Thank you for taking part on this journey with me. Today we will cover a truly groundbreaking topic. The ground. Sorry for the pun.

Most games that take place in outdoor landscapes use something called a Terrain System. It's a way to describe and create the landscape in the level. I've been using a low-poly terrain system since the prototype days of my game, but I'm ready to build more levels and I needed to explore my options.

The weeks after GDC I went fully down a terrain rabbithole and evaluated all the major options inside of Unity. After a couple weeks of this, I was a bit frazzled.

The Gang Picks a Terrain System


[h2]WTF Is a Terrain[/h2]
In most games, the "ground" is not created the same way buildings or objects are. Rather than creating it in a 3d tool, like Blender, it's created in Unity, by using a terrain tool.

Most of these terrain tools use what's called a Height Map- an image where each pixel color (or brightness) represents height. So you can use a 2d image to form a 3d landscape. There are often tools to sculpt the terrain inside Unity, so you can quickly make changes when you're designing your levels.

With most of these you can actually "draw" onto the terrain. By drawing on the heightmap, you're raising and lowering the terrain.



You can also apply "stamps" to the heightmap, which is helpful for laying down standard mountains or valleys.



But again, the heightmaps are represented by images. For example, this one is a heightmap stamp of a mountain ridge.



[h2]Pick One[/h2]
There are tons of terrain systems you can use in Unity. Here are the assets I evaluated:
  • Unity Terrain (the built in system). Overall okay but low on features and not very performant
  • Polaris Low-Poly Terrain - a low poly specific terrain asset, faster performance in-game.
  • Gaia - A fully featured terrain system for big worlds and realistic terrain
  • Microsplat / Microverse - A better shader and generator for terrain.

What do I actually want from a Terrain System? My requirements are:
  • Has a Low-Poly workflow, in order to fit the style of the game
  • Fast performance in-game.
  • Options for procedurally generating terrain in the editor (not in-game)
  • Procedural placement of vegetation
  • Level design tools- able to flatten terrain and place prefabs, roads, etc.

After exploring my options I decided to stick with the Polaris low-poly terrain, since they recently released some level generation features.

[h2]Procedural Generation [/h2]
Since we're using a heightmap image to create the terrain, our procedural generation system must create some kind of an image as well. To do this, we link together nodes that either create or modify the terrain heightmap in some way.

To start with a simple example, here is what happens when we take two sources of "noise" and combine them to form a bumpy ground.



[h2]What Do We Want? [/h2]
After playing with this for a bit, I realized I should put a helicopter on the terrain, put some enemies, and actually play on it. This sounds so simple and dumb but it immediately made a few things clear:

  1. Rolling terrain sucks because an isometric camera doesn't show depth well.
  2. It's had to land on areas that aren't flat.
  3. NPCs and vehicles need to traverse the map and complicated features make that hard.
  4. You can't actually see any mountains in the distance because of the isometric view (duh).
  5. When enemy trucks and cars launch off hills it's really cool.

Given this, I realized the most "fun" terrain is one that is:
  1. Is really clearly either flat or not flat.
  2. The height changes happen at discrete intervals so you know if you can fly over them or not
  3. If height changes are "rampy" then cars will fly off them and npcs can still walk up them.

Now that I had some goals, I started building out a node graph that would generate our ideal terrain.

The resulting node graph.

Each major step of procedural generation.

Add in some vegetation...

The final product, with texturing based on slope.

[h2]Shoot Stuff Check[/h2]
Does it feel right when you're shooting stuff?



Yes.

[h2]Thank You[/h2]
As always, thank you all for your support! I can't wait to share more of what we've been working on. Stay tuned!

If you want to keep up to date, join the email list: https://clearedhotgame.com/email-list/