simulating realistic crowd based on agent trajectories

8
SPECIAL ISSUE PAPER Simulating realistic crowd based on agent trajectories Libo Sun, Xiaona Li and Wenhu Qin* School of Instrument Science and Engineering, Southeast University, Nanjing 210096, China ABSTRACT This paper presents a model for simulating realistic crowd behaviors at low computation cost. The proposed model is inspired by video data. In our approach, we rst classify the crowd into two categories: main and background characters. Whether the agents are main characters or not is inuenced by two factors, one is the agents trajectories and the other one is the change of the environment. In the second stage, we adopt two approaches to simulate the behaviors of main and background characters. Main characters are intelligent agents with the perception, the memory, the planning, and the psychology so that they can make decisions themselves. Background characters are informed of the behavior options for execution by the smart environment.Finally, we simulate the road-crossing scenario in a three-dimensional virtual environment. The experimental results demon- strate that our approach not only well reects the characteristics of agent behaviors but also reduces the computation complexity of simulating realistic crowd. Copyright © 2013 John Wiley & Sons, Ltd. KEYWORDS crowd simulation; main characters; background characters; agent trajectory; SVM classifier *Correspondence Wenhu Qin, School of Instrument Science and Engineering, Southeast University, Nanjing 210096, China. E-mail: [email protected] 1. INTRODUCTION Recently, real-time crowd simulation has been gaining consid- erable attention because of its applications in entertainment, education, architecture, training, urban engineering, and virtual heritage. Crowd simulation consists of many different components, including perception, motion planning, behavior, locomotion, and how to integrate them effectively. The realism of crowd behaviors plays a very important role in crowd simulation, and it is a key aspect that researchers should put great effort into. Some of the research on simulation of crowd behaviors is mainly concerned with the autonomy of each individual among the crowd. The agents with varying degrees of perception, memory, planning, attention, psychology, and emotion are together to compose the crowd. Other research focuses on the motion of the crowd as a whole. The realism of each individuals behavior is not so important as long as the simulation result is in accordance with the statistical law. Likewise, considerable attention has be paid to visual effect of crowd to show them in a more plausible way. Although these efforts have been instrumental in produc- ing realistic crowd behaviors, the computation complexity is high, and when the crowd grows large, it is difcult to simu- late heterogeneous crowd with different agent physiology and psychology in real time. It is found that the trajectories of most of the agents are similar and only few agentstrajectories are different by observing the road-crossing behaviors of the crowd both on the spot and from the video data. That is, once the agents with personalized trajectories and behaviors are simulated realistically, then the crowd, partly composed of them, will look plausible. Therefore, our aim is to reduce the computation complexity while producing heterogeneous crowd with realistic behaviors populated in simulated environment. In this paper, we present a novel approach to simulate realistic crowd behaviors at low computation complexity. According to video data, we classify the agents into two categories on the basis of their trajectories by use of support vector machine (SVM) classier: main and background characters. Main characters are constructed with perception, memory, planning, psychology, and emotion, and as a result, they can show diverse crowd behaviors. Meanwhile, back- ground characters are constructed with basic actions and collision avoidance behaviors. Main characters can change into background characters and vice versa when some event happens and ends. In that case, the crowd composed of main and background characters can improve the realism of the scenario; moreover, the simulation rate can be guaranteed. The key contributions of this work are a new approach to simulate realistic crowd behaviors at low computation complexity, COMPUTER ANIMATION AND VIRTUAL WORLDS Comp. Anim. Virtual Worlds 2013; 24:165172 Published online 3 May 2013 in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/cav.1507 Copyright © 2013 John Wiley & Sons, Ltd. 165

Upload: wenhu

Post on 27-Mar-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simulating realistic crowd based on agent trajectories

COMPUTER ANIMATION AND VIRTUAL WORLDSComp. Anim. Virtual Worlds 2013; 24:165–172

Published online 3 May 2013 in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/cav.1507

SPECIAL ISSUE PAPER

Simulating realistic crowd based on agent trajectoriesLibo Sun, Xiaona Li and Wenhu Qin*

School of Instrument Science and Engineering, Southeast University, Nanjing 210096, China

ABSTRACT

This paper presents a model for simulating realistic crowd behaviors at low computation cost. The proposed model is inspiredby video data. In our approach, we first classify the crowd into two categories: main and background characters. Whether theagents are main characters or not is influenced by two factors, one is the agent’s trajectories and the other one is the change ofthe environment. In the second stage, we adopt two approaches to simulate the behaviors of main and background characters.Main characters are intelligent agents with the perception, the memory, the planning, and the psychology so that they can makedecisions themselves. Background characters are informed of the behavior options for execution by the “smart environment.”Finally, we simulate the road-crossing scenario in a three-dimensional virtual environment. The experimental results demon-strate that our approach not only well reflects the characteristics of agent behaviors but also reduces the computation complexityof simulating realistic crowd. Copyright © 2013 John Wiley & Sons, Ltd.

KEYWORDS

crowd simulation; main characters; background characters; agent trajectory; SVM classifier

*Correspondence

Wenhu Qin, School of Instrument Science and Engineering, Southeast University, Nanjing 210096, China.E-mail: [email protected]

1. INTRODUCTION

Recently, real-time crowd simulation has been gaining consid-erable attention because of its applications in entertainment,education, architecture, training, urban engineering, andvirtual heritage. Crowd simulation consists of many differentcomponents, including perception, motion planning, behavior,locomotion, and how to integrate them effectively. Therealism of crowd behaviors plays a very important role incrowd simulation, and it is a key aspect that researchers shouldput great effort into.

Some of the research on simulation of crowd behaviors ismainly concerned with the autonomy of each individualamong the crowd. The agents with varying degrees ofperception, memory, planning, attention, psychology, andemotion are together to compose the crowd. Other researchfocuses on the motion of the crowd as a whole. The realismof each individual’s behavior is not so important as long asthe simulation result is in accordance with the statisticallaw. Likewise, considerable attention has be paid to visualeffect of crowd to show them in a more plausible way.

Although these efforts have been instrumental in produc-ing realistic crowd behaviors, the computation complexity ishigh, and when the crowd grows large, it is difficult to simu-late heterogeneous crowd with different agent physiologyand psychology in real time. It is found that the trajectoriesof most of the agents are similar and only few agents’

Copyright © 2013 John Wiley & Sons, Ltd.

trajectories are different by observing the road-crossingbehaviors of the crowd both on the spot and from the videodata. That is, once the agents with personalized trajectoriesand behaviors are simulated realistically, then the crowd,partly composed of them, will look plausible. Therefore,our aim is to reduce the computation complexity whileproducing heterogeneous crowd with realistic behaviorspopulated in simulated environment.

In this paper, we present a novel approach to simulaterealistic crowd behaviors at low computation complexity.According to video data, we classify the agents into twocategories on the basis of their trajectories by use of supportvector machine (SVM) classifier: main and backgroundcharacters. Main characters are constructed with perception,memory, planning, psychology, and emotion, and as a result,they can show diverse crowd behaviors. Meanwhile, back-ground characters are constructed with basic actions andcollision avoidance behaviors. Main characters can changeinto background characters and vice versa when some eventhappens and ends. In that case, the crowd composed of mainand background characters can improve the realism of thescenario; moreover, the simulation rate can be guaranteed.

The key contributions of this work are

• a new approach to simulate realistic crowd behaviorsat low computation complexity,

165

Page 2: Simulating realistic crowd based on agent trajectories

Simulating realistic crowd based on agent trajectories L. Sun, X. Li and W. Qin

• the classification of the crowd into two categoriesbased on the agent trajectories and the change of theenvironment, and

• the consideration of the influence of the starting eventon the classification of the agents and their corre-sponding behaviors.

The remainder of this paper is organized as follows: in thenext section, we review related work in crowd simulation andexamine crowd behavior models. Section 3 describes theframework architecture of our model. In Section 4, we presenthow to determine the main characters and the transitionbetweenmain and background characters. Section 5 describesthe animation of the behaviors for main and backgroundcharacters. Section 6 shows the experimental results andmakes the comparisonwith other approaches. Finally, Section7 draws conclusions and discusses future work.

2. RELATED WORK

Crowd simulation research covers many tangible aspects ofhuman locomotive behavior such as the realism of the walk-ing motion itself, collision avoidance, navigation, and localinteractions between agents. To produce behaviorally interest-ing agents, crowd simulation takes one of two approaches: mi-croscopic or macroscopic approach. Macroscopic approachaims at achieving real-time simulation for very large crowds;thus, the behavior of each individual is not as importantas long as the overall crowd movement produces realisticemergent behavior. The focus is on locomotion and collisionavoidance while maintaining appropriate velocities, motions,and directions. Classically, this was carried out with continuumcrowds [1] on the basis of dynamic potential field integratingglobal navigation with moving obstacles and a real-time andhybrid approach [2] with a dual representation for simulatingagents as both a discrete and single continuous system.

Macroscopic models focus on fast navigation but sacrificeindividuality for scalability. Microscopic approaches, on theother hand, focus on the realism of individual behavior bysimulating the perception, memory, planning, and emotionof every agent. Microscopic approaches can be subdividedinto two categories: model-based and data-driven approaches.The representatives of model-based approaches are socialforce [3], cellular automata [4], and rule-based models [5].Furthermore, the cognitive abilities of human beings are paidmuch attention recently. The State, Operator, and Result archi-tecture [6] attempts to construct general intelligence systemsby implementing a variety of cognitive functions, specificallymemory, behavioral, and learning systems. Cognitive Model-ing Language [7] specifies domain knowledge and requirescharacters to determine how to fulfill goals by searching a sit-uation tree for a set of appropriate actions. PMFServ [8] aimsto create culturally valid agents by using performance moder-ator functions that span the functionality of perception, biol-ogy, personality, social interactions, decision making, andexpression. The goal of these simulations is to make agentsto react to events in specific and individual ways that indicate

166 Comp

internal psychological processes. Shao [9] developed adecentralized, comprehensive model of pedestrians integrat-ing motor, perceptual, behavioral, and cognitive componentsin a large urban environment. Yu [10] introduced a decisionnetwork framework combining probability, decision, andgraph theories to simulate social interactions between pedes-trians in urban settings. The drawback is that they are gener-ally not scalable to large crowds. Data-driven approachessimulate the crowd behaviors according to the real data eithercaptured by motion capture system or recorded by trackedvideos. Lerner [11] presented an example-based crowd simu-lation technique and used trajectories extracted from a videoof a real crowd to drive the simulated agents. Kim [12] simu-lated dynamic patterns of crowd behaviors by using stressmodeling and performed qualitative and quantitative compar-isons between their simulation results and real-world observa-tions. Guy [13] presented a perceptually driven formulation tomodel the personality of different agents among the crowd;furthermore, he proposed a two-dimensional factorization ofperceived personality in crowds on the basis of a statisticalanalysis of the user study results.

Our method is inspired by recorded video data andclosely related to microscopic approach. We simulate theperception, the memory, the planning, and the psychologyof the agents when they are main characters; otherwise, theagents only have basic actions and collision avoidancebehaviors when they are background characters, and theiraction selection is controlled by smart environment model.

3. OVERVIEW

The focus of this work is to simulate realistic crowd in thecrossroads scenario. It should not only display some inter-esting crowd behaviors but also reduce the computationcomplexity. Our approach can be divided into two phasesto achieve the aforementioned objectives. The first phaseis to classify the agents into two categories on the basisof the video data by using SVM classifier and determinethe main characters. Furthermore, main and backgroundcharacters can change into each other when some eventhappens or ends, which are described in Section 4 indetails. The second phase produces the animation of themain and background characters and makes their behaviorsclose to real life, which is described in Section 5. In eachtime step, these two phases are executed successively untilthe simulation ends.

