O'Reilly logo

GPU PRO 3 by Wolfgang Engel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3
I
Optimized Stadium Crowd
Rendering
Alan Chambers
The video games industry has benefited immensely from the wealth of information
on instanced rendering and crowd simulation to have emerged in recent years
[Dudash 07]. It has allowed developers to create a much more immersive gaming
experience with hoards of visible characters that render at interactive frame rates.
However, while these techniques form the basis of efficient crowd rendering within
a stadium environment, they often fail to realize the unique set of problems and
optimization opportunities that exist within this field. This chapter aims to
extend on previous work in the field of crowd rendering, focusing predominantly
on the math, techniques, and optimizations that can be made for stadium crowds.
3.1 Introduction
Many sports titles feature stadia that require some degree of crowd rendering
technology. The geometric detail required for both the seats and the crowd
characters is a problem on current commercial consoles, especially when trying
to reproduce an 80,000-seat stadium. This is made more difficult by the fact
that stadium crowds are a peripheral feature that we want to spend as little
time on as possible. Indeed, many video games end up having to go with a
simple solution, prerendered flip book animations. These generally suffer from
inconsistent lighting and a flat overall appearance. Instanced crowd simulation
provides the basis for a system that is not only visually much better but is
also able to react to in-game events, which can greatly enhance the game play
experience. However, even some of the latest games that use this technique
suffer from perspective issues and completeness problems. This can lead to whole
sections of the crowd being incorrectly oriented at times or undesirable gaps
appearing when viewing them from certain angles, both of which can detract
from the realism of the experience.
41
42 I Geometry Manipulation
The system presented in this chapter tried to address many of these problems
in Rugby Challenge on PlayStation
R
3, Xbox 360, and PC. It begins with a
tour of the data pipeline that explains how we can accurately place seats around
the stadium and populate them with characters at runtime. A discussion of
the real-time rendering process and its problems are then laid out together with
performance evaluations that highlight the bottlenecks and potential areas for
improvement. In addition to this, we also reveal the tricks for achieving colored
“writing” in the stands, ambient occlusion that darkens the upper echelons, and
crowd density that can be controlled live in-game. Following this, we are able
to focus some discussion on the optimizations that can reduce the cost of the
system even further. The symmetrical nature of stadium architectures and their
fixed seating structure allow us to make specific optimizations that we could not
do for a generic crowd system. Essentially, a complete pipeline for a fast and
flexible stadium crowd simulation is presented, together with a discussion of the
problems you can expect to face when implementing this type of system.
3.2 Overview
This chapter explores the use of instancing technology, deferred rendering [Poli-
carpo 05], and imposters [Schaufler 95] in reducing the cost of rendering huge
crowds on the GPU without compromising the color consistency in the scene.
The system is split into two content pipelines and three rendering phases.
Each content pipeline produces data offline that is then loaded at runtime and
fed into a specific rendering phase. The results of these two renders are then used
in the final phase to shade and light the crowd area of the scene (see Figure 3.1).
The Model Content Pipeline is responsible for creating the character and
seat geometry that will be featured in the stadium. It uses our existing model
conditioner tools and exports data in an optimal format for the target platform.
Figure 3.1. Overview of the crowd rendering pipeline.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required