• Stars
    star
    313
  • Rank 133,714 (Top 3 %)
  • Language
    C#
  • License
    GNU General Publi...
  • Created about 6 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TrafficSim using Unity ECS 2019.3

OSMTrafficSim

gif gif gif gif gif

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