continuum crowd simulation in complex environments

8
Technical Section Continuum crowd simulation in complex environments Hao Jiang a,b,n , Wenbin Xu a , Tianlu Mao a , Chunpeng Li a , Shihong Xia a , Zhaoqi Wang a a Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China b Graduate School of the Chinese Academy of Sciences, Beijing 100049, China article info Keywords: Crowd simulation Continuum crowd Complex environment abstract This paper presents a novel approach for crowd simulation in complex environments. Our method is based on the continuum model proposed by Treuille et al. [13]. Compared to the original method, our solution is well-suited for complex environments. First, we present an environmental structure and a corresponding discretization scheme that helps us to organize and simulate crowds in large-scale scenarios. Second, additional discomfort zones around obstacles are auto-generated to keep a certain, psychologically plausible distance between pedestrians and obstacles, making it easier to obtain smoother trajectories when people move around these obstacles. Third, we propose a technique for density conversion; the density field is dynamically affected by each individual so that it can be adapted to different grid resolutions. The experiment results demonstrate that our hybrid solution can perform plausible crowd flow simulations in complex dynamic environments. & 2010 Elsevier Ltd. All rights reserved. 1. Introduction Crowd simulation has become an important research field in computer graphics, virtual reality, the social sciences and civil engineering. Over the last few decades, numerous advances have made modeling virtual crowds feasible for various purposes and applications. In this paper, we address the problem of simulating plausible crowd movement for large-scale crowds in complex environments. The environments used in our project are very complex and usually have multi-floor structure, such as a large pedestrian overpass, a subway station and an office building. We are also interested in simulating more plausible behaviors for large crowds in these environments. An ideal way to capture the nature of a crowd is through agent-based models, which drive the individual agents to create realistic group motion, but considerable efforts are still required to design the proper model for each individual. Recently, a novel approach inspired by fluid dynamics was presented by Hughes [11,12] and then extended by Treuille et al. [13]. The continuum model implemented by Treuille et al. only needs to calculate the potential function for a group once, and it then derives optimal paths for all group members simultaneously. The individuals in their system are able to exhibit smoother motion than had been previously reported. Therefore, we chose the continuum model as the basis of our simulation system. Although the original model could exhibit smooth motion, there are still some problems that need to be solved when we simulate crowds in complex environments. Firstly, we need to solve how to represent and organize a large-scale, complex environment. The continuum crowd method has never been implemented in this kind of environment before, so we must consider a corresponding discretization scheme to adapt to the environmental representation. Secondly, pedestrians always keep a certain, psychologically plausible distance from obstacles, so we need to design a technique to reflect this characteristic within the continuum framework. Thirdly, a small cell size is usually used in complex environments to represent narrow passages or small obstacles exactly, but the density conversion technique in the original continuum method is insufficient to simulate crowds accurately in this situation. In this paper, we focus on addressing the three specific and unavoidable problems mentioned above. The results demonstrate that our approach is capable of performing plausible crowd flow in complex dynamic environments and that it is a useful complement to the original continuum crowd model proposed by Treuille et al. [13]. The rest of the paper is organized as follows: Section 2 introduces related work on crowd simulation. We briefly describe the continuum crowd model in Section 3, and then we present our environmental structure, additional discomfort fields and density conversion technique in Sections 4–6. A test case and its experimental results are shown in Section 7. We draw some conclusions and suggest further discussions in Section 8. Contents lists available at ScienceDirect journal homepage: www.elsevier.com/locate/cag Computers & Graphics 0097-8493/$ - see front matter & 2010 Elsevier Ltd. All rights reserved. doi:10.1016/j.cag.2010.05.013 n Corresponding author at: Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China E-mail addresses: [email protected], [email protected] (H. Jiang), [email protected] (W. Xu), [email protected] (T. Mao), [email protected] (C. Li), [email protected] (S. Xia), [email protected] (Z. Wang). Computers & Graphics 34 (2010) 537–544

Upload: hao-jiang

Post on 04-Sep-2016

219 views

Category:

Documents


5 download

TRANSCRIPT

Computers & Graphics 34 (2010) 537–544

Contents lists available at ScienceDirect

Computers & Graphics

0097-84

doi:10.1

n Corr

Academ

E-m

wbxu@i

xsh@ict

journal homepage: www.elsevier.com/locate/cag

Technical Section

Continuum crowd simulation in complex environments

Hao Jiang a,b,n, Wenbin Xu a, Tianlu Mao a, Chunpeng Li a, Shihong Xia a, Zhaoqi Wang a

a Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, Chinab Graduate School of the Chinese Academy of Sciences, Beijing 100049, China