The framework architecture is illustrated in Figure 1.The SVM classifier is first adopted to classify the crowdinto two categories according to the video data: main andcharacters. To show interesting and realistic scenario, someevent will happen, and as a result, all the agents in its influ-ence region become the main character whether they are ornot before. That is, the main characters can change into thebackground characters and vice verse. After the main andbackground characters are determined, two approachesare adopted to simulate main and background characters.Main characters, as the intelligent agents, can select the

. Anim. Virtual Worlds 2013; 24:165–172 © 2013 John Wiley & Sons, Ltd.DOI: 10.1002/cav

Page 3: Simulating realistic crowd based on agent trajectories

Main Characters

BackgroundCharacters

SVM Classifier

Influence Region

Events RulesSmart

Objects

Smart Environment Model

Agents’

trajectories

Animation ofMain Characters

Animation ofBackgroundCharacters

Figure 1. The framework of our model.

Simulating realistic crowd based on agent trajectoriesL. Sun, X. Li and W. Qin

most appropriate behaviors for execution according to theperceived information and their current states and needs,whereas background characters execute the actions in-formed by the smart environment model. In that case, ourapproach can simulate realistic crowd behaviors at lowcomputation cost.

4. THE CLASSIFICATION OF THECROWD

4.1. The classification of agents’ trajectories

Video data can record realistic motion of the crowd andcan provide the basis for simulation of the plausible crowd.Therefore, we first locate the camera at the position with4m away from one end of the crossroad and 4m high.Then, we make the camera point at a 45� downward andshoot the video of a real crowd at the crossroads. Finally,we process the video data and extract the trajectories ofeach agent by using the approach proposed by Jiang [14].Figure 2 shows the trajectories of the agents.

From Figure 2, we can see that most of the trajectoriesof the agents are regular and the moving direction of theagent is forward with some turns. However, some agent’strajectory is different from others because his movingdirection is forward and back. Therefore, we classify theagents’ trajectories into two categories by use of SVMclassifier [15], [16]. The concrete algorithm is describedas follows:

Figure 2. The trajectories of the agents crossing the road.

Comp. Anim. Virtual Worlds 2013; 24:165–172 © 2013 John Wiley & Sons, LtdDOI: 10.1002/cav

(1) The representation of trajectory data. It is veryimportant to represent the agents’ trajectories witha proper method. The trajectories of each agent aretwo-dimensional coordinate point set. We adoptthe moving direction of the agent to describe thefeature of the trajectories, which guarantees thatthe feature of the trajectories has the eigenvectorswith the same length. In our paper, 32 points aresampled uniformly for each agent’s trajectory inthe phase of training SVM classifier.

(2) The adjustment of the parameters of SVM classifier.It is very important to determine the suitable kernelfunction for SVM classifier. Because we take thedistribution of each agent’s moving direction asthe eigenvectors of the trajectories, we use theGaussian kernel closely related to Euclideandistance between the vectors as the kernel function.The Gaussian kernel function is given by

k x1; x2ð Þ ¼ exp�� x1 � x2k k2

2s2Þ (1)

where 8 (x1,x2)2X�X. s is a scale factor to classify thedata, which has an important impact on the classificationresult. s can be evaluated through the experiments.

4.2. The classification of the crowd

(1) The determination of the main characters

After classifying the agents’ trajectories, we computethe distribution of two kinds of the agent trajectories. Then,we classify the crowd into two categories according totrajectory classification results and computed distribution:main and background characters. Furthermore, we take realtrajectories of human being as the referenced path andguide the motion of main and background characters whensimulating road-crossing scenario.(2) The transition between main and background

characters

To improve the realism of the road-crossing scenario,some event will start or end. The definition of the event

167.

Page 4: Simulating realistic crowd based on agent trajectories

Simulating realistic crowd based on agent trajectories L. Sun, X. Li and W. Qin

is given in Section 5.2.1. When the event happens, all theagents in its influence region become main characters. Asthe event evolves, the influence region will change corre-spondingly when the emergency level of the event changes.That is, more agents become main characters when the influ-ence region increases because of the rise of the emergencylevel. Conversely, few agents are still main characters whenthe influence region decreases because of the decrease of theemergency level.Main characters change back to backgroundcharacters if they are not before when the event ends.

