Contents

Harnessing the Next Great Thing

Scaling the Content

Scaling Animation Quality

Scaling Special Effects

Scaling the Content

Scaling the content itself is not so much defined by any one particular algorithm, but rather the concept of adding or modifying characters, objects and scenery dynamically. Done properly, this can add to the believability of the environment without affecting gameplay or performance. The following examples llustrate this technique.

Imagine a medieval adventure game in which the player is walking a forest path on a sunny afternoon, enjoying the sights and sounds of the serene forest. Suddenly, a troll jumps out from behind a tree and attacks. In the interest of delivering consistent gameplay, the troll should attack with the same speed and degree of ferocity on both a low- or high-end system. Accordingly, the content must be designed to run on a low-end system. Using a scalable approach to design, however, the developer could include richer features designed to run on higher performance systems, such as birds flying through the trees, and squirrels running about the forest floor. These elements make the forest environment more believable, and create a more immersive experience, on systems that can handle the extra work, but these extra elements don't change the fact that a troll is trying to lop the player's head off.

This concept of 'ambient characters' has been seen in some titles already, like the 'space rodents' or flying creatures in Epic's Unreal, or the small maintenance robots in Lucas Arts' Jedi Knight. While these examples included the ambient characters on all systems, as the performance of high-end systems increases, developers have the opportunity to selectively incorporate elements like these on high-end systems to make their worlds more believable.

Flight simulators offer another example of how content can be scaled to the performance of a system. Imagine flying low over Broadway in Manhattan (hey, that's what flight sims are all about, right?).On the high-end systems, for example, the pilot would be able to see traffic lights at intersections. The developer, working from map data for the city, could have an artist model a single traffic light, and then algorithmically place the lights at every intersection. This approach would be possible only if the necessary system bandwidth is available. Same algorithms could selectively add mailboxes, parking meters, and perhaps even shrieking pedestrians. This sort of 'procedural content placement' straddles the line between scaling the game content and scaling the geometry used to represent the game characters and objects.

Scaling Geometry

The scaling of geometry is something that developers have been doing as long as there have been 3D games on the PC. A typical approach involves storing several versions of every object model, each at a different level of detail (LOD). The application swaps down to lower level of detail models as necessary, based on user selections or other criteria, such as the number of objects moving about in the scene or changes in the frame rate.

While "discrete LOD's" are commonly used, this approach has some drawbacks. One problem is that an artist has to model every one of the objects at multiple levels of detail, which is a long and tedious process. Each of these objects must then be stored on the disc, consuming space. Finally, switching from one level of detail to another can result in a visual glitch, referred to as 'popping', appearing onscreen. With these problems in mind, developers are exploring a number of other approaches to scaling geometry content.

Scaling the geometry content involves adding or removing polygons to the scene to maintain a sufficient frame rate or level of visual quality. Systems with higher performance processors and/or 3D accelerators will be able to pump more polygons to the display resulting in higher quality images. Several techniques currently exist for creating scalable geometry and more are likely to appear.

A computer graphics technique commonly used in higher end applications, but that can be used for creating scalable geometry in today's consumer applications, is to use parametric curves and surfaces. A parametric curve can best be described with an example. Assume that you are given four toothpicks and told to make a circle. First you'll probably put the toothpicks in a diamond shape in front of you, which is a rough approximation of a circle, but very rough. If you are given five, six, or fifty toothpicks, you can make shapes that more closely approximate a circle, but none would be exact (assuming that the size of the circle doesn't matter). If the size must stay the same, assume the toothpicks have the magical ability to stretch or shrink to arbitrary lengths. There would still be regions of flatness on the shape that are not typical of a "real" circle. Now, suppose you are given a piece of string and told to make a circle. Depending on your patience, you could create a circle of arbitrary precision.

This is similar to the way parametric surfaces relate to polygonal models. Suppose we're trying to model a wheel. With a polygonal model, you work with a bunch of triangles that are used to approximate the smooth, curved portions of the wheel. The approximation can be made more exact by using more, smaller triangles, but, as in the toothpick example, there will still be areas of flatness that don't exist on a "real" wheel. Using parametric surfaces, we work from a mathematical description of the wheel (for example, a center point and a radius and a width). Using the mathematical description, you can compute the precise points required to create the wheel.

During rendering of the image, the mathematical description of the object is used to generate an arbitrary number of triangles (because 3D accelerators are designed to handle triangles). Depending on the factors we've discussed (such as CPU, 3D accelerator, frame rate, and so on), you can selectively generate more or fewer triangles on the fly. Figure 1 shows an example of a parametric curve used to generate different numbers of triangles according to performance.

Figure 1. Four examples of different level of detail evaluated from a parametric surface.

Most 3D modeling packages currently support modeling with parametric surfaces. In fact, 3D artists often prefer to work with them, rather than polygons. Consequently, game developers are faced with the challenge of getting the "mathematical descriptions" from the 3D modeling package and using these descriptions at runtime to generate triangles to feed to the 3D accelerator.

Parametric surfaces can really help in making a game scalable, but using this approach requires a paradigm shift on the part of the game developers (including both the artists and the programmers). There are some other techniques that don't require such a radical paradigm shift.

Let's go back to the toothpick example used earlier to illustrate the technique of progressive meshes. Suppose you're initially given a thousand toothpicks. You can use all one thousand toothpicks to make the circle and get pretty nice results. However, suppose you're told that you only have ten seconds to complete the circle. Within this limited time, you can only use some of the toothpicks, but you can still make a decent approximation of the circle. If given twenty seconds to make the circle, you could theoretically use twice as many toothpicks as you did for the ten-second circle. The quality of the circle you can make depends on the time you have to make it-up to the limit of your original thousand toothpicks.

This illustrates the basic concept of progressive meshes. The idea is that a 3D modeler creates a highly detailed version of a 3D object. Then, using the progressive mesh algorithm, information that describes how to remove triangles from the model, one-by-one, is created. This information can then be used at run-time to create models that include an arbitrary numbers of polygons (up to the maximum number of polygons originally used to create the model).

Progressive meshes enable game developers to spend less time creating artwork, because the artists don't have to create multiple levels of detail for each model in the game. Additionally, dynamic run-time decisions can be made, determining how many triangles to use to create the model, based on the available CPU, 3D accelerator, and other system characteristics.

A final technique for scaling the geometry of objects in a scene, referred to as subdivision surfaces, has recently gained popularity in the 3D graphics field. Returning to our toothpick example, assume that you're given four toothpicks and told to approximate a circle (sound familiar?). The obvious first attempt is to create the diamond shape that really doesn't look much like a circle. In a burst of creativity, you break each of the toothpicks in half. With eight, smaller toothpicks, you can make a better approximation of the circle. If you keep subdividing (breaking) the toothpicks, until you have sixteen, thirty-two, or more, you can create more accurate circles each time you repeat the process. Progressing to infinity, you would eventually end up with a precise circle.

This example illustrates the technique of subdivision surfaces. You start with a polygonal mesh that represents an object. Then, each triangle contained in the mesh is broken into four pieces that are repositioned to more closely approximate the desired object. The process can be repeated to create arbitrarily smooth, curved surfaces. Artists must contend with the challenge of creating an appropriate initial mesh that will subdivide neatly to produce the correct desired mesh. Fortunately, this process is well supported by some of the major modeling packages.

Scaling the geometry content in each scene definitely helps scale the application across a wide range of systems, but other approaches to managing scalability also exist. In a fast-moving game, developers not only have to put those polygons on screen, but they need to move them around, too. The animation process is another area in which content can be scaled.

________________________________________________________

Scaling Animation Quality