Search Unity

iTS - Intelligent Traffic System [WIP]

Discussion in 'Works In Progress - Archive' started by rhodnius, Jul 28, 2014.

  1. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Ziadj!

    Thanks for the feedback!, yep that sounds good. could you elaborate a little bit on this:

    Right now, the system have the ability to have different connections between lanes and setup them for different vehicle types, maybe is that what you are referring to?

    Thanks again!

    Rhod,
     
  2. ZiadJ

    ZiadJ

    Joined:
    Sep 3, 2011
    Posts:
    62
    I'm mostly concerned with the robotic feel of the vehicles when making 90 degree turns from one end of a lane to another. They look like they're on rails actually. I think this can be avoided by letting the AI take sharper turns when it is safe to do so even if that means driving slightly over a nearby adjacent lane. In the sample video I probably get this unintuitive feel because the paths are much too rigid especially at the junction level.
     
    Last edited: Oct 2, 2014
  3. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Ziadj,

    We would take a look on that, and see what we could do about it ;)

    Thanks for the feedback!

    Rhod,
     
  4. ZiadJ

    ZiadJ

    Joined:
    Sep 3, 2011
    Posts:
    62
    How about source code accessibility? Are we going to be able to tweak it to our needs like it's the case with Edy's Car Physics and UnityCar?
     
  5. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Ziadj,

    For this product, we would release it in 2 separate packages, one compiled in dlls, and another with full source code, and the price would be different from each other.

    Rhod,
     
  6. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    rhodnius likes this.
  7. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
  8. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Hello, I messed up myself! I wanted to post in iRDS! but yes, would be usefull for both!
     
    Last edited: Oct 2, 2014
  9. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Guys!

    We are glad to say that we got today iTS running on a Nokia 1520 with windows phone 8.1 :D

    So we can say that it would be Windows Phone and Windows Store compatible.

    Rhod,
     
    Meceka and emergki like this.
  10. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Glad to hear that :)

    While testing, did you build in unity for wp8.1 or wp8? If you build for wp8.1, can you test building wp8 too? Thanks.

    (Right now building for wp8.1 works in the way of building for windows store with selecting wp8.1 sdk, and most plugins doesn't support windows store (playmaker, kgf cam and other stuff). In my case I have put a lot of time but couldn't compile with wp8.1. The old way of building wp8 works for me. )
     
  11. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Maceka,

    We would give a try for Windows Phone 8, but we indeed used the build option on unity that states Windows Phone 8, not the Windows Store and with the sub option of windows phone 8.1, dont know if that is what you mean?

    This is the build settings we used:

    upload_2014-10-15_12-26-46.png

    Rhod,
     
  12. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Yep, it's the way I need it. Thanks.
     
    rhodnius likes this.
  13. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Guys!

    We wanted to let you know that we also have tested it with pedestrians, and it work pretty well, so iTS can be used with both, cars and pedestrians, and also any other vehicle that can be drive by inputs like this: Throttle or accel inputs from 0 to 1, steering from -1 to 1 and brake from 0 to 1.

    We would post soon a video with pedestrians.

    Rhod,
     
    Meceka and ZiadJ like this.
  14. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Almost been a week, how is progress going? When do you estimate the beta version will be ready?
     
  15. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Maceka!

    I keep working on it, i have also other projects i'm currently working on, like iRDS, please be a little patient :D.

    I think it is pretty much done, i need to review the details to check that no major bugs could be somewhere in there.

    About the Beta version, we have not decided yet if a beta would be released though, we could think on something.

    Rhod,
     
  16. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Guys!

    We are currently implementing and fine tuning the player detection and "avoidance" (break and lane change if available) we are putting the pedal to the metal on it to get it done as fast as we can.

    We would keep you guys informed.

    Rhod,
     
    Meceka likes this.
  17. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    Out of curiosity, will iTS be able to simulate unexpected behavior, including stopping in the middle of street, swerving into the wrong lane, and ignoring traffic lights?
     
  18. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi cl.9,

    Actually the system has been build to make them be normal traffic that obey the traffic rules, what is what you may be needing those behaviors for?, just curious :D

    The system some how could be tweak to make things like that, except for going on wrong way, that would need a more deep changes to the system.

    Thanks for your interest!

    Rhod,
     
  19. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    I was thinking of a road rage simulator, or ambulance rescue simulation game.
    Very nice progress, I'll be following the development
    .
    Thanks
     
    rhodnius likes this.
  20. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    For these purposes it might be better and IRDS based game. With ITS runing for regular traffic. I think.
     
    rhodnius likes this.
  21. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi cl.9,

    I think that what Pulov is suggesting is a better way to go, since i presume you want that behavior for the player?

    Rhod,
     
  22. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi guys!

    Here it is a web player demo, with 100 cars (you can also move the slider to adjust the amount of cars on the scene) hope you enjoy it, and also it is still on beta, so if you see something that needs improvement, please let me know, meanwhile i'm working on the Developer documentation.

    Web Demo!

    Cheers!

    Rhod,
     
    Meceka and emergki like this.
  23. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Let me know your comments about it ;)
     
  24. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Right now when you block only 1 percent of their path , in example i block them from their right side just a little bit, they stop and wait there forever. I think they should ignore waypoint for maximum of about 1 meter, and go around such obstacles if it's free to move. An example is in below screenshot.

    https://www.dropbox.com/s/vwtg8g51a0718t4/Screenshot 2014-11-14 00.48.21.png?dl=0

    Also, they don't collide with each other, I believe it's the way it works, but will there be a option to enable them to collide each other when we crash or distrupt them?
     
  25. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Meceka!

    Tanks for the feedback! yep that is an expected behavior, since the trigger to detect the player is a little big than the actual collider of the traffic car, what we could do is make this adjustable ;)

    About the collision between them, this is totally a layered physics from unity, so you can control that by just adjusting the layers collision matrix, we put it this way, since the system can handle any shape of roads, and some times it is inevitable that a traffic car collides with another, for example, the Truck with trailer would usually collide with other cars on tight turns, because of the way this Huge truck turns, but this is up to you to enable it or disable it.

    Thanks again for the feedback is really important for us!

    Rhod,
     
  26. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
  27. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Meceka,

    Yep, we can implement that as an option, but also if the car gets outside of the spawning radius, it would be re-spawned somewhere else, just to let you know ;)

    Rhod,
     
  28. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    @Meceka I'm currently uploading the demo with the player detection with less width, so they wont stop forever if the player is not really on their path.

    Rhod,
     
  29. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
  30. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Another thing about the re-spawn, we can implement really easily to re-spawn them, but not that easy to make them re-spawn to the nearest road, since the spawning is handled different and is handled by distance, so they would get re-spawn, but within the spawning area.

    Rhod,
     
  31. pated

    pated

    Joined:
    Jun 27, 2012
    Posts:
    31
    This looks awesome. I'm way too lazy to build a traffic system of my own so I hope this asset won't be too expensive (hum TrafX style expensive). ;)
    Keep up the great work, looking forward to it!
     
  32. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    @pated Thanks for your comments!
     
  33. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    I just added the web demo link to the first post also, which is easier to find though.

    :D
     
  34. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    @Meceka Just added the auto respawn flipped cars as an option, would be available on the web demo in a few minutes, after uploading it ;)

    Rhod,
     
  35. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    the web demo is updated now :D
     
  36. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Thanks, can you also upload another web demo for basic (cube) physics?
     
  37. pated

    pated

    Joined:
    Jun 27, 2012
    Posts:
    31
    +1... with an fps counter pleeeeease! :p
    Any plan on building test apps for iOS/Android to see how smooth it runs on mobile?
     
  38. ZiadJ

    ZiadJ

    Joined:
    Sep 3, 2011
    Posts:
    62
    I've noticed that crashing head on into the cars doesn't knock them off their way like would be the case with a rigid body. Is this something that can be tweaked in the setup through say the car mass or tire friction?

    Also the obstacle detection doesn't seem to work well during turns. A possible explanation is that the detection probes don't align with the turn and keep pointing forward.
     
    Last edited: Nov 14, 2014
  39. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Meceka, yes qe can also build a demo for that one. ;)

    Rhod,
     
  40. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    I will add one just now, about the apps for android, i will do that soon, not yet, since that may require a different scene.

    Rhod,
     
  41. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi ZiadJ,

    Yep the traffic cars uses wheelcolliders, so yes, you can tweak their friction, in this case it is quite high, since we were testing those on really high slopes roads, to avoid the cars to be skidding to much.

    about the obstacle detection on turns, yep it have to do with that, we would be tweaking those for improving it.

    Rhod,
     
  42. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    I just adjusted the obstacle sensors to make them detect the player better.

    Also added a FPS counter, please take into account the settings are in fantastic. avarage FPS i get is about 40 to 60, depending more on what is currently showed on the screen.

    It would be uploaded in a few mins.

    Rhod,
     
    Last edited: Nov 15, 2014
  43. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    I would be adding pretty soon (in a few minutes) a web demo (same scene) with the super simple car physics (based on James Arndt tutorial -> Link) and super low poly traffic cars.

    Rhod,
     
  44. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,609
    Looks good. May I ask what car physics you're using there? They're pretty nice to drive with.
     
  45. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi carking1996!

    For the traffic cars is a really simple physics that uses wheelcolliders, for the player we use iRDS car physics.

    Rhod,
     
  46. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Here is the super simple traffic cars physics web demo--> Link
     
  47. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    I've just tested simple physics, and there are some major problems.

    After each turn, they oscilliate steering to left, right, left, right for about 40 meters (looks like they are drifting) They keep that angular momentum after each turn and oscilliate to reduce that momentum. When going on side of a car if I push them to side(left or right) from their behind, they oscilliate excessively for even a longer distance.

    They are just jumping even when going straight, I don't see any bumpiness on roads, why is it happening?

    Edit:

    Buses are turning corners really un-realistic.
    Is it possible to make trucks with trailers on simple physics?

    I could record this video to show oscilliating, if there wasn't that traffic sign and it didn't stop, it could keep oscilliating for a longer time.

    https://www.dropbox.com/s/cl30efzkkaruaj1/LowRes.mp4?dl=0

    Also, one time, after I crashed a car near traffic light, it started spinning around there, even If I try to block that one it didn't stop and crahsed my vehicle. You need to test simple physics a little longer. Other cars in traffic ignored that vehicle, while I was opening recording software I don't know what happened but it disappeared (about 1 minutes later)

    Edit: I recorded that;

    https://www.dropbox.com/s/rvtsxbvs3oqc0gi/LowRes2.m4v?dl=0

    Video ended in 30 seconds, after about 40 seconds it went straight to right side and started behaving normally.
     
    Last edited: Nov 15, 2014
  48. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    They all have a audio source and it makes it more realistic, but did you optimize it somehow? After about 20 audio sources it costs really high to cpu for mobiles. I don't know much about audio, but optimizing it with enabling audio for cars closer (hearing range) to player, and disabling far ones would work I guess.
     
  49. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Meceka,

    Yup, that physics is a lot different from the physics that uses wheelcolliders, since that one doesnt have any wheel collider, the car turning is made by making the Rigidbody turn by applying torque to it, and thats why it won't feel that realistic as the wheelcollider physics.

    Is important to quote that the physics (both) are going to be open sourced on our system, and also you can use any other physics you may want to, so this would let you mod it to fit your needs also, or use other physics that you may like.

    We would be fine tuning it more.

    Rhod,
     
  50. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,334
    Hi Meceka!

    As on the previous post, you have total control on the audio source of the cars, since the code for it is open source, and you can modify it to fit your needs, we could include some code for it as a separate component to enable disable the audio source based on the distance to the spawner object, but don't know if checking the distance on all cars to the spawner object could be worst than having the audio source there, will do some test to see how it goes.

    Thanks for the feedback!

    Rhod,