Skip to content

maajor/OSMTrafficSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSMTrafficSim

gif gif
gif gif

Update 2024-08-20

Special Thanks to OJ! OSMTrafficSim is integrated into Airport Live Traffic Viewer. And now we can load different maps from the world!, Try open Assets/Scenes/LoadMap.unity and Run it!

guangzhou rio
seattle vienna

Update 2024-06-06

  • Update to Unity 2023.1.20
  • Update to Entities 1.0.6
  • Update to URP

Introduction

OSMTrafficSim is project to simulate city traffic.

Taking advantage of Unity's recent Entity-Componet-System technology, this project exploits the protential of multi-core processors, simulating 25k cars, 10k pedestrian at 30fps on my laptop.

profile

A BVH is constructed for vehicle's communication. Implementing the method described in Thinking Parallel, Part III: Tree Construction on the GPU

The animation of pedestrian use vertex animation texture tool form Houdini's GameDevelopmentTool. Animation state transition use Markov Chain methods.

The city's model is generated using OSM OpenStreetMap. I takes some tools also form Houdini's GameDevelopmentTool to generate the city's static model.
Road's abstract graph is also generated using OpenStreetMap data, an example data is places in Assets\OSM folder. You can right click on it in Unity's Project window and select ParseToRoadGraph to convert it to data in Unity.

See My Blog Unity ECS and Traffic Simulation | UnityECS架构与交通模拟 and Unity ECS, Swarm Animation And Markov Chain| ECS集群动画与马尔可夫链for more detail

System requirements

  • Unity 2023.1.20

Releases

No releases published

Packages

No packages published