Simple traffic system
#1
Hi everyone! I was curious if it is possible to run a simple traffic system with tyFlow. I did try to create it myself but unfortunately I don't have that much experience with particles and sim.
Few requirements/ideas
  • cars are only going on specified routes (splines) -> Path Follow + Rotation by travel direction seems an obvious pick and works,
  • cars should gradually stop at end of spline or when hitting a collision box -> Surface Test + Slow? Seems to work pretty well too,
  • cars should not rear-end each other -> I've tried to solve it with Bindings and Particle Physics but I feel like I can't figure out how to set it up properly. My idea is that Particle Physics collision should only act as a trigger that sends car/particle to another event that deaccelerates it with Slow operator for example.
How would you guys approach it?
  Reply
#2
Quote:My idea is that Particle Physics collision should only act as a trigger that sends car/particle to another event that deaccelerates it with Slow operator for example.


Maybe try with Particle properties - select neighbors - and then send them in the next event.
  Reply
#3
Thanks! I'll try it out and post the results
  Reply
#4
Neighbour test works pretty well! I still need to redesign the loop that drives the cars on the road because they get stuck without any reason. Thanks for the help!

Side question - I wanted to check if reducing the time step to a value lower that 1 frame would help with neighbours check but it seems like it completely messes it up. Should I alter any settings inside the simulation when I reduce the time step in flow settings?


Attached Files
.mp4   tyflow.cars_Orthographic_preview_v001.mp4 (Size: 516.84 KB / Downloads: 318)
  Reply
#5
I am also struggling, when going into more depth of particle properties.
But maybe take a look at this tut, and it should answer a lot's of questions.

https://youtu.be/hVb-NTCGuvI
  Reply
#6
Still no success - I think the graph should work fine, but neighbour check gives some false results. The particles end up piling up in 1 point and the others get stuck without any reason. Do you have any ideas what might cause that? I am attaching a preview and max file.

edit - thanks for the link!


Attached Files Thumbnail(s)
   

.max   tyflow.cars01.max (Size: 2.68 MB / Downloads: 273)
.mp4   tyflow.cars01_Orthographic_preview_v002.mp4 (Size: 1.38 MB / Downloads: 309)
  Reply


Forum Jump: