Showing posts with label Crowd Simulation. Show all posts
Showing posts with label Crowd Simulation. Show all posts

Saturday, 11 May 2013

Future Posts

I've been using this blog on and off over the years. A big reason is the type of content I wanted the blog to focus on. The title of the blog can create an expectation of what you may find. Giving you, the readers, an idea of what I would like the blog to focus on would be a good start.
Over the coming months, I'll try and post once or twice a month on average.

Some of the topics I want to focus on are:
  1. Current State-of-the-Art research in the field
  2. Technical aspects of creating a Crowd model, including programming and Computer Graphics.
  3. Creating your own simulation / game engine to run your model.
  4. Crowd simulation tools that are already available.
  5. Any other topics that I feel are related.

Monday, 2 November 2009

Oxford Circus 'X' Crossing opens

As mentioned in a previous post about the Oxford Circus intersection getting a revamp, the intersection has finally been opened today after a number of months of the usual British roadworks. A picture of which can be seen below. A video can be found on a BBC news article here



It's interesting to see how a simulation has been transformed into reality, and the benefits it will bring for pedestrians through one of Europe's busiest intersections. I would also guess that the simulation certainly aided the arguments for benefits of having Oxford Circus get a revamp. I'm certain there must be many more examples that exist, where simulations aid urban planners or architects for such applications.

Tuesday, 25 August 2009

Simulation of Starlings flocking behaviour using captured 3D video recordings of Starlings in flight

I was quite interested to find this flocking simulation of starling's on MIT's Physics arXiv blog.

I mentioned Reynold's flocking behaviour model in an earlier post, it's nice to see progress has been made in creating more accurate simulations by actually capturing 3D recordings using stereographic photography of real starlings in flight.



These video recordings that were published last year has actually allowed Charlotte Hemelrijk at the University of Groningen to create a flocking model, and vary the parameters that closely match real flight recordings of the starlings.

These birds have very complex rules creating this self-organising behaviour, and the researchers seem to have been able to take apart the rules that govern them. These rules also govern other species such as fish, insects and even human crowds, and will likely give further insight into crowd behaviour, and allow for more accurate simulations of human crowds.

I'll be looking forward to seeing a video of this flocking simulation.

Monday, 24 August 2009

XFlow: Fluid simulation tool

I've just come across XFlow, from NextLimit, which is an accurate fluid simulation tool. It uses a particle based method, instead of a computational grid that are used in other Computational Fluid Dynamics (CFD) tools.



The interesting part of this tool is that they have explored other fields, where CFD can be applied to. As they use a particle based method, it is well suited for applying to simulation for complex systems. Examples include:

1. Traffic Simulation
2. Cell Simulation
3. Crowd Simulation

For the crowd simulation application, the particles can represent the pedestrians in different conditions, which can then be applied to scenarios such as emergency evacuation.

Tuesday, 19 May 2009

Netlogo to 3D Max: Code

Based on the pseudocode for the Netlogo to 3DMax implementation, I have now decided to post a short tutorial on exporting the Netlogo traffic simulation to 3DMax. This tutorial will mainly cover the output of the turtles and visualising it in 3DMax.

Netlogo (traffic grid simulation):

For the turtles, I output during runtime, therefore, open the file at the first tick, keep writing, and close the file at the last tick, depending on how many ticks you would want to output, in my case 500.

if ticks = 0 [file-open "myfile.txt"]
ask turtles [
file-write xcor file-type " " file-show ycor
]
if ticks >= 500 [file-close]

This will output in the form:

-12 (turtle: 2) 11
-17 (turtle: 0) 5
-4 (turtle: 1) -8

I didn't find a simple way just to output only the turtle id number, so I manually delete the brackets and text using find and replace, giving me an output as seen below:

-12 2 11
-17 0 5
-4 1 -8

Now our next step is to import it into 3DMax. Once the output file has been stored, the script below can be run, and on clicking the 'Make' button, locate the output file, and it will create the animation.

The code works by importing the Netlogo output file into an array. It can be found here.

I have commented the code in order to explain what is happening at each step.

Running this script will result in the animation shown in my previous post. To get the road patches, and traffic lights in 3DMax, the code can be extended further to store the patches and traffic light states in arrays for each frame, once imported from the Netlogo output.

Update: As pointed out by a reader, there is actually a simple way to output only the turtle id number using the command:

ask turtles [print who]

Therefore, the Netlogo output above can be obtained by using the following command

ask turtles 
[
file-type word xcor " " file-type word who " " file-print ycor
]

Saturday, 25 April 2009

Big, Fast Crowds on the Sony PlayStation 3