a r t i c l e i n f o

Keywords:

Crowd simulation

Continuum crowd

Complex environment

93/$ - see front matter & 2010 Elsevier Ltd. A

016/j.cag.2010.05.013

esponding author at: Institute of Comp

y of Sciences, Beijing 100190, China

ail addresses: [email protected], comusjiang@

ct.ac.cn (W. Xu), [email protected] (T. Mao), cpli@

.ac.cn (S. Xia), [email protected] (Z. Wang).

a b s t r a c t

This paper presents a novel approach for crowd simulation in complex environments. Our method is

based on the continuum model proposed by Treuille et al. [13]. Compared to the original method, our

solution is well-suited for complex environments. First, we present an environmental structure and a

corresponding discretization scheme that helps us to organize and simulate crowds in large-scale

scenarios. Second, additional discomfort zones around obstacles are auto-generated to keep a certain,

psychologically plausible distance between pedestrians and obstacles, making it easier to obtain

smoother trajectories when people move around these obstacles. Third, we propose a technique for

density conversion; the density field is dynamically affected by each individual so that it can be adapted

to different grid resolutions. The experiment results demonstrate that our hybrid solution can perform

plausible crowd flow simulations in complex dynamic environments.

& 2010 Elsevier Ltd. All rights reserved.

1. Introduction

Crowd simulation has become an important research field incomputer graphics, virtual reality, the social sciences and civilengineering. Over the last few decades, numerous advances havemade modeling virtual crowds feasible for various purposes andapplications. In this paper, we address the problem of simulatingplausible crowd movement for large-scale crowds in complexenvironments. The environments used in our project are verycomplex and usually have multi-floor structure, such as a largepedestrian overpass, a subway station and an office building. Weare also interested in simulating more plausible behaviors forlarge crowds in these environments.

An ideal way to capture the nature of a crowd is throughagent-based models, which drive the individual agents to createrealistic group motion, but considerable efforts are still requiredto design the proper model for each individual. Recently, a novelapproach inspired by fluid dynamics was presented by Hughes[11,12] and then extended by Treuille et al. [13]. The continuummodel implemented by Treuille et al. only needs to calculate thepotential function for a group once, and it then derives optimalpaths for all group members simultaneously. The individuals intheir system are able to exhibit smoother motion than had been

ll rights reserved.

uting Technology, Chinese

gmail.com (H. Jiang),

ict.ac.cn (C. Li),

previously reported. Therefore, we chose the continuum model asthe basis of our simulation system.

Although the original model could exhibit smooth motion,there are still some problems that need to be solved when wesimulate crowds in complex environments. Firstly, we need tosolve how to represent and organize a large-scale, complexenvironment. The continuum crowd method has never beenimplemented in this kind of environment before, so we mustconsider a corresponding discretization scheme to adapt to theenvironmental representation. Secondly, pedestrians always keepa certain, psychologically plausible distance from obstacles, so weneed to design a technique to reflect this characteristic within thecontinuum framework. Thirdly, a small cell size is usually used incomplex environments to represent narrow passages or smallobstacles exactly, but the density conversion technique in theoriginal continuum method is insufficient to simulate crowdsaccurately in this situation.

In this paper, we focus on addressing the three specific andunavoidable problems mentioned above. The results demonstratethat our approach is capable of performing plausible crowd flowin complex dynamic environments and that it is a usefulcomplement to the original continuum crowd model proposedby Treuille et al. [13].

The rest of the paper is organized as follows: Section 2introduces related work on crowd simulation. We briefly describethe continuum crowd model in Section 3, and then we present ourenvironmental structure, additional discomfort fields and densityconversion technique in Sections 4–6. A test case and itsexperimental results are shown in Section 7. We draw someconclusions and suggest further discussions in Section 8.

H. Jiang et al. / Computers & Graphics 34 (2010) 537–544538

2. Related work

In this section, we briefly review some relevant methods forpath planning and crowd simulation.

The cognitive model was introduced to obtain highly auton-omous animated characters in dynamic virtual worlds [4,9]. It isthe most accurate way to create ultra-realistic crowds, but thecomputation cost is huge.

