Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[RELEASED] iTS - Intelligent Traffic System

Discussion in 'Assets and Asset Store' started by rhodnius, Dec 11, 2014.

  1. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hello guys!

    I have submitted a new version that have an improved behavior of the AI and also have a minor bug fix for the behavior when the AI cars try to overtake over lanes that are contrary in direction.

    The update should be soon on the asset store.

    Cheers!

    Rhod,
     
    emergki and hopeful like this.
  2. _invalidusername

    _invalidusername

    Joined:
    Jul 1, 2014
    Posts:
    35
    Hey Rhod

    Super interest in buying iTS, particularly for the pedestrian functionality. A couple of questions:
    • Does the system automatically handle despawning (ie; despawn vehicles when x distance from player)?
    • How robust is the pedestrian system? I assume the pedestrians work the same as the cars where you create a route they follow, but are the pedestrians able to navigate non flat terrain like stairs, curbs rounded terrain etc...
    • Does the pedestrian system have built in obstacle avoidance? For example, will they avoid/stop for other non iTS objects that may move in front of their defined route at runtime?
    • Is the only difference between the 2 versions the source code vs dll?
    Sorry if you've answered any of these before. Looks like a great asset! Hoping it will fit my needs
     
  3. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi _invalidusername!

    Thanks for your interest on iTS!

    Here are the answers to your questions:

    Yes the system uses a spawner that have settings for defining the area that sorrounds the player to spawn and despawn the cars and peds.

    The pedestrians uses the same exact system as the Traffic cars, so you are right you create the routes for them, they should be able to navigate through non flat terrains if the actual character controller or physics used with it allows it.

    The system have the ability to avoid the player, and for obstacle you would need to define those obstacles as if they were players too, also the system have a script that allows to define points on the lanes that are blocked, you could also use this script and mod it to create what you are looking for, using the players detection way could cause some performance issues if there would be a lot of obstacles on the scene, because of the way the player is detected by the traffic cars.

    Yes the only difference is that one is Dll and the other have the source code.

    Is totally fine! no problem at all!

    Cheers!

    Rhod,
     
    _invalidusername likes this.
  4. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    Hi O'm not sure what happened to my post (forum having problems?) anyway I'll post again.

    I'm wanting to spawn just 1 car using the traffic spawner script.

    I have 1 car and "total amount of cars" and "amount" also set to 1, but every time it spawns 2 cars.

    I'd not noticed this before as I always wanted several cars spawned in the scene, am I missing something
     
  5. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332

    Hi @pinchmass !

    hmm i think that the spawner maybe counting them too late and maybe that's why you are getting 2 cars instead of just one, i would take a look at the code to see what is going on and would get back to you.

    Cheers!

    Rhod,
     
  6. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    great (maybe not user error) thanks in advance.
     
    rhodnius likes this.
  7. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    any progress regarding spawning a single car ?
     
  8. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi pinchmass!

    Haven't yet got into it, will do tomorrow, sorry for making you wait.

    Cheers!

    Rhod,
     
  9. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Currently looking at it @pinchmass , sorry for taking so long, was a busy week.

    Cheers!
     
  10. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Is fixed now, it was a minor bug about the counting of the current cars enabled on the scene, so it was always getting 1 more than expected.

    I would send the update to you shortly and upload also it to the asset store soon.

    Cheers

    Rhod,
     
  11. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,472
    I have a few question, does this asset :
    - allow run time generation
    - allow streaming of lay out with partial connection
    - simulation bubble spawning
     
  12. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    cheers thanks for the fix
     
    rhodnius likes this.
  13. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi neoshaman!

    Thanks for your interest on iTS!

    if you mean runtime generation to generate the lanes and connectors where the cars would be driving, currently is not out of the box supported/implemented that way (the methods for creating the lanes and connectors is all in the Editor scripts) but i think this could be done, with the need of running at the end a process to do the calculations that are also done in editor mode, which are needed for the system to work.

    On this one, you could have all the lanes you pre-made in the editor into another array to have it as the lanes source and put into the actual iTSManager at runtime the lanes you want to be adding, but actually the system doesn't really needs this, since it was build to be able to handle more than 2500 lanes at once, without having a performance impact.

    Yes this is how the system works, having a sphere as the spawning area with another internal sphere that defines a non-internal spawning area to avoid cars to spawn right in front of the camera/player.

    Let me know if you have any further questions.

    Cheers!
     
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,472
    Hi! Thanks for the answer

    1. okay
    2. I was thinking about a sector system, lane would be tied to sector which are load and unloaded when needed, but with potentially continuity of lane from one sector to another.
    3. okay

    In fact maybe teh question should be how much I can do gta with this system. Though I don't exactly want to do gta I haven't reach a point where I can specify precisely the need of the game for this aspect.

    And also I'm looking more for pedestrian and lite crowd traffic rather than car, I don't know much it's fitting and what limitation this mean (I'm sure we can have basic pedestrian by replacing teh car lol). How is the logic handled for agent in the lane? Can I insert agents in and out of the lane (or use a hack like I spawn a complex agent and remove the simple lane agent)? Can I do trick, like using a permanent invisible lane for important agents, that would spawn visual version with unimportant temporary agents once in the bubble?
     
  15. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Currently the peds are handled the same way the cars are, so they use exactly the same sytem, currently the system wont handle what you describe out of the box, it would need code modification for doing it the way you want.

    Let me know if you have any further questions, and I totally missed you post, sorry!

    Rhod,
     
  16. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Last edited: Aug 2, 2016
    hopeful likes this.
  17. rhodnius

    rhodnius

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

    Today we have decided to do a change on the prices of iRDS and iTS, here are the new prices that should be live in the next couple of days.

    iRDS Lite would be at 85USD
    iRDS Pro would be at 200USD
    iTS lite would be at 75USD
    iTS pro would be at 200USD

    The decision have been made after debating it a lot internally aiming to increase the affordability and willing reach more people that could use our tools.


    Also notice that iRDS Pro (source) version is live now, but at the old price yet (300)

    Hope it is something that you all like.

    Cheers!

    Rhod,
     
  18. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    Just wanted to let you know of a bug.. Get it frequently in the latest version.

    Code (UnityError):
    1. ArgumentOutOfRangeException: Argument is out of range.
    2. Parameter name: index
    3. System.Collections.Generic.List`1[TSNavigation+TSNextLaneSelection].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Array.cs:1922)
    4. TSNavigation.SwitchTrack ()
    5. TSNavigation.NavigateToWaypoints ()
    6. TSNavigation.FixedUpdate ()
     
    rhodnius likes this.
  19. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332

    Thanks for the feedback, anything in special you have setup that i should be aware of for reproducing it?

    Thanks again!
     
  20. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    Not at all, just the good ol' roads like usual.
     
    rhodnius likes this.
  21. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    I just ran the demo scene at seems to be ok, is your road network with dead end lanes?
     
  22. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    There are no dead end lanes that I'm aware of
     
  23. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    I had it running now for more than 15 minutes but no error have been thrown, maybe I'm missing something else?

    Cheers!

    Rhod,
     
  24. kkkun111

    kkkun111

    Joined:
    May 27, 2016
    Posts:
    6
    Rhod,

    My car has been rigged and place on the scene. When i hit "play" , my car didn't move but its wheel keep rotating on the same location, meanwhile the frame is around 144-166 fps. Is there anything about my rigging or the inspector setting of my car is incorrect? How can I make them move ?

    Thanks!
     
  25. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332

    Hi kkkun111!

    You should not have any cars on the scene except for the player car, the system would spawn them for you using the TSSpawner component for this purpose, please check the Camera child that have this component on it on the demo scene to see how to set it up properly on your own scene.

    Let me know if you have any further questions.

    Cheers!

    Rhod,
     
  26. kkkun111

    kkkun111

    Joined:
    May 27, 2016
    Posts:
    6
    Rhod,

    Thanks ! They are all moving now.
     
    rhodnius likes this.
  27. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    Hello Rhod;

    While editting lanes, they automatically allign with road's height. However, there isn't a layermask for that, and they are alligning with some trigger objects aswell. Can you please add a layermask to TSMainManager where we can disable "height allignment" of all lane lines for some layers?

    Thanks.
     
  28. rhodnius

    rhodnius

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

    In this case, for now, you could just disable the objects that have that trigger while editing the lanes, sorry for the inconvenience, i would implement a layer selection as settings for the lane editor.

    Cheers!

    Rhod,
     
  29. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    This have been quite for a little while, i want to let you know I'm still working on updating iRDS and iTS, one thing I would be doing is code cleanup and performance tweaks before getting into adding more new features as usual, please if you guys think something can be added, let me know so we could include it into the To Do list for this next year.

    Cheers!

    Rhod,
     
  30. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    84
    Hi,i have a buyed dll version allready.

    is it possibile to spawn a single car in a special time on a special selceted road?
    i mean, i build a normal 4 way crossing and if player come to the crossing, a car on the left spawn exact this moment?

    sry my english is not so good
     
  31. Noa3

    Noa3

    Joined:
    May 29, 2012
    Posts:
    84
    Another idea, a function to import the lanes and connectors via osm map data.
     
  32. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi Noa3, yes you can do that and the script that does it is already included which is called TSEventTriggerFollowPath, this would let you make a path that a AI would follow and use a trigger to active the AI triggering for it to move.

    Not a bad idea at all, would put this into the Roadmap list.

    Let me know if you have further questions.

    Cheers!

    Rhod,
     
  33. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    526
    Still a cool asset, but competition is now tough with new smart traffic/pedestrian systems. ;) I feel like the pedestrian system in iTS is still rudimentary, since it's handled as the same way as cars, coming off as stiff.
    Do you plan to evolve the pedestrian system further?
    Also, your pdf manual appears not to have been updated for at least a year.
     
  34. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi @Gregorik !

    Yup i would be working more on the peds side, manual have not changed much, but would be getting updated as I add more features for sure.

    Thanks for your comments.

    Cheers!

    Rhod,
     
  35. Kybernesis

    Kybernesis

    Joined:
    Dec 3, 2013
    Posts:
    27
    Is there any way to manipulate the traffic lights from code? As in if I want to trigger a traffic light change directly from my script and all other traffic lights in the same group then updates based on that change too?

    Also, is there any way to generate lanes from code too? I have quite a huge city to generate lanes for and it would be nice if I could do a round with all roads and generate lanes based on their setups vs manually painting the lanes.
     
    carking1996 likes this.
  36. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    This one is a bit tricky right now, as each Traffic light script currently runs independently, i would look into making this happen in a future release though.

    Also the script for the traffic light is included also on both versions, so you could meanwhile try to make it work the way you need meanwhile as a temporal option.

    This is something that can be done, but the code does not have yet the methods for doing so on the runtime scripts, but on the editor scripts, this is something that i would add in a future release too.

    Cheers!

    Rhod,
     
  37. Ronin-Ra

    Ronin-Ra

    Joined:
    Jul 7, 2012
    Posts:
    42
    I managed to hack this by making a script that stops all running Coroutines, update light color and then start the PlayLights Coroutine again. Not the ideal solution, but it works until that future release :)

    Yeah, I've been looking into the editor scripts to see if I could hook into there and I guess I could pull out what you're already doing there into a runtime version. Looking forward to see it added in the future though :)
     
    rhodnius likes this.
  38. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    526
    The system is now 60% off, and I think it is worth $30 indeed. Probably not more than that in its present state, and here's why:
    - Steep learning curve with laconic documentation. The pdf could easily swell up 2x the size to be really useful.
    - The pedestrian system remains undocumented, there's literally not a word on it in the pdf.
    - Not updated for 6+ months.

    Otherwise an effective system, but it's clear that the author focuses all of his efforts on iRDS instead.
     
  39. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi Gregorik, thanks for your comments, I would be taking them for improving the system, actually I have been working on iTS code for improving it.

    About the documentation, besides peds(they use the same system, but agree I need to add some on the readme about it), what else you feel could be added.

    And for the steep learning curve, what exactly is the most hardest part? This would help for sure to focus on them.

    Thanks again!

    Rhod
     
  40. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    I feel like it's very easy to learn, no steep learning curve. What is easier than point and click? :)
     
    rhodnius likes this.
  41. AbhishekRaj

    AbhishekRaj

    Joined:
    Dec 1, 2016
    Posts:
    143
    Hello guys,I have purchased ITS and I have added ITS manager to the scene and added 2 lanes with connector just for prototyping.But,whenever I hit play no traffic is spawned.Do I need to rig a car?Actually the documentation didn't mention this so this question.If anyone can give me a basic instruction to spawn traffic then I will be very thankful.
     
  42. Kybernesis

    Kybernesis

    Joined:
    Dec 3, 2013
    Posts:
    27
    Is there any way to copy/paste/duplicate already created lanes? I need to set up a good amount of roundabouts in my scene and it's quite the job to set up new lanes and connectors for each one...
     
  43. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi @Kybernesis ,

    Currently there is no copy paste function on iTS for the lanes, sounds like a good to have feature though, would add that to the To Do list.

    Cheers!

    Rhod,
     
  44. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    Hi AbhishekRaj, you would need to add a Traffic spawner to your scene for spawning cars,please check the Demo scene, the spawner is child of the Main Camera on that scene, if you are new to Unity, i Strongly suggest to take the basic tutorials from the Unity web site to get familiarized with Unity and all the components.

    Cheers!

    Rhod,
     
  45. AbhishekRaj

    AbhishekRaj

    Joined:
    Dec 1, 2016
    Posts:
    143
    Hi guys,because of the excellent support of Jose,I am now able to use ITS in my game.The way he patiently answers questions is really commendable. I am really thankful to you Jose and shall update here when my first game will be completed.
     
    rhodnius likes this.
  46. Kybernesis

    Kybernesis

    Joined:
    Dec 3, 2013
    Posts:
    27
    It would definitely have it's uses :)

    On other notes, I have stumbled over some issues/bugs:
    • Sometimes if I have the iTSManager selected in the Hierarchy and pans/rotates around in scene view with the mouse, it suddenly freezes and all I can do in Scene view is zoom in/out. All I can do to unlock the scene view again is to restart Unity...
    • While adding connectors and as i have selected one end point and moving to select the other end point and miss so another Gameobject is selected, the terrain for example, the whole lane data gets corrupted cause it complains about an array out of index somewhere.
    • The NPC cars have serious lags when driving real close to them. See this video to see how it looks: https://www.dropbox.com/s/5s4dohtvameic0u/NPC car lag_optim.mp4?dl=0
     
  47. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332

    Would be checking on the first 2 bullets, about the third, is due to the rigidbody setting of the car, check that it have interpolation enabled on it.

    Cheers!

    Rhod
     
  48. Kybernesis

    Kybernesis

    Joined:
    Dec 3, 2013
    Posts:
    27
    Interpolation is the first thing I checked and all rigged cars have it enabled, including the one from the linked video. So I'm a bit perplexed on why it happens. Have also tested it in the demo scene that came with the iTS and it's the same there...
     
  49. rhodnius

    rhodnius

    Joined:
    Apr 11, 2012
    Posts:
    1,332
    It's related to the physics, not really iTS, since the system just sends the inputs to the physics scripts which just send them to the wheelcolliders, not sure if it could be a camera setting either, I would check it out since I know is a setting on rigidbody or camera that got rid of that shaking you saw.

    Cheers

    Rhod
     
  50. Kybernesis

    Kybernesis

    Joined:
    Dec 3, 2013
    Posts:
    27
    Ah right, I will check out our physics settings, Rigidbody and the camera then. Thank you for your swift replies :)
     
    rhodnius likes this.