5. THE ANIMATION OF THE CROWD

5.1. The animation of the main characters

Main characters are constructed with the perception, thememory, the planning, the behavior, and the motion. Thebehavior control model of main characters, includingperception, the planning, the behavior, and the motionmodels, is shown in Figure 3. As a whole, the hierarchicalstructure “perception–control–motion” is adopted, and inthe interior of the control, the planning, and the behaviormodels constitute the subsumption architecture based onthe level of the behavior.

The perception model is responsible for providing the ex-act information about the environment. It includes perceptionfilters, the memory, and the feedback controller. The percep-tion filters—the visual, the audile, and the tactile filter—remove the information beyond the scope that can be sensedby the sensory organs and provide the real environmentinformation of the static obstacles and the moving agentsand objects. The sensed information is stored in short-termand long-termmemory, in which the fixed-size queue is usedto store the relevant information to well simulate the humanshort-term memory, whereas the infinite queue is used tostore the environment information in long-term memory toreflect human’s self-learning ability. The feedback controlleradjusts the parameters of the perceptual filters according tothe results of the perception and memory to simulate the influ-ence of the perceptual outcome on the perceptual process.Please refer to references [17] and [18] for detailed explanation.

The planning model is responsible for computing acollision-free and natural path for each agent according tothe perceived information. The planning model consists oftwo components: global planning and local collision avoid-ance. The global planning model formulates an optimal path

Perceptionmodel

Motionmodel

Behaviormodel

Planningmodel

Figure 3. The behavior control model of main characters.

168 Comp

from the original point to the target point by adopting A*algorithm. The local collision avoidance model predictsand resolves the collisions on the basis of reciprocal velocityobstacle (RVO) algorithm, which is proposed by Lin [19] forreal-time multi-agent navigation.

The behavior model is responsible for the generation ofhigh-level behaviors and abstract behavior reasoning. Thebehavior model consists of two components: action selectionand behavior reasoning models. The action selection modelis responsible for selecting the most appropriate behaviorthat satisfies the current needs such as physiological, safety,love and belonging, and self-actualization needs. The behaviorreasoning model is responsible for converting abstractbehaviors into concrete behaviors and implementing them.Please refer to reference [20] for detailed explanation.

The motion model is responsible for executing thechosen motion in low level and guarantees the success ofthe action. The motion capture data are recorded by amotion capture system and adopted to drive the motionof the agents. The natural transition between the actionsis realized by interpolation algorithm [21].

5.2. The animation of the backgroundcharacters

Compared with main characters, the background charactersonly have basic actions, including walking, running, idling,waiting, conversing, and so on. They behave similarly onthe basis of the RVO local collision avoidance algorithm.In each time step, smart environment model informs back-ground characters of the actions according to their location.Background characters execute corresponding actions untilthey leave the related influence region or other triggersbecome active to inform them to change actions. Next, wedescribe the smart environment model.

5.2.1. The smart environment modelWe model the environment as “smart environment” that

provides agents behavior options to ease the heavy planningand reasoning on background character’s side. It includesthree components—events, rules, and smart objects.

5.2.1.1. Events. We define an event as a notableoccurrence at a particular point in time, which occursabruptly under certain triggered conditions. It can be repre-sented by the following parameters:

• Location—map coordinates of the event• Start time—when the event begins• End time—when the event ends• Influence region—the region affected by the event• Event emergency level—severity of the event

When the emergent event happens, it will changedynamically. According to the statistical data, we find thatthe main factors that influence the event are listed as follows:

(1) The event itself; as time goes on, the event changes.

. Anim. Virtual Worlds 2013; 24:165–172 © 2013 John Wiley & Sons, Ltd.DOI: 10.1002/cav

Page 5: Simulating realistic crowd based on agent trajectories

Simulating realistic crowd based on agent trajectoriesL. Sun, X. Li and W. Qin

(2) The impact of the environment; for example, whenthe fire happens, if the wind is strong, then it willbecome large soon, whereas if there is some rain,then the fire will become small.

