Wednesday, 6 April 2011

Dissertation: Introduction

1. Introduction

Realism is a big issue in the games industry today, graphical realism in particular. Video games have evolved greatly over the past thirty or so years, from pixelated sprites and electronic blips to fully 3D interactive worlds. And as games get more and more realistic, the graphical expectations of the consumers are getting higher and higher. At the same time however, these gamers also want better performance – high frame-rates and fast loading times. So there is a lot of pressure on the industry to develop graphical techniques that look good without sacrificing performance.

When it comes to adding realism to 3D games, graphical elements such as lighting and shadows are at the forefront. Without the definition that lighting, whether it be point, spot, or directional, provides, 3D objects look flat and unrealistic. Shadows are also important in that they provide visual clues to the spatial relationships between object in the 3D scene. [Drettakis and Stamminger, 2002] The simulation of these effects – the effects of direct lighting – is standard practice in today’s computer games, using the Lambertian and Blinn models. [Filion, 2010] With that in mind, the next step along the path to realism is the simulation of indirect lighting, i.e. global illumination and ambient occlusion.  

“In reality, a significant amount of light in a scene comes from light reflecting from surfaces.” [Akenine-Moller and Haines, 2002, p277] Without simulating this reflected light, parts of the scene not directly affected by light sources would be left in complete darkness, which is not the case in real life. [Boonekamp, 2010] Global illumination (GI) calculations differ from direct illumination in that they use data gathered from surrounding objects to determine the lighting at a particular point, as opposed to needing only the surface data of that point. GI techniques simulate the ambient effects caused by light bouncing off of diffuse surfaces and around a scene, adding extra depth and definition to said scene. Unfortunately, such techniques i.e. ray tracing and radiosity, are computationally expensive and therefore not viable for use in real-time applications such as computer games. This means that other ways of producing similar effects must be found, that do not require so much processing power. Ambient occlusion is one such technique.

Ambient Occlusion (AO) is a subset of global illumination and the effect that it produces is produced automatically by techniques such as ray tracing. It is only an approximation of actual GI effects but can be implemented in real time in a far more cost effective manner than other, more accurate techniques. It is a simulation of the soft shadows which are produced by objects occluding each other, i.e. in creases and corners, or when two objects are very close together. It increases spatial awareness as it is easier to tell how close two objects are from how much they occlude each other.

With regards to computer games, Ambient Occlusion is a relatively new technique, with the original method actually being developed for use in CGI films. It was developed in 2002 by ILM (Industrial Light and Magic) and used ray tracing to calculate occlusion factors, i.e. For every surface point, rays are cast in a hemisphere around the surface normal. The final occlusion amount is dependent on the number of rays that hit other surfaces or objects in the scene.” [Landis, 2002] This method was not used for real time applications but with non real time renderers for Pixar animated movies.

In 2007, the games developer Crytek devised a technique that could be used successfully in computer games. Screen Space Ambient Occlusion (SSAO) was first used in the computer game Crysis, and has since appeared in many other games. The technique is performed in screen (image) space and uses the depth buffer as input. It is implemented as a pixel shader and is executed solely using the GPU. SSAO is well suited for use in games and real time applications because, since it is performed in screen space, its performance is not dependant on scene complexity, making it faster than other methods in complex, detailed scenes. Of course, since it is a screen space calculation, it is not as accurate as geometry dependant ambient occlusion, and only approximates the effect. However, when it comes to computer games, physical correctness is not essential, rather it is the illusion of reality that is important. [Briney et al, 2010]

It wasn’t until 2009 that Crytek released a full description of their algorithm, and as such there are a number of different interpretations of the technique in use. The games developer Blizzard used their version of SSAO in the game StarCraft II (2010) and Nvidia also have their own version of the technique, called Image Space Horizon Based Ambient Occlusion (HBAO). Some implementations focus on improving the performance; while others are far better quality and some attempt to combine the two. Thus, it is clear that Screen Space Ambient Occlusion is a graphical method with room for multiple interpretations and expansion. With that in mind, the focus of this project has been to answer the following research question:
     
How far can real-time Screen-Space Ambient Occlusion methods be improved/expanded to better approximate Global Illumination while still remaining cost effective enough for games?

There are two facets to this question: One, an investigation of methods that will improve the graphical quality of the SSAO effect and therefore better emulate indirect illumination; And two, investigating ways in which the performance cost may be reduced, thus keeping the derived method viable for computer games.

No comments:

Post a Comment