Craig Reynolds first introduced flocking to the computer graphics area by creating the Boids artificial life simulation in 1986. It was a computer model of coordinated animal motion such as bird flocks or fish schools, that allowed for collision avoidance and goal seeking. This model has had various applications such as bat swarms and penguin flocks in the movie 'Batman Returns'. A video of the early model can be seen below, further details can be found here


The above model has a complexity of O(n2), as each boid needs to consider each other boid in order to determine whether its a nearby flockmate. The complexity can be reduced to O(n), by the use of spatial hashing that keeps the boids sorted according to their location, and therefore, increase the population of the boids.

Craig now works for the US R&D group of Sony Computer Entertainment. Recently he created a crowd simulation on the Sony PlayStation 3, which extends from the very early model above. As spatial hashing is used in order to accomodate large numbers of agents, here, it forms the basis of a scalable multi-processor approach to create large, fast crowd simulations. The PlayStation 3 has Cell processor, which consists of a Power Processor Unit (PPU), multiple Synergistic Processor Units (SPU) - 6 available to the model, and an RSX GPU. The model makes use of this architecture to spatially subdivide regions, and use the multiple SPUs to update a number of regions in parallel, accelerating the crowd simulation. The model has been able to incorporate 15,000 agents running at 60fps. A video can be seen by clicking the picture below:


It is interesting to see how different architectures can be used to create crowd simulations, and how the parallel processing nature of today's video games consoles, make them low-cost and high performance platforms for parallel execution. I will be looking forward to see other general purpose applications of the Sony PS3.

Monday, 20 April 2009

GPU Crowd Simulation

This is a conference sketch by Shopf, J., Oat, C., Barczak, J., presented in Siggraph Asia 2008.

I've been talking about how I am looking into creating a crowd simulation on the GPU. The sketch states that, to their knowledge it is the first implementation of a massive crowd simulation entirely on the GPU. A video clip of the simulation can be seen by clicking the picture below, and the slides of their Siggraph Asia 2008 presentation can be found here.



The implementation consists of a simulation of 65,000 agents at realtime frame rates. They have used a framework that combines a continuum-based global path planner (similar to the continnuum crowds post I did earlier), with a local avoidance model at a finer scale.

This also allows the level of detail to change as the view is scaled. There are other conference sketches by ATI, such as 'GPU Tesselation for Detailed, Animated Crowds', and 'GPU-Based Scene Management for Rendering Large Crowds' that must have been used in the simulation.

These sketches give an interesting insight into the capabilities of the GPU for simulating massive crowds, and how the level of detail can be varied based on the scale.

Tuesday, 14 April 2009

Pedestrian model for a Tokyo style intersection of Oxford Circus

As has been recently announced, Oxford circus is to get a pedestrian-friendly revamp. Here is a video of a pedestrian model, first referred to me by Duncan Smith, a PhD student at CASA. The model consists of 5000 people, where a particle-based system was used to run the simulation. These particles were then replaced by animated people.

The model was created by designhive, and a map of the redesign can be seen here.




Here, the pedestrian and traffic simulation models are combined with a 3D Studio Max model of the Oxford Circus proposals, which makes this finished video very realistic.

This is a type of application, where a 3D visualisation of the model can be used to enhance the communication of ideas, and making it more accessible to others.

Continuum Crowds

This is a paper by Treuille, A. Cooper, S., and Popović, Z, presented in Siggraph 2006.
It's a real time crowd model based on continuum dynamics. The motion of crowds is controlled by a dynamic potential field, which allows it to avoid moving obstacles without the need of explicit collision avoidance. Their paper and video can be downloaded here.



This paper presents a lot of potential in creating a real time crowd simulation with large crowds. It would be interesting to see other implementations of this technique.

Sunday, 8 March 2009

Book: Crowd Simulation By Daniel Thalmann, Soraia Raupp Musse, SpringerLink

I will be occasionally posting details of books that I have come across, which some may find interesting.
This book gives a very good review of what is out there in the Crowd Simulation area. This includes different disciplines such as physics, sociology, computer science (as I mentioned in my first post), and the areas it's used in, such as the film and games industry, the academic research areas, planning, evacuation scenarios, and so on.



One of the authors, Daniel Thalmann, has quite a few publications in the Crowd simulation area, which can be found here
As I mentioned in my first post that I will be exploring som
e of the above mentioned areas. This book also interestingly mentions that 'despite the apparent breadth of the crowd simulation research basis, interdisciplinary exchange of ideas is rare; researchers in one field are usually not very aware of works done in other fields'. I find this point very interesting, and therefore, brings to mind that work in various fields may often be duplicated, although I havent yet come across duplicate work, it is worth bearing in mind. I welcome such a book that would explore work that has been carried out in different disciplines.

ShareThis