Agent-based behavior methods can be traced back to theseminal work of Craig Reynolds in 1987 [1]. In his model, simplelocal rules could help to generate complex flock behaviors.Reynolds later expanded his work to include additional behaviorssuch as seeking, pursuit and evasion [2]. Brogan and Hodgins [6]proposed an animation algorithm for controlling the movementsof creatures with significant dynamics. Sociological aspects weretaken into account to simulate crowd behavior by Musse andThalmann [28]. Additionally, psychological effects were consid-ered for obtaining agents’ actions by Pelechano et al. [26]. Musseand Thalmann [10] presented a hierarchical behavior model forreal-time simulation of virtual human crowds. Many crowdsimulation methods have been derived from the social forcemodel presented by Helbing [7,8]. This model assumed a mixtureof socio-psychological and physical forces that influence crowdbehaviors in panic situations. Chenney [5] described a techniquefor representing and designing velocity fields using flow tiles.Shao and Terzopoulos [3] integrated cognitive components with arule-based model to attain fully autonomous pedestrians in alarge urban environment. Sung et al. [23] used a probabilisticmethod to steer characters to their goal. Pelechano et al. [21]applied a combination of psychological and geometrical rules to asocial and physical force model to simulate large, dense crowds ofautonomous agents. Hengchin Yeh et al. [19] introduced theconcept of composite agents to model emergent behaviors amongindividual agents. Jin et al. [32] presented a hybrid methodcombining a user-specified vector field with an autonomousmovement component for controlling individual behavior. Guyet al. [35] present a new local collision avoidance algorithm thatcan handle large heterogeneous crowds and is easy to parallelize.Many locally controlled crowd models needed tailored techniquesto solve the problem of navigation.

Navigation is probably the most crucial behavior in computercrowd simulation [22]. Pettr�e et al. [17] proposed a novelapproach that could extract topological information automaticallyand recognize walkable regions from the geometry model of anuneven and multilayered virtual environment; however, it is hardto gain full-scale knowledge of objects and regions only through a3D geometric model. In two papers, Shao and Terzopoulosmodeled the virtual environment as a hierarchical collection ofmaps, with each of these maps designed for different purpose;their combination can support accurate and efficient environ-mental information storage and retrieval [8,27]. Bayazit et al. [14]presented a graph-based roadmap containing topological infor-mation and adaptive edge weights for global planning. Sung et al.[15] employed a fast path planner based on probabilisticroadmaps for navigating characters through environments.Lamarche and Donikian [16] presented a hierarchical pathplanning algorithm based on topological pre-computations. Athree-layer method for agent steering was introduced by Gold-enstein et al. [20]. Kamphuis and Overmars [25] extended pathplanning to exhibit realistic coherence. Sud et al. [24] usedVoronoi graphs to compute and update navigational graphs.Yersin et al. [30] presented a hybrid architecture in whichdifferent regions exploited different planning algorithms accord-ing to their level of interest. A two-level navigation algorithmcombining a global roadmap with a local planning method basedon RVOs was introduced by van den Berg [31].

Recently, a novel approach to simulate crowds was inspired byfluid dynamics. Hughes introduced a model that describes crowdsas a continuous density field and presents a dynamic potentialfunction to guide the density field optimally toward its goal[11,12]. Inspired by Hughes’s work, Treuille et al. [13] proposedthe continuum crowd model by transforming Hughes’s contin-uous crowd field into a particle representation, and the methodused in this paper to simulate crowds is based on this work.Compared to agent-based methods, the continuum approachallows simulating thousands of pedestrians in real-time and coulddemonstrate several observed phenomena, such as lane formationand vortex forms. It is also a global navigation method that unifieslocal collision avoidance and global planning in one simulationframework, thereby solving inherent conflicts naturally andexhibiting smoother individual motion that has been previouslyreported [13]. In Yersin’s architecture [30], the continuum modelwas only employed in the regions of high interest instead of thewhole scenario. Compared with their solution, we made somepractical improvement on the original continuum model but theymainly focused on the efficiency of architecture. More recently,Narain et al. [33] presented a hybrid continuum-based method forcapturing both the discrete motion of each agent and themacroscopic flow of the crowd and suggests a way to improveagent–agent interaction.

3. The original continuum crowd model

In the original Ref. [13], the continuum crowd model assumesthat people choose paths so as to minimize a linear combinationof the following three terms: the length of the path, the amount oftime to the destination and the discomfort felt, per unit time,along the path. Therefore, if we let P be the set of all paths from x

to some point in the goal and assume that the speed field f,discomfort g, and goal G are fixed, a person at location x will pickthe path P AP minimizing:

minPAQ a

ZP

1ds|fflfflfflffl{zfflfflfflffl}Path Length

þbZ

P1dt|fflfflfflffl{zfflfflfflffl}

Time

þ gZ

Pgdt|fflfflfflffl{zfflfflfflffl}

Discomfort

1CCCCCA

0BBBBB@ ð1Þ

Here, a, b, and g are weights for individual terms; ds and dt