(3) The actions the agents take; we also take fire forexample, if the firefighters come in time and takeeffective measures, then the fire will be put outsoon. However, if the firefighters come too lateand cannot control the situation, then the fire willbecome larger and larger.

The aforementioned factors interact with and influenceeach other, which results in the change of the event. Thepossible changes are the event emergency level and theinfluence region.

5.2.1.2. Rules. The rules are responsible for providingbehavior options when the trigger is active. Different rulesare embedded in different regions so that we can show differ-ences of behaviors when agents are located in differentplaces. Take crossroads as an example, it has rules such asthat “when the light is green, the behavior sets for pedestriansand vehicles are walking and moving while the behavior setsfor those are slowing down, waiting and stopping when thelight is red.”

5.2.1.3. Smart objects. Similar to the ideas of [22],the smart object includes four classes of different interac-tion features: (i) intrinsic object properties; (ii) interactioninformation; (iii) object behaviors; and (iv) expected userbehaviors. When the agent is close enough to or interacts

(a)

(c)

Figure 4. Main character and backgr

Comp. Anim. Virtual Worlds 2013; 24:165–172 © 2013 John Wiley & Sons, LtdDOI: 10.1002/cav

with the smart object, the smart object will provide theexpected behavior to that agent for execution. For exam-ple, when the agent wants to open the door, the smart doorwill tell the agent how to rotate the handle for opening.

5.2.2. The communication between smartenvironment model and background characters

To show more realistic crowd behaviors, it is veryimportant to establish the communication mechanismbetween the smart environment model and backgroundcharacters. That is, the smart environment model shouldprovide important behavior information to the backgroundcharacters for execution. In our paper, once the triggerslocated in the smart environment are active, the smartenvironment model will inform the background charactersof corresponding behavior options.

6. RESULTS

We construct a crossroads scenario to illustrate and demon-strate our model. As shown in Figure 4, 10 agents arecrossing the road where one is the main character and theothers are the background character. We suppose the direc-tion the red arrow points to is west. Figure 4(a) shows thatfour agents are moving west to cross the road, whereas sixagents, including main character circled in red, are movingeast to cross the road when the traffic light is going tochange from yellow into green. In Figure 4(b), when thetraffic light is green, all the agents are moving to theirtargets, and the main character circled in red continues to

(b)

(d)

ound characters cross the road.

169.

Page 6: Simulating realistic crowd based on agent trajectories

Simulating realistic crowd based on agent trajectories L. Sun, X. Li and W. Qin

move east. In Figure 4(c), the main character circled in redfinds that he forgets something and needs to go back, andtherefore, he turns and goes to his original place. Finally,the main character circled in red returns, and the back-ground characters continue on their way to their targets.

Figure 5 shows the reactions of main character when anaccident event happens. In Figure 5, a truck driver does notnotice that the traffic light has changed into red and drivesthe truck to rush into the agents. That is, an accident eventhappens, and all the agents in its influence region become

Figure 5. The behaviors of main charact

170 Comp

main characters so that they can make decisions them-selves to react to the accident event.

As shown in Figure 5(a), we suppose the direction theblue arrow points to is north and the direction the red arrowpoints to is west and furthermore, the traffic light for west–east is green while the traffic light for north–south is red.The vehicles and the agents are moving on with the direc-tion of west or east and at this time, a truck moving fromthe direction of north to south rushes into these agents. Inthat case, all agents become main characters and they

er when an accident event happens.

. Anim. Virtual Worlds 2013; 24:165–172 © 2013 John Wiley & Sons, Ltd.DOI: 10.1002/cav

Page 7: Simulating realistic crowd based on agent trajectories

Number ofagents

Figure 6. The relationship between number of agents and fps.

Simulating realistic crowd based on agent trajectoriesL. Sun, X. Li and W. Qin

respond to this accident event differently because theyhave different characteristics. In Figure 5(b) to Figure 5(h),the agents circled in red are a man of strong action. As soonas they perceive danger, they make the decision to runquickly to escape the truck. The agent circled in yellow is alittle timid and when she is frightened, she runs in oppositedirection to keep her away from danger. The other agentsare relative calm and they predict that they are not in dangereven if the truck continues with current speed. Therefore,they stop and wait the truck to pass.

