Elsevier

Computers & Graphics

Volume 37, Issue 7, November 2013, Pages 862-872
Computers & Graphics

Technical Section
A GPU-assisted hybrid model for real-time crowd simulations

https://doi.org/10.1016/j.cag.2013.05.006Get rights and content

Highlights

  • A method for dynamically clustering agents on the GPU in a crowd simulation.

  • A local collision avoidance method is combined with the global cluster information.

  • The cluster information is used for higher quality trajectory calculation.

Abstract

In this paper, we propose two new techniques for real-time crowd simulations; the first one is the clustering of agents on the GPU and the second one is incorporating the global cluster information into the existing microscopic navigation technique. The proposed model combines the agent-based models with macroscopic information (agent clusters) into a single framework. The global cluster information is determined on the GPU, and based on the agents' positions and velocities. Then, this information is used as input for the existing agent-based models (velocity obstacles, rule-based steering and social forces). The proposed hybrid model not only considers the nearby agents but also the distant agent configurations. Our test scenarios indicate that, in very dense circumstances, agents that use the proposed hybrid model navigate the environment with actual speeds closer to their intended speeds (less stuck) than the agents that are using only the agent-based models.

Introduction

In recent years, the problems and possible solutions of real-time crowd simulation have attracted many researchers from a wide variety of research disciplines. One of the most fundamental problems of this area is the efficient autonomous navigation of thousands of virtual agents. The navigation of virtual agents in the simulation should be smooth (oscillation-free) and collision-free to imitate their real-world counterparts. In addition to the realism of the simulation, the techniques proposed should be as efficient as possible for real-time applications. The reason is that most real-time crowd simulations run on consumer level hardware. Despite the high process capabilities of modern consumer level computing devices, simulating the behavior of thousands of virtual agents in real-time is still a bottleneck for most of real-time simulations. Therefore, techniques proposed to increase the realism of a real-time simulation should be as efficient as possible, or use an additional resource in conjunction with the CPU. In this study, we take the latter approach. The proposed system clusters the agents by using the GPU's parallel processing capabilities, and then makes use of the cluster information to help agents determine better (lock-up free) paths towards their goal position. The test scenarios described in Section 5.1 indicate that when an agent uses cluster information, it reaches its destination quicker, with an average speed closer to its desired speed along its journey.

The clustering of virtual agents, which is the macroscopic information to be used by agents to query other distant agent configurations, is based on their positions and velocities. By using global cluster information, agents make their decisions based not only on nearby agents but also on distant agent configurations. For example, an agent might prefer to stay away from an incoming group (cluster) early on. To evaluate the proposed system, we present two test scenarios and compare the results with a state-of-the-art agent-based locomotion technique [1] (see Section 5.1).

The rest of the paper is organized as follows: Section 2 reviews the literature. Section 3 describes our proposed shader-based (GPU) agent clustering technique. Section 4 explains how the cluster information is used during real-time simulation. Section 5 describes the test scenarios and presents the experiment and performance results of the simulations. In Section 6, we conclude our study and discuss future directions.

Section snippets

Literature review

Crowd simulation brings many different components together, such as rendering, animation, path planning and navigation. Excellent surveys on each of these subjects, such as [2], [3], [4], [5], and comprehensive applications, such as [6], [7], [8], abound in the literature. One can greatly benefit from understanding the different components and their relationships from these studies. The focus of this study, however, is only the navigation of virtual entities, which is one of the most

GPU clustering

To perform the agent clustering operations on the GPU, we employ a method inspired by Haciomeroglu et al.'s [15] work. In [15], textures are used to store the agents information in order to calculate clusters on the GPU. Because of the fact that their texture has double the height and width of their uniform grid which covers the simulation environment, each of their grid cells has four texels to store the information of the agents within the cell. Considering each agent requires two texels to

Using the cluster information

We have discussed how the proposed clustering method efficiently determines the clusters using the graphics processor. In this section, we explain how the cluster information is used in agent navigation. The idea is simple. If an agent determines that a cluster is about to cross its path, then the agent must find a new direction. If an agent is a member of a cluster, then the agent does not consider its own cluster as a potential obstacle in its path.

The proposed system consists of two stages

Results and analysis

To evaluate the model presented in this paper, in terms of both trajectory quality and performance, we compare our clustering based hybrid navigation model with bare RVO (which is labeled as unclustered in the results given because of performing only short-range planning and having no clustering calculations). In Section 5.1, we discuss experimental results to prove that long-range planning by utilizing cluster information improves the navigation quality of the crowd compared to unclustered

Conclusions

In this study, we propose a hybrid crowd simulation model. The model uses a microscopic locomotion model with additional macroscopic information (clusters). By using geometry shader, fragment shader and hardware accelerated blending, our method not only determines the agent clusters but also determines their centers and average velocities, which are then used in agent locomotion. One other advantage of our method is that the data do not have to return to the CPU memory between the cluster

References (23)

  • I. Rudomín et al.

    Fragment shaders for agent animation using finite state machines

    Simulation Model Pract Theory

    (2005)
  • van den Berg J, Guy S, Lin M, Manocha D. Reciprocal n-body collision avoidance. In: 14th international symposium on...
  • G. Ryder et al.

    Survey of real-time rendering techniques for crowds

    Comput Graph Forum

    (2005)
  • Thalmann D, O'Sullivan C, Ciechomski P, Dobbyn S. Populating virtual environments with crowds. In: Eurographics...
  • N. Pelechano et al.

    Virtual crowdsmethods, simulation, and control

    (2008)
  • Thalmann D, Grillon H, Maim J, Yersin B. Challenges in crowd simulation. In: International conference on cyberworlds....
  • Shao W, Terzopoulos D. Autonomous pedestrians. In: Proceedings of the ACM SIGGRAPH/eurographics symposium on computer...
  • J. Maim et al.

    Yaqan architecture for real-time navigation and rendering of varied crowds

    IEEE Comput Graph Appl

    (2009)
  • S. Paris et al.

    Activity-driven populacea cognitive approach to crowd simulation

    IEEE Comput Graph Appl

    (2009)
  • Reynolds CW. Steering behaviors for autonomous characters. In: Game developers conference '09; 2009. p....
  • D. Helbing et al.

    Social force model for pedestrian dynamics

    Phys Rev

    (1995)
  • Cited by (9)

    • A review on crowd simulation and modeling

      2020, Graphical Models
      Citation Excerpt :

      A deep understanding of state-of-art methods to simulate realistic crowds were provided in [24]. During the past 20 years, researchers have proposed various techniques for crowd simulation, e.g. path planning [25–30], behavior modeling [31–34], navigation graphs [35], emergency evacuation [36–39], hybrid modeling [40–43] and biomechanical models [44,45]. The urgent need for simulating a variety of crowds is limited by the great need for manpower and hardware resources [46].

    • Towards Web3D-based Lightweight Crowd Evacuation Simulation

      2020, Proceedings - Web3D 2020: 25th ACM Conference on 3D Web Technology
    • An implementation of the Social Distances Model using multi-GPU systems

      2018, International Journal of High Performance Computing Applications
    • Towards accelerated agent-based crowd simulation for Hajj and Umrah

      2016, 2015 International Symposium on Agents, Multi-Agent Systems and Robotics, ISAMSR 2015
    View all citing articles on Scopus

    This article was recommended for publication by M. Wimmer.

    View full text