means that the integral is taken with respect to path length andtime. These two variables are also related by ds¼ f dt, where f isthe speed. Using this equality and letting C¼af+b+gg/f be a unitcost field, we may rewrite Eq. (1) as

minPAQ Z

PCds

� �ð2Þ

The authors defined a potential function f to find optimalpaths given the path cost described in Eq. (2). In the goal f¼0 andeverywhere else, f satisfies the eikonal equation: :rfðxÞ:¼ C.

The speed field f measures the maximum permissible speed ofmovement for every point and every direction in the domain. Toobtain this field, the authors designed a density-dependentmechanism. Every person could influence the nearby speed field.Each person can be converted into an individual density field,denoted ri for the ith person. The crowd density r is simply thesum of each individual density field:

r¼X

i

ri ð3Þ

Then, three different equations are defined to describe howdensity affects speed in different density intervals.

H. Jiang et al. / Computers & Graphics 34 (2010) 537–544 539

To compute these fields, the model is discretized in time andspace. In each time step, the crowd is converted to a density fieldfirst, and then the unit cost field, the potential and its gradient areconstructed for every group. This process is followed by updatingindividuals’ locations by interpolating the velocity field, andfinally, the minimum distance enforcement between people isimplemented.

For further details we refer the reader to the original article [13].

4. Representation and discretization of the environment

In a complex environment, there are numerous objects, such ashandrails, walls, windows, pillars, and so on, distributed widely indifferent regions. For example, a subway station containsthousands of objects, making it inefficient to organize all objectsinto a simple list. To facilitate implementation and querying, wedivided the whole space into several independent but adjacentregions according to common sense. We called each naturallyseparated region a Block—this could consist of an entire floor,stairs, or a corridor—and all of the objects placed in the sameregion are included in the Block. The division method based onthe Block is easy to understand and implement.

Fig. 1. Illustration of environmental structure.

Fig. 2. The scheme for grid discretization follow

According to the above definition, we will structure a complexscene as several Blocks, and each Block denotes an independent3D sub-space and contains all of the objects inside of it. A simpleexample of an environmental structure is illustrated in Fig. 1.

Because a scenario will be divided into several Blocksaccording to our environmental structure, and because it isnecessary to discretize space into a regular grid to use the basiccontinuum crowd model, the most direct discretization scheme isto discretize the sub-space of each Block into a regular grid andthen connect neighboring grids. However, if we discretize Blocksindependently, it is difficult to connect them at the joints, whichwill lead to discontinuous crowd movement. Hence, we defined aglobal coordinate system, and every Block is discretized underthis shared system of coordinates; therefore, the neighboringgrids are aligned so that seamless connections could easily bebuilt between them. Additionally, the discretization accuracydepends on the size of the grid cell.

As shown in Fig. 2 (left), the example environment iscomprised of three Blocks, and each Block is discretized under ashared global coordinate system. Therefore, cells belonging todifferent Blocks are aligned along both the x- and y-axis. Then,connective relations are established between border cells ofadjacent grids. The visualization results of connected grids areillustrated in Fig. 2 (middle). After connecting all of the grids, wecan easily construct the dynamic potential field through all of theBlocks. An example of the potential field is shown in Fig. 2 (right).

After connecting adjacent grids, the state of each grid cellneeds to be marked as walkable or non-walkable. We can accessthe object list for each Block from the environmental structuremap, and then every obstacle object will be mapped onto the gridto determine the state of nearby cells. If a grid cell overlaps withan obstacle object, it will be marked as a non-walkable region, andindividuals will be prevented from entering these barrier regions.Conversely, the remainder grid cells are marked as walkableregions through which people could move.

The max-norm distance is employed to examine every grid cell todetermine whether it overlaps with an obstacle. Assume that anobject is represented as a convex polygon with a set of points G, andthe center point of a grid cell is denoted as x¼/x1, x2S. We cancompute the max-norm distance from a cell center to an object using

D1ðx,GÞ ¼ 7minyAG

:x�y:1¼ 7min

yAGmax

1r irdxi�yi

�� �� ð4Þ

Here, d¼2 for a 2-dimensional case. An efficient framework toderive the distance has been designed by Varadhan et al. [18].

As illustrated in Fig. 3, a grid cell overlaps with an object aslong as it satisfies one of the following two conditions:

(a)

s the

the cell center lies inside the object;

(b) the cell center lies outside the object, and the max-norm

distance from the cell center to the object is smaller than halfof the grid cell length.

Block-based environmental structure.

Fig. 3. Illustration of the max-norm distance (from a cell center to obstacle).

H. Jiang et al. / Computers & Graphics 34 (2010) 537–544540