Figure 6 shows the relationship between the number ofagents and the simulation rate.We can see that the simulationrate decreases as the number of agents increases. When thereare 350 agents in crossroads scenario, the simulation rate ofour approach is still 24 fps, which guarantees the simulationis real time.

Comparing with other works with high computation costsuch as [10], we provide an approach with “light” reasoning,planning, and decision-making processers because weembed behavior options in the environment for backgroundcharacters. Meanwhile, we construct main characters asintelligent agents and take physiological and psychologicalfactors of them into account to showmore realistic behaviorscomparing with the works with main ideas similar to “smartobject” [22] and “smart event” [23]. Especially, by classify-ing agents’ trajectories and the crowd into two categories, thesimulation can show the interesting behaviors of humanbeings and improve the realism of the road-crossingscenario. Furthermore, background characters only in theregions with specific rules are informed of behavior options,which ease the burden of agents for continuous check.

7. CONCLUSION

We present a novel approach to simulate crowd behaviors atcrossroads. The model is based on the recorded videos,allowing us to incorporate how real humans behave whencrossing the road. We state that most of the agents’ trajecto-ries are similar and only a few of agents’ trajectories are dif-ferent. To reduce the computation cost, we classify the crowdinto two categories—main and background characters. Theclassification principles are determined by two factors. Oneis the agent’s trajectories, and the other one is the change

Comp. Anim. Virtual Worlds 2013; 24:165–172 © 2013 John Wiley & Sons, LtdDOI: 10.1002/cav

of the environment. When the trajectories of some agentsare different from that of the other agents, or some eventhappens, the agents, who are in its influence region, thenare or become the main characters. The behavior controlmethod of the main characters is different from that of thebackground characters. The main characters have the percep-tion, the memory, the planning, the physiology, and thepsychology so that they can make their decisions and reactto the event properly. Compared with the main characters,background characters are informed of the behavior optionsby smart environment so that their behaviors are similar oncethey are located in the same region with same rules. Weevaluate our approach and demonstrate the achievedimprovements: our model can display realistic crowd behav-iors when crossing the road and reflect the characteristics ofhuman behaviors at low computation cost. The mainobjective of future work is to extend our method to morereal-life scenarios and develop a more general and improvedmodel for crowd simulation.

REFERENCES

1. Treuille A, Cooper S, Popovic Z. Continuum crowds.ACMTransactions on Graphics 2006; 25(3): 1160–1168.

2. Narain R, Golas A, Curtis S, Lin M. Aggregate dynam-ics for dense crowd simulation. In SIGGRAPH Asia’09:ACM SIGGRAPH Asia 2009 Papers 2009; 1–8.

3. Helbing D, Farkas I, Vicsek T. Simulating dynamical fea-tures of escape panic. Letters to Nature 2000; 487–490.

4. Chenney S. Flow tiles. In 2004 ACM SIGGRAPH/Eurographics Symposium on Computer Animation2004; 233–242.

5. Reynolds C. Flocks, herds and schools: a distributedbehavioral model. ACM Computer Graphics 1987;21(4): 25–34.

6. Laird J, Newell A, Rosenbloom P. SOAR: an architec-ture for general intelligence. Artificial Intelligence1987; 33: 1–64.

7. Funge J, TuX, TerzopoulosD.Cognitivemodeling: knowl-edge, reasoning and planning for intelligent characters.Proceedings of the 26th Annual Conference on ComputerGraphics and Interactive Techniques 1999; 29–38.

8. Silverman B, Johns M, Cornwell J, Brien K. Humanbehavior models for agents in simulators and games.Presence: Teleoperators and Virtual Environments2006; 15(2): 139–162.

9. Shao W, Terzopoulos D. Autonomous pedestrians.Graphical Models 2007; 69(5–6): 246–274.

10. Yu Q, Terzopoulos D. A decision network frameworkfor the behavioral animation of virtual humans. Pro-ceedings of the 2007 ACM SIGGRAPH/EurographicsSymp. on Computer Animation 2007; 119–128.

11. Lerner A, ChrysanthouY, Lischinski D. Crowds by exam-ple. Computer Graphics Forum 2007; 26(3): 655–664.

171.

Page 8: Simulating realistic crowd based on agent trajectories

Simulating realistic crowd based on agent trajectories L. Sun, X. Li and W. Qin

12. Kim S, Guy S, Manocha D, LinM. Interactive simulationof dynamic crowd behaviors using general adaptationsyndrome theory. Proceedings of the ACM SIGGRAPH

Symposium on Interactive 3D Graphics and Games

2012; 55–62.13. Guy S, Kim S, Lin M, Manocha D. Simulating

heterogeneous crowd behaviors using personality traittheory. Proceedings of the 2011 ACM SIGGRAPH/Eurographics Symposium on Computer Animation

2011; 43–52.14. Jiang S, Wang D, Chen Y, Sun D. Pedestrian move-

ment trajectory reappearance and crossing featureexpression based on video processing. Journal of

Southeast University (Natural Science Edition) 2012;42(6): 1233–1237.

15. Vapnik V, Lerner A. Pattern recognition usinggeneralized portrait method. Automation and Remote

Control 1963; 24: 774–780.16. Zhao J, Chen B, Yao G, Yang L. Classification of

multi-class trajectories based on SVM. Computer &

Digital Engineering 2012; 40(9): 19–21.17. Sun L, Sun J, Liu Y, Ni H. A perception model for

autonomous virtual humans based on the feedbackcontrol. Journal of Software 2010; 21(5): 1171–1180.

18. Sun L, Liu Y, Sun J, W. Lu. The hierarchical perceptionmodel for crowd simulation. 2009 Sixth International

Conference on Computer Graphics, Imaging and

Visualization 2009; 106–111.19. Van den Berg J, LinM,Manocha D. Reciprocal velocity

obstacles for real-timemulti-agent navigation.Proceedingsof the IEEE International Conference on Robotics and

Automation 2008; 1928–1935.20. Ni H. Research of the key technologies for autonomous

virtual human, [Ph.D. Dissertation], Tianjin: TianjinUniversity, 2007.

21. Kovar L, Gleicher M, Pighin F. Motion graphs. ACMTransactions on Graphics 2002; 21(3): 473–482.

172 Comp

22. Kallmann M, Thalmann D. Direct 3D interaction withsmart objects. Proceedings of the ACM Symposiumon Virtual Reality Software and Technology 1999;124–130.

23. Stocker C, Sun L, Huang P, Qin W, Allbeck J, BadlerN. Smart events and primed agents. Intelligent VirtualAgents, Springer LNCS, Vol. 6356, 2010; 15–27.

AUTHORS’ BIOGRAPHIES:

. Anim. Virtual Worlds 2

Libo Sun is a lecturer of the School ofInstrument Science and Engineering atSoutheast University in China. She re-ceived her PhD degree in January2012, from the School of ComputerScience and Technology at Tianjin Uni-versity. She was a visiting scholar ofGraphics Lab at University of Pennsyl-vania from November 2009 to August

2011. Her research interests include computer animation,virtual reality, and crowd simulation.

Xiaona Li is currently a PhD student ofthe School of Instrument Science andEngineering at Southeast University inChina. She was a visiting student ofGraphics Lab at University of Pennsyl-vania from September 2008 to Septem-ber 2010. Her research interests includecomputer animation, virtual reality, andcrowd simulation.

Wenhu Qin is a professor of the Schoolof Instrument Science and Engineeringat Southeast University in China. He re-ceived his PhD degree in 2005 fromSoutheast University. He has more than25 journal papers, 10 conference pa-pers, and a book. He has three patents.His research interests include vehiclesafety, virtual reality, crowd simulation,

and road traffic accident reconstruction

013; 24:165–172 © 2013 John Wiley & Sons, Ltd.DOI: 10.1002/cav