Real-time collision-free linear trajectory generation on GPU for crowd simulations

  • 289 Accesses

  • 4 Citations


Crowd simulations are mostly employed to compose a background in the current scene. For such ambient crowds, it might be unnecessary to perform complex steering calculations. In this study, a steering-free crowd simulation which eliminates the computational cost arising from expensive steering maneuvers is presented. For this purpose, agents are assigned a linear trajectory that is guaranteed to be collision free before entering the simulation. These trajectories are calculated using readily available rendering pipeline of the GPU. To that end, existing agents’ bounding discs are rendered in a spatio-temporal manner as each one forms a straight 3D tube and a projection from a selected initial position is captured. Using the blank areas (holes) in this image, it is possible to determine a suitable constant velocity (a goal position and a speed). In experiments, we not only assess three different methods to choose one of the candidate solutions, but also compare our approach with an existing work. Test results reveal that our technique gives better results in both populating an empty environment with agents quicker and reaching a higher maximum number of agents than the existing method.

This is a preview of subscription content, log in to check access.

Access options

Buy single article

Instant unlimited access to the full article PDF.

US$ 39.95

Price includes VAT for USA

Subscribe to journal

Immediate online access to all issues from 2019. Subscription will auto renew annually.

US$ 199

This is the net price. Taxes to be calculated in checkout.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12


  1. 1.

    Ahn, J., Oh, S., Wohn, K.: Optimized motion simplification for crowd animation. Comput. Animat. Virtual Worlds 17(3–4), 155–165 (2006)

  2. 2.

    Atomic counter (2015). Accessed 31 Jan 2015

  3. 3.

    Barut, O., Haciomeroglu, M., Ozcan, C.Y.: Illusive crowd. In: CASA 2014 (2014)

  4. 4.

    van den Berg, J., Guy, S., Lin, M., Manocha, D.: Reciprocal n-body collision avoidance. In: Symposium on Robotics Research (2009)

  5. 5.

    Chang, F., Chen, C., Lu, C.: A linear-time component-labeling algorithm using contour tracing technique. Comput. Vis. Image Underst. 93(2), 206–220 (2004)

  6. 6.

    Cormen, T.H., Stein, C., Rivest, R.L., Leiserson, C.E.: Introduction to Algorithms, 2nd edn. McGraw-Hill Higher Education, MIT press Cambridge London. ISBN: 0262032937 (2001)

  7. 7.

    Dillencourt, M.B., Samet, H., Tamminen, M.: A general approach to connected-component labeling for arbitrary image representations. J. ACM 39(2), 253–280 (1992)

  8. 8.

    Dobbyn, S., Hamill, J., O’Conor, K., O’Sullivan, C.: Geopostors: a real-time geometry / impostor crowd rendering system. In: Proceedings of the 2005 Symposium on Interactive 3D Graphics and Games. I3D ’05, pp. 95–102. ACM, New York (2005)

  9. 9.

    Haciomeroglu, M., Barut, O., Ozcan, C.Y., Sever, H.: A gpu-assisted hybrid model for real-time crowd simulations. Comput. Gr. 37(7), 862–872 (2013)

  10. 10.

    Haralick, R.: Some neighborhood operators. In: Onoe, M., Preston Kendall, J., Rosenfeld, A. (eds.) Real-Time Parallel Computing, pp. 11–35. Springer, New York (1981)

  11. 11.

    Hawick, K.A., Leist, A., Playne, D.P.: Parallel graph component labelling with gpus and cuda. Parallel Comput. 36(12), 655–678 (2010)

  12. 12.

    Kulpa, R., Olivierxs, A., Ondřej, J., Pettré, J.: Imperceptible relaxation of collision avoidance constraints in virtual crowds. ACM Trans. Gr. 30(6), 138:1–138:10 (2011)

  13. 13.

    Kuwahara, M., Sato, T., Yotsumoto, Y.: Wriggling motion trajectory illusion. J. Vis. 12(12), 1–14 (2012)

  14. 14.

    Luebke, D., Watson, B., Cohen, J.D., Reddy, M., Varshney, A.: Level of Detail for 3D Graphics. Elsevier Science Inc., New York (2002)

  15. 15.

    Lumia, R., Shapiro, L., Zuniga, O.: A new connected components algorithm for virtual memory computers. Comput. Vis. Gr. Image Process. 22(2), 287–300 (1983)

  16. 16.

    Narain, R., Golas, A., Curtis, S., Lin, M.: Aggregate dynamics for dense crowd simulation. ACM Trans. Gr. 28, 122:1–122:8 (2009)

  17. 17.

    Pelechano, N., Allbeck, J.M., Badler, N.I.: Controlling individual agents in high-density crowd simulation. In: SCA’07, pp. 99–108, Switzerland (2007)

  18. 18.

    Reynolds, C.W.: Steering behaviors for autonomous characters. In: Game Developers Conference ’09, pp. 763–782 (1999)

  19. 19.

    Rosenfeld, A.: Connectivity in digital pictures. J. ACM 17(1), 146–160 (1970)

  20. 20.

    Soh, Y., Ashraf, H., Hae, Y., Kim, I.: A hybrid approach to parallel connected component labeling using cuda. Int. J. Signal Process. Syst. 1(2), 130–135 (2013)

  21. 21.

    Stava, O., Benes, B.: Connected component labeling in cuda. In: GPU Computing Gems Emerald Edition, p. 569 (2010)

  22. 22.

    di Stefano, L., Bulgarelli, A.: A simple and efficient connected components labeling algorithm. In: Proceedings of the 10th International Conference on Image Analysis and Processing, ICIAP ’99, pp. 322-. IEEE Computer Society, Washington, DC (1999)

  23. 23.

    Suzuki, K., Horiba, I., Sugie, N.: Linear-time connected-component labeling based on sequential local operations. Comput. Vis. Image Underst. 89(1), 1–23 (2003)

  24. 24.

    Thalmann, N., Thalmann, D.: Virtual humans: thirty years of research, what next? Vis. Comput. 21(12), 997–1015 (2005)

  25. 25.

    Treuille, A., Cooper, S., Popovic, Z.: Continuum crowds. In: SIGGRAPH, pp. 1160–1168 (2006)

  26. 26.

    Wu, K., Otoo, E., Suzuki, K.: Optimizing two-pass connected-component labeling algorithms. Pattern Anal. Appl. 12(2), 117–135 (2009)

  27. 27.

    Yersin, B., Maïm, J., Pettré, J., Thalmann, D.: Crowd patches: populating large-scale virtual environments for real-time applications. In: I3D’09, pp. 207–214 (2009)

Download references

Author information

Correspondence to Oner Barut.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (wmv 8334 KB)

Supplementary material 1 (wmv 8334 KB)

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Barut, O., Haciomeroglu, M. Real-time collision-free linear trajectory generation on GPU for crowd simulations. Vis Comput 31, 843–852 (2015).

Download citation


  • Crowd simulation
  • Crowd navigation
  • Ambient crowd