dorkhub

Crowd-Simulation-and-Visualization-in-Unity

A crowd simulation and visualization demo implemented in Unity using Dijkstra Distance Field and simplified version of…

TUM-MLCMS
C#537 forksMITupdated 5 years ago
git clone https://github.com/TUM-MLCMS/Crowd-Simulation-and-Visualization-in-Unity.gitTUM-MLCMS/Crowd-Simulation-and-Visualization-in-Unity

Visualization and Simulation of Crowds in Unity

This repository contains the implementation for the Machine Learning in Crowd Modeling & Simulation practical course in Technical University of Munich.

How to Setup the Project?

  • Install Unity 2019.4.3f1 LTS version.
  • Clone the repository
  • Open the project in Unity

Implementation

  • CameraMovement.cs -> Contains the code for camera movement.
  • Grid.cs -> Contains the code for handling transformations from Unity 3D World Space to 2D Cell Space and the other way around. Also contains mesh generation code for the plane (which is used as the grid).
  • GridElements.cs -> Enum for defining simulation elements in cell space EMPTY, OBSTACLE, TARGET.
  • LineDrawer.cs -> Constains code for drawing lines for Grid and Trajectories.
  • Pathfinding.cs -> 2D Distance field generation with Dijkstra's pathfinding algorithm.
  • Pedestrian.cs -> Component that is attached to every pedestrian to store some state.
  • Simulation.cs -> Controls the entire simulation
  • SimulationElement.cs -> Component that is attached to every simulation element.
  • SwitchScene.cs -> UI component to handle scene switches.
  • UIManager.cs -> Handles the buttons and sliders in the scene.

Images

more like this

FyWorld

FyWorld - Base-Building / Simulation Game & Tutorial in Unity

C#331

bit_gossip

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

Rust50

search

search projects, people, and tags