'Yakuza Kiwami 2' set for Western launch on August 28th

The rise and rise (and rise) of ’Fortnite'

Building MMO landscape scenes

Landscapes have been a staple component of almost every MMO in recent memory. With the exception of some sci-fi titles, most MMOs take place on the land of some imagined island or continent. Some use stylised fantasy landscapes that run smoothly on even low-end computers while others have managed almost photo-realistic visuals at the cost of performance. But have you ever thought about what's going on behind the scenes in your favourite MMO? Most of us don't think about how the computer is actually drawing the terrain we run around on. We don't give much thought to the different ways each MMO renders the water in lakes, rivers and oceans. And just how does your computer render so many trees and plants without grinding to a halt? As part of my masters degree in computer science, I got to grips with a number of these techniques and found it a fascinating thing to learn about. Now when I play a new game or see MMO screenshots, I can't help but think about what the computer is doing in the background and how particular visual effects could have been achieved.

In this technical article, I talk about some of the components of an MMO landscape scene and a few of the techniques used in creating the graphics behind them.

Rendering the terrain:In most first person MMOs, terrain is the main component of a landscape scene. It's the ground on which everything else is placed, from trees and houses to monsters and player characters. The terrain can be stored on your hard drive in a variety of different formats and is loaded onto your graphics card as a vast grid of triangles. It could be stored as a series of 3D models but another popular way of storing terrain on the hard drive is to use a heightmap. This is a simple 2D image showing the height of the terrain at each point and is converted into a series of triangles to be drawn by your graphics card. Unfortunately, heightmaps can't store information about structures like jutting-out cliffs and overhangs. For those, cleverly shaped 3D models of terrain sections can be placed where required for a seamless effect.

Like everything else on-screen, the terrain must be drawn around 30-60 times per second to keep the motion looking fluid. As fast as computers are today, programmers still have to use a few tricks to keep something so huge rendering at that golden speed of 60 frames per second. They can use various "Level of Detail" strategies to reduce the number of triangles your graphics card has to draw and speed up the rendering process. Areas further from the camera or those partially obscured can be reduced in level of detail without much noticeable difference to the player and areas outside of view are simply not drawn. Using tricks like these, the terrain can be drawn very quickly but it often comes at the cost of visual quality. If you've ever seen the ground suddenly change shape or colour slightly in an MMO or if you've noticed the ground slowly warping as you approach it, this is the reason why.

Making the terrain look good:To create the landscapes we expect in an MMO, the ground needs to be textured with grass, rock, footpath tiles or any other material you'll expect to see on the ground. A standard technique that you'll probably recognise from any MMO is Multitexturing, where the ground is composed of two or more textures that are blended together. Each point on the terrain uses a percentage of the colour from each texture and so blends smoothly from one texture into another. A good example of this in an MMO is at a footpath where the ground transitions from a stone path texture into a grass one.

Lighting is a tricky issue that every game seems to tackle differently. For games designed to run on low-end machines, each triangle in the terrain can be simply lit based on its angle to the sun. If the sun doesn't move, the shadows can even be pre-calculated so your computer doesn't need to calculate lighting. It's not a very realistic approach but it's convincing enough that it's been used in MMOs like World of Warcraft and Runes of Magic. For games where the sun moves or the terrain is expected to cast realistic shadows on other objects in the scene, more complex lighting schemes are typically used. This comes at the cost of performance as complex lighting techniques require a lot of calculations per second.

Read on to part 2, where I look at the techniques used to create convincing water in an MMO and how they manage to draw so many trees and plants without the game grinding to a halt.