In summary, our environmental structure fits well with thecrowd model even for complex scenes, and in our system,the individuals going to the same target will be put into thesame group and guided to their goal through a potential field asthe original continuum model does. Moreover, individuals couldmove continuously among different Blocks even in a multilayeredenvironment if divided Blocks belonged to different floors. Werefer the reader to [34] for the details about environmentalconstruction.

5. Smoother trajectories around obstacles

When virtual humans navigate an environment, they will tryto avoid any collisions with obstacles; in real life, people will notwalk too close to the border of obstacles but maintain a certaindistance. Treuille et al. [13] suggested predictive discomfort forcollision avoidance with moving objects. We extended this idea toaddress our problem by adding a small amount of discomfortaround the obstacles according to following equation:

CðxÞ ¼1�exp �

ðD1ðx,GÞ�kÞ2

ð2sÞ2

!0rD1ðx,GÞrk

0 D1ðx,GÞ4k

8>><>>: ð5Þ

This discomfort causes people to avoid the surrounding regionnear obstacles; moreover, we found this approach obtainssmoother individual trajectories as people move around obstacles.

In Eq. (5), G is a set of points on an object convex polygon, x¼

/x1, x2S denotes the center point of a grid cell, s is theadjustment factor, k is the width factor and denotes the rangeof the influenced area (in this work, we used k¼1) and D1ðx,GÞ isthe max-norm distance introduced in Section 4. According to thisequation, if the max-norm distance between a grid cell and anobstacle is shorter, the discomfort value of the cell will be larger.Individuals will try to avoid walking in regions with largediscomfort value; therefore, they will maintain a certain distancefrom obstacles, such as walls and pillars.

In addition, this part of the discomfort value could becalculated in advance so that it did not add additional real-timesystem overhead. A comparison of results is shown in Fig. 4.The left image in Fig. 4 depicts the original result, without theproposed improvement. In the absence of obstruction from otherindividuals, the tested virtual human nearly moved along theshortest path, and his trajectory was obviously inflexible. Incontrast, the improved result (shown in the right image in Fig. 4)

showed a smoother and visually more plausible human trajectorythan did the original result, especially in the corners.

6. Density conversion

In our application, we found that the original continuummodel is appropriate for application to a wide range of scenarios ifthe grid length l is suitable (for instance, if l¼1). However, thescenario for our project is very complex and features numerousobstacles and small passages; thus, the cell size needs to be verysmall (sometimes 0.25 m). In this case, the density conversionfunction proposed in Ref. [13] would not appropriately reflect theactual impact of an individual on nearby cells, so artifactintersection would take place frequently and would not beresolved by the grid.

As illustrated in Fig. 5, the influence field with respect to thelocation of the people obviously exceeded the four cells (greencells in Fig. 5) selected by the original method because the cellsize was too small. If we ran the simulation in this situation,collisions between people would become serious, as illustratedin Fig. 6 (left).

To address this, we have defined a new density conversiontechnique comprised of the following steps.

First, we detect an influence factor s for every individual,according to his radius and the grid size:

s¼ ceilðri�l=2Þ

lþ1

� �ð6Þ

where ri denotes radius of the ith person and l is the cell size.Secondly, we find the closest cell center [i, j] for each person

whose coordinates are both less than that of the person.Finally, the person’s density is then added to these grids,

indexed by ½1�sþ i:sþ i, 1�sþ j:sþ j�, as

ð1�aÞsinð2pwþp=2Þþð1þaÞ

2, 0rwr0:5

a 1�ðw�0:5

s�0:5Þ2

� �, 0:5rwrs

8>>><>>>: ð7Þ

where a is the adjustment factor. We can prove that thispiecewise function is continuous because each piece is continuousthroughout its domain and the first derivatives of thetwo constituent functions are equal at w¼0.5. An example graphof this density function is illustrated in Fig. 6, where a¼0.8and s¼1.

The scale factor w for each cell is computed by

w¼Dx=l, DxZDy

Dy=l, DxoDy

(ð8Þ

The relative coordinates ½Dx, Dy� of that person with respect toeach cell center are computed in advance.

The proposed technique also satisfies two requirementsintroduced in the original model [13]: the density field iscontinuous with respect to the location of the people and eachperson contributes at least r to their grid cell, but no more than rto neighboring cells, where r¼ a.

We have made some comparisons between our method andthe original continuum method. A factor for measuring the degreeof collision is defined by

DC ¼ ðriþrj�DdÞ=ðriþrjÞ, ð9Þ

where r is radius of agent and Dd denotes distance betweencenters of two conflicted agents. As we compute this, we cancalculate the average collision degree by

ADC ¼

PDCm

Nð10Þ

Fig. 4. A comparison of trajectories around the obstacles (left: the original result; right: the improved result).

Fig. 5. The influenced cells selected by the original method, which is insufficient,

according to the radius of an individual (selected cells are green, and red circle is

the bounded radius of an individual).(For interpretation of the references to color

in this figure legend, the reader is referred to the web version of this article.)

Fig. 6. An example graph of the density function (the horizontal axis denotes w,

and the vertical axis denotes density r).

H. Jiang et al. / Computers & Graphics 34 (2010) 537–544 541

where N is total number of collisions. The first factor (DC) showsthe extent of collision between two overlapped agents and thesecond factor (ADC) indicates average extent of all collisions on asingle frame.

Our experiment uses a small area with limited space tocompare the performance of our method with the original

continuum method, as demonstrated in Fig. 7. In this scenario,hundreds of agents want to go on the bridge and only oneescalator can carry people up to it. Therefore, the entrance of theescalator will fill with crowded agents quickly. It is very useful totest the function of density conversion. The cell size of the gridused in this experiment is 0.25 m. As illustrated in Fig. 8, theintersection of artifacts occasionally happened in our systemwhen we used a small cell size, and it became serious in theoriginal method.

In addition, some quantitative comparisons are shown inFigs. 9 and 10. As Fig. 9 illustrated, our method can keep collisionsat a very low degree in whole simulation process, but the collisiondegree with the original method increase very fast and is muchhigher than ours when the value becomes stable. Moreover, weillustrate in Fig. 10 the distribution of the collision degree thatcollected from the two tested methods. The mean value of theoriginal method is nearly 12 times higher than that produced byour method. The maximum value of the original method is0.97541, which means two simulated agents almost completelyoverlap each other. And the maximum collision degree of ourmethod is even lower than the mean value of the original method.Therefore, our method outperforms the original continuummethod that is failure to handle the scenario with small cell size.

The animation can be seen from the attached comparisonvideo. In fact, we found the people react in a very chaotic way inplaces where the space is limited and crowded with the originalmethod. In brief, our technique stands in obvious contrast to theoriginal conversion method, especially in this crowded situation.

7. Simulation results

We have implemented the hybrid approach described aboveand tested it under several scenarios. Some comparison of resultswas illustrated in previous sections. Therefore, in this section, wewill explain certain simulation results in a typical scenario toshow the combined effects produced by our hybrid solution. Ourtests were run on a desktop computer with an Intel Core2 DuoE8300 CPU (2.83 GHz), 3.5 G RAM and an NVIDIA GeForce8800 GT (512 MB video Memory) video card. The large-scalecrowd rendering method used in our simulation system wasintroduced by Xia et al. [29].

As shown in Fig. 11 (left), the test environment was a largepedestrian overpass in the front square of a city railway station.The overpass across the street is 89 m long and 6 m wide and is

Fig. 7. The test scenario.

Fig. 8. A comparison of intersection between individuals (left: the original result; right: the improved result).

Fig. 9. A quantitative comparison of the average collision degree.

Fig. 10. The distributions of the collision degree on a single frame.

H. Jiang et al. / Computers & Graphics 34 (2010) 537–544542

one of the largest pedestrian overpasses in this city. As a crucialpassage near the large railway station, it bears great pressurefrom human traffic almost every day, especially on holidays. Wehoped to reproduce the ensuing congestion.

The scene of the pedestrian overpass composed of 329 objectsand separated into 9 Blocks. As shown in Fig. 11 (middle), all ofthe Blocks were distinguished by different colors, and the outlineof every object was illustrated (right).

Fig. 11. Pedestrian overpass in the front square of a railway station (3D geometric models, colored Blocks and a sketch map of objects are illustrated from left to right).

Fig. 12. Simulation results in a pedestrian overpass.

Fig. 13. Crowded overpass (left: a snapshot from an actual video; right: the simulated result).

H. Jiang et al. / Computers & Graphics 34 (2010) 537–544 543

In this scenario, the cell size employed on the grid was 0.45 m.We obtained more than 20 kinds of different human flow results.Some simulation snapshots are shown in Fig. 12; the left showsthe crowd in a multilayered environment, the middle shows thecongested situation at the entrance to an escalator, and the rightshows a panorama of the surrounding area. As illustrated inFig. 13, we drew a comparison between the real video and oursimulation of the same congested area. We found that the flow ofpeople in the right side of the bridge is much larger than the leftside and people in the left side got stuck in one lane that movedvery slowly. In addition, the obvious phenomena of laneformation can be observed. From this figure, we can see thatour result is similar to a real case.

Related animations can be viewed in the companion video. Wecan see from these results that the environmental structureprecisely describes the complex environment, and our approachcould yield smooth crowd flow in this kind of scenario.

8. Conclusions and future work

In this paper, we present a hybrid approach for simulatingcrowds in complex environments. Several enhancements to the

continuum crowd model produced more realistic crowd behaviorin complex environments.

We designed an environmental structure to organize large-scale and complex environments naturally and constructed acorresponding method for grid discretization to simulate crowdscrossing through independent but neighboring regions.

We also added a discomfort field near obstacles for keeping acertain distance between pedestrians and obstacles, as has beenwidely observed in real crowds; this adjustment is crucial forobtaining smoother individual trajectories when people movearound these obstacles.

In addition, we described a technique for density conversion ina discrete grid that could be adapted to different cell sizes.

Our hybrid approach has been tested under several challengingscenarios and has produced some visually plausible results. Butthere are some limitations to our approach. Firstly, like theoriginal continuum model, our method can simulate well ongroups of homogeneous agents but does not have enoughindividual variability. However, it is possible to design an agent-based model that integrates some ideas of the continuum model.Another limitation is the calculating cost, which is directlyinfluenced by the number of grid cells, is overloaded in large-scale synthetic scenarios with small cell size. For our future work,

H. Jiang et al. / Computers & Graphics 34 (2010) 537–544544

parallel architecture will be considered for improving computa-tional efficiency.

Acknowledgements

This work is supported and funded by National Natural ScienceFoundation of China Grant nos. U0935003, 60703019, 60603082and National Key Technology R&D Program no. 2009BAK43B38.We would also like to thank the anonymous reviewers for theirvaluable comments and suggestions.

Appendix A. Supporting information

Supplementary data associated with this article can be foundin the online version at doi:10.1016/j.cag.2010.05.013.

References

[1] Reynolds. CW. Flocks, herds and schools: a distributed behavioral model. In:Proceedings of the SIGGRAPH ’87, Computer Graphics 1987;21(4).

[2] Reynolds CW. Steering behaviors for autonomous characters. In Proceedingsof Game Developers Conference, San Jose, California, 1999, pp. 763–82.

[3] Shao, W, Terzopoulos D, Autonomous pedestrians. In: Proceedings ofACM SIGGRAPH/Eurographics Symposium On Computer Animation, 2005,pp.19–28.

[4] Aylett R, Cavazza M: Intelligent virtual environment—a state of the art report.In: Proceedings of Eurographics 2001 STARs, 2001.

[5] Chenney, S, Flow tiles. In: ACM SIGGRAPH/Eurographics Proceedings OfSymposium On Computer Animation, 2004, pp. 233–42.

[6] Brogan D, Hodgins J. Group behaviors for systems with significant dynamics.Autonomous Robots 1997;4:137–53.

[7] Helbing D, Molnar P. Social force model for pedestrian dynamics. PhysicalReview 1995(May):4282–6.

[8] Helbing D, Farkas I, Vicsek T. Simulating dynamics feature of escape panic.Nature 2000:487–90.

[9] Funge, J, Tu, X, and Terzopoulos, D. 1999. Cognitive modeling: Knowledge,reasoning and planning for intelligent characters. In: Proceedings ofSIGGRAPH 99, Computer Graphics Proceedings, Annual Conference Series,pp. 29–38.

[10] Musse SR, Thalmann D. Hierarchical model for real time simulation of virtualhuman crowds. IEEE Transactions on Visualization and Computer Graphics2001:152–64.

[11] Hughes RL. A continuum theory for the flow of pedestrians. TransportationResearch Part B 2002;36(6):507535.

[12] Hughes RL. The flow of human crowds. Annu. Rev. Fluid Mechanics2003;35:169–82.

[13] A. Treuille, S. Cooper, and Z. Popovic. Continuum crowds. In: Proceedings ofthe ACM Transactions on Graphics (SIGGRAPH ’06), vol. 25(3):, 2006pp.1160–68.

[14] Bayazit, OB, Lien, J-M, and Amato, NM 2002. Better group behaviors incomplex environments using global roadmaps. In: International Conferenceon the Sim. and Syn. of Living System (Alife), 362–70.

[15] Sung, M, Kovar, L, and Gleicher, M 2005. Fast and accurate goal-directedmotion synthesis for crowds. In: SCA ’05: Proceedings of the 2005 ACMSIGGRAPH/Eurographics Symposium on Computer Animation. ACM Press,New York, NY, USA, pp. 291–300.

[16] Lamarche F, Donikian S. Crowd of virtual humans: a new approach for realtime navigation in complex and structured environments. ComputerGraphics Forum 2004;23(3):509–18.

[17] Pettr�e J, de Heras Ciechomski P, Ma€ım J, Yersin B, Laumond JP, Thalmann D.Real-time navigating crowds: scalable simulation and rendering. ComputerAnimation and Virtual Worlds 2006;17(3–4):445–55.

[18] Varadhan Gokul, Krishnan Shankar, Kim Young J., Manocha Dinesh, DiggaviSuhas N.: Efficient max-norm distance computation for reliable voxelization.Symposium on geometry processing 2003: 116–26.

[19] Hengchin Yeh, Sean Curtis, Sachin Patil, Jur van denB.erg, Dinesh Manocha,Ming Lin. Composite Agents. In: Proceedings of ACM SIGGRAPH/EurographicsSymposium on Computer Animation 2008(SCA’08).

[20] Goldenstein S, Karavelas M, Metaxas D, Guibas L, Aaron E, Goswami A.Scalable nonlinear dynamical systems for agent steering and crowdsimulation. Computers & Graphics 2001;25(6):983–98.

[21] Pelechano N, Allbeck J., Badler N.. Controlling individual agents in high-density crowd simulation. In: Proceedings of the ACM SIGGRAPH/Euro-graphics Symposium on Computer Animation (SCA’07), August 3–4, SanDiego, USA, 2007, pp. 99–108.

[22] Thalmann D, Musse SRaupp. Crowd Simulation. London: Springer; 2007.[23] Mankyu Sung Michael, Gleicher, Chenney Stephen. Scalable behaviors for

crowd simulation. Computer Graphics Forum 2004;23:3. (Eurographics ’04).[24] Sud, A; Andersen, E; Curtis, S; Ming Lin; Manocha, D, Real-time path planning

for virtual agents in dynamic environments. IEEE Virtual Reality Conference,2007. 10–14 March 2007, pp. 91–8.

[25] Kamphuis, A, and Overmars, MH 2004. Finding paths for coherent groupsusing clearance. In: Proceedings of the 2004 ACM SIGGRAPH/EurographicsSymposium on Computer Animation, 19–28.

[26] Pelechano, N, Obrien, K, Silverman, B, and Badler, N 2005. Crowd simulationincorporating agent psychological models, roles and communication. FirstInternational Workshop on Crowd Simulation.

[27] Shao W. , Terzopoulos D., Environmental modeling for autonomous virtualpedestrians. In: SAE Symposium on Digital Human Modeling for Design andEngineering, pp. 1–8. SAE Technical Paper 2005-01-2699, 2005.

[28] Musse, SR, and Thalmann, D 1997. A model of human crowd behavior: groupinter-relationship and collision detection analysis. In: Proceedings of theComputer Animation and Simulation ’97, pp. 39–51.

[29] Xia Shihong, Wang Zhaoqi. Recent advances on virtual human synthesis.Science in China Series F: Information Sciences 2009;52(5):741–57.

[30] Yersin B, Maı̈m J, Morini F, Thalmann D. Real-time crowd motion planning:scalable avoidance and group behavior. The Visual Computer: InternationalJournal of Computer Graphics 2008;24(10):859–70.

[31] van den Berg J, Patil S, Sewall J, Manocha D, Lin MC. Interactive navigation ofindividual agents in crowded environments. In: Proceedings of ACMSymposium Interactive 3D Graphics and Games (I3D) 2008.

[32] Jin Xiaogang, Xu Jiayi, Wang Charlie CL, Huang Shengsheng, Zhang Jun.Interactive control of large-crowd navigation in virtual environments usingvector fields. IEEE Computer Graphics and Applications 2008;28(6):37–46.

[33] Narain Rahul, Golas Abhinav, Curtis Sean, Lin Ming C. Aggregate dynamics fordense crowd simulation. ACM Transaction Graphics 2009;28(5).

[34] Jiang Hao, Xu Wenbin, Mao Tianlu, Li Chunpeng, Xia Shihong, Wang Zhaoqi. ASemantic environment model for crowd simulation in multilayered complexenvironment. In: Proceedings of the ACM Symposium on Virtual Reality andSoftware Technology 2009, 191–8.

[35] Guy SJ, Chhugani J, Kim C., Satish N, Lin M, Manocha D, Dubey. P, ClearPath:highly parallel collision avoidance for multi-agent simulation. In: Proceed-ings of the ACM SIGGRAPH/Eurographics Symposium On Computer Anima-tion (SCA), August. 2009, pp. 177–87.