Pipeline for Populating Games with Realistic Crowds
Total Page:16
File Type:pdf, Size:1020Kb
PIPELINE FOR POPULATING GAMES WITH REALISTIC CROWDS Rachel McDonnell, Simon Dobbyn and Carol O’Sullivan Graphics, Vision and Visualisation Group Trinity College Dublin Ireland email: [email protected] Figure 1: Realistic crowds in virtual Dublin. KEYWORDS rently, the humans that occupy crowd systems Real-time Crowds, Impostors, Cloth simula- in games use skinned meshes for their clothing, tion, Perceptual Metrics often resulting in rigid and unnatural motion of the individuals in a simulated crowd. While ABSTRACT there have been advances in the area of cloth With the increase in realism of games based simulation, both offline and in real-time, inter- in stadiums and urban environments, real-time active cloth simulation for hundreds or thou- crowds are becoming essential in order to pro- sands of clothed characters would not be pos- vide a believable environment. However, re- sible with current methods. We addressed this alism is still largely lacking due to the com- problem in previous work by devising a system putation required. In this paper, we describe for animating large numbers of clothed charac- the pipeline of work needed in order to prepare ters using pre-simulated clothing. and export models from a 3D modelling package into a crowd system. For our crowd, we use a In Dobbyn et al. [Dobbyn et al. 2006], we added hybrid geometry/impostor approach which al- realism to our crowd simulations by dressing lows thousands of characters to be rendered of the individuals in realistically simulated cloth- high visual quality. We use pre-simulated se- ing, using an offline commercial cloth simulator, quences of cloth to further enhance the charac- and integrating this into our real-time hybrid ters appearance, along with perceptual metrics geometry/impostor rendering system ([Dobbyn to balance computation with visual fidelity. et al. 2005]). We have also improved the quality of the impostors in the system by using percep- INTRODUCTION tual metrics described in [Hamill et al. 2005; In the games industry, real-time crowds are in- McDonnell et al. 2005; McDonnell et al. 2006; creasing in popularity due to the emergence of McDonnell et al. 2007a] in order to drive the new level of detail (LOD) techniques. Cur- impostor rendering. 1 In this paper, we discuss the necessary steps to geometrical models with lower resolution ones, advance from a single character in a modelling and were able to create complex scenes with package such as 3D Studio Max, to a perceptu- thousands of characters. De Heras Ciechom- ally guided crowd of thousands of clothed char- ski et al. [de Heras Ciechomski et al. 2004] sig- acters in a real-time system. This useful step by nificantly improved performance by using four step guide will enable others to incorporate pre- discrete level-of-detail meshes for the humans in simulated deformable clothing and perceptual their crowd. Yersin et al. [Yersin et al. 2005] in- metrics into their crowd systems. Unlike pre- crease the number of humans significantly while vious work, we discuss in detail the challenges still having varied animations by switching be- that we faced when incorporating clothing into tween dynamic and static meshes, depending on the system and the practical use of our percep- the distance from the camera. tual metrics. Our results show a system capa- ble of rendering large realistic clothed crowds in Another approach to reducing the render- real-time. ing costs of large crowds is to replace the entire geometry of the character with BACKGROUND two-dimensional representations (impostors). Real-time crowds pose a difficult problem as Aubel et al. [Aubel et al. 1998] were the first there may be limited resources available at to use this technique for crowds of virtual hu- run-time. As the number of characters in- mans. They describe their dynamic impostor as creases, traditional techniques rapidly become “a simple textured plane that rotates to contin- overwhelmed and are unable to sustain inter- uously face the viewer.” A snapshot of the vir- active frame-rates. Generally, it is the number tual human is textured onto the plane. The tex- of polygons that the graphics engine can dis- ture is updated from time to time, depending play per frame that limits the number of charac- on the movement of the human or camera. The ters that can be displayed in a real-time crowd. snapshot is produced at run-time by rendering Therefore, character meshes with a high num- the virtual human to an off-screen buffer. The ber of polygons need to be simplified in order polygonal model is then replaced with a single to achieve real-time display rates. Instead of plane with this texture pasted onto it. Tecchia simplifying all of the characters to a low level et al. [Tecchia et al. 2002] were able to render a of detail, different levels of detail of the charac- virtual city with thousands of walking humans ters’ meshes can be used in the scene. Detailed on a standard PC by using pre-generated im- meshes are used when the object is close to the postors to represent their humans. They im- viewer, and coarser approximations are substi- proved on existing techniques by shading the tuted for distant objects (e.g., as in [Funkhouser impostors in real-time. and Squin 1993]). This idea of using differ- One of the main disadvantages of the previ- ent levels of detail for objects in a scene is ous approaches was that the impostors looked an established technique. As early as 1976, pixellated when viewed up close. Dobbyn et Clark [Clarke 1976] described the benefits of al. [Dobbyn et al. 2005] presented the first hy- representing objects within a scene at several brid crowd system to solve the problem of de- resolutions. graded quality of impostors at close distances. Recently, two main approaches to real-time They did so by building an impostor system crowds have emerged in the crowd rendering on top of a full, geometry-based human an- community. One is to use low resolution geom- imation system, and switching between the etry, and the other is to use image-based rep- two representations with minimal popping ar- resentations for the characters in the crowd. tifacts. They also improved on previous impos- Ulicny et al. [Ulicny et al. 2004] replaced full tor techniques using graphics hardware to en- 2 hance the variety and realism of the impostors. In this paper, we describe the techniques nec- Alternatively, Pettre et al. [Pettre et al. 2006] essary for creating a perceptually guided crowd used three levels of detail, thus combining the of clothed characters using pre-simulated cloth strengths of the animation quality of dynamic sequences and perceptual metrics, starting from meshes with the performance of static meshes just one character in a modelling package. and impostors. PIPELINE The depiction of cloth in computer graph- We present the pipeline of work needed to ics has occupied researchers and movie-makers achieve real-time crowds of clothed characters. since the 1980’s. Today, the need for re- In [McDonnell et al. 2006] we performed a rig- alistic clothing has become more and more orous series of psychophysical experiments in important for computer generated sequences order to determine the most appropriate repre- in movies. In the CG research community, sentations to use for depicting the deformations three types of physically-based models have of cloth. We found that a hybrid combination of been used for cloth simulation: Elasticity-based impostor and detailed geometry meshes would methods (e.g., [Carignan et al. 1992; Yang be most suited to our purpose since participants and Magnenat-Thalmann 1993]), particle-based were unable to tell the difference between this methods (e.g., [Breen et al. 1994]), and the type of crowd and a crowd containing all high mass-spring model (e.g., [Provot 1995]). Im- resolution geometry. plementing realistic cloth dynamics in real-time The system is an extension of the crowd system game applications still represents a significant detailed in [Dobbyn et al. 2005], and this pa- challenge for game developers. Simulating cloth per describes all of the alterations necessary to deformation requires much computation and is convert that crowd of skinned characters, to a a complex process both in terms of the dy- crowd of characters with deformable clothing. namics simulation and the collision detection for the changing cloth shape. In the animation There are three main stages in the pipeline research community attempts have been made process (see Figure 2): to produce more reliable real-time clothing for • Stage 1: Model Prepping: The first characters (e.g., [Vassilev et al. 2001; Cordier stage involves modelling the character and and Magnenat-Thalmann 2005]). adding a suitable animation for use in a crowd. The character’s clothes are then While generating cloth dynamics in real-time constructed and fitted, and finally simu- is becoming more advanced, the simulation lated in response to the underlying motion. groups or crowds of characters with simulated Our novel technique detailed in [Dobbyn clothing would not be possible with these tech- et al. 2006] for constructing a cyclical cloth niques. All previously described crowd systems animation is also applied here. used skinned meshes to clothe the humans in • Stage 2: Exporting the Data: The second their crowds. In [Dobbyn et al. 2006] we de- stage is concerned with exporting the hu- scribe how pre-simulated cloth sequences can man mesh, skeletal animation, cloth mesh be used to create large numbers of clothed char- and simulation, and impostors into a suit- acters. Perceptual metrics are also of extreme able format for use in the system. importance in order to make the most out of a • crowd.