Terrain edge fading

Add comment!

February 17th, 2009

While the terrain in Overgrowth is quite large, the view distance can be even larger. On a clear day, you can see all the way from one corner of the terrain to the opposite corner. While this allows us to show impressive vistas (like those in our alpha trailer), it also means that you can often see the edge of the terrain. We found that the sharp edge of the terrain really hurt the impression of being in a real place. Here are some examples of the edge of the terrain:

Desert hard edge

Canyon hard edge

There are many options to solve this problem. Some common solutions are to make each level into a small island, make the terrain much bigger, obstruct the edges with trees or mountains, or funnel the player through a series of canyons and set pieces. However, all of these options would either restrict our creative control, or greatly add to our development time and system requirements. For now we decided to automatically fade out the terrain around the edges to create a smoother transition to the cube map terrain. Here is an example of one the faded textures:

Terrain edge fade

There is still a noticeable 'end' to the terrain in each area, but it is much more subtle than the hard line we originally had. Here are the same views as above, with the new faded edges:

Desert soft edge

Canyon soft edge

I used a much more extreme version of this effect in Lugaru to give the effect of a long view-distance. I created a skybox of a very high-detail terrain, and then instead of using the OpenGL colored fog effect, I created a 'transparent fog' effect by manually changing the terrain vertex alpha values every frame. Here is what Lugaru 1 looks like with normal fog and with transparent fog.

Fog

Transparent fog

I think this was a very successful effect! It gave the smooth framerate of a close view-distance without feeling claustrophobic or oppressive. Since the game was based around close-quarters fighting, I don't think it really mattered that you couldn't actually see for miles.