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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

World Building EasyRoads3D v3 - the upcoming new road system

Discussion in 'Tools In Progress' started by raoul, Feb 19, 2014.

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hello slamon,

    Glad to hear the demo package is useful!

    The Flex Connector is not really intended for motorway type of connections. The demo package includes custom prefabs for both these road types. Later in v3.3 motorway exits / entrance will be built-in, but there there are so many variations of this in the real world. The idea is to cover most of them, but there will always be limitations.

    If you want to connect these two road types in the demo package, the custom connection system is probably the way to do that. Create a model that matches the 3 required connections and import it into the system.

    Thanks,
    Raoul
     
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi @zKici,

    This "Distribute Connections Evenly" button should be visible now. I tested this after reuploading the package.

    Can you clear the cache and reimport v3.2.1f2?

    Thanks,
    Raoul
     
  3. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    82
    Where should I look in scripting API to get spline points (not markers but smoothed points) you use to create roads ? I want to develop driving assist, something like semi-autonomous driving to make playing with gamepad more easy.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi Kopanz,

    This is available in the ERRoad class: GetSplinePointsCenter(), GetSplinePointsRightSide(), GetSplinePointsLeftSide()

    Also, v3.3 includes new road type options such as setting lane info and traffic direction. Lane data will be generated, also on intersections. The current v3.3 beta includes a demo scene with a runtime script using this data to move objects on the road network.

    Thanks,
    Raoul
     
    kopanz likes this.
  5. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    Raoul,

    re: beta 3.3 Is there a limit to the width of the sidewalk, and if so what is it?

    Thanks
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi James,

    The width is not locked to a maximum width. Is there a specific reason why you are asking this?

    Thanks,
    Raoul
     
  7. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    I have one custom sidewalk, I set the "Sidewalk Width" to 5 and the sidewalks, most of them, are that width. As I go around the scene, adjusting the roads, some Connections have the previous Width of 2.5. I then go back to the inspector and the value for "Sidewalk Width" is reset to 2.5. I have been able to repeat this issue.

    I set the Width to 5, press "Update Scene Instances" and the Connection I am looking at is fine... then go through the scene and find another Connection with that issue... repeat.

    Issue continues even when the project and/or computer has been restarted.

    Unity 2021.2.0f1, Windows 10, ER3D 3.3.b5t6

    EDIT: I am still getting the errors I mentioned in our private message:
    "Invalid worldAABB. Object is too large or too far away from the origin."

    Unity reports that this error happens when an object is too far from center point.

    So I am GUESSING that the sidewalk issue has to do with Unity throwing this error, and the Sidewalk Width is not being saved because the error is being thrown. I am going to dig into this issue and see what I can do.

    EDIT 2: Is there a way to move the entire road network? Because of the error mentioned, I want to test something. The Scene: https://imgur.com/a/PYCqQXI

    You can see that a chunk of the scene is past the 5000 point, which MAY be causing the issue. I want to center the entire scene in the HOPE that this resolves my issue. So, can I drag the Road Network?
     
    Last edited: Dec 9, 2021
  8. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    @raoul Great asset. Any chance you can remove the "Resources" folders? Those things get forced into everyones game builds even if they are not being used. It's better to not use those folders for 3rd party assets.
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi James,
    Looking at the code the max width is actually currently limuted to 15, but that is only a Slider max width value. This value can be increased.

    Is "Update Scene Instances" perhaps not refreshing all sidewalks in the scene? What happens when moving one of these connection? Do the sidewalks update to the new width?

    Or, is only one connection updating? I belief there is an issue with that in the current v3.3 beta that would explain that. This is fixed, if you want I can send an update so you can test.

    That can be done by moving the two child objects "Connection Objects" and "Road Objects". There will be a notification in the Inspector that the road network moved including a confirmation button.

    Thanks,
    Raoul
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi @drupaljoe,

    Thank you! Yes, that is on the list to improve.

    The Resources folder is used because of the runtime capabilities of the tool. It is also one of the reasons why the EasyRoads3D Pro packages itself includes very limited additional assets.

    A quick solution to avoid unused road network assets to be included (for example those in the additional demo package) is by temporarily renaming the Resources folder before a final build.

    But there are no third party assets in /EasyRoads3D/Resources/, at least not provided by us.

    Thanks,
    Raoul
     
  11. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    We're not planning to do anything at Runtime. Can I just rename the folder? Or will that break the Editor tools also?
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    It will break the editor tool for the assets for which the same code is used as in the runtime scripting API.

    As mentioned, this folder can be renamed temporarily without problems just before the final Build when the project is ready.

    Thanks,
    Raoul
     
  13. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    Raoul,
    I moved the two parent objects you mentioned and pressed: "Apply Transform Changes" (2nd Image) and then the roads got all f'ed up (see first image)

    https://imgur.com/a/ZwlSygC

    I got a number of errors listed below:

    The first two are just Log, the rest are LogError. There are a number of other errors, but they are some variants of the errors listed here. It seems that after the first error things just cascade into more problems.

    If I figure out more in the next couple of days I'll edit the post. But it's Friday, so don't stress on this. I won't. Have a great weekend.

    -----------------------------------------------------------------------
    Flex Connection (38)
    UnityEngine.Debug:Log (object)
    EasyRoads3Dv3.QDDDQODDQDQDQDD:ODODOCCCOC (EasyRoads3Dv3.ERCrossings,EasyRoads3Dv3.QDQDOOQQDQODD)
    EasyRoads3Dv3.ERCrossings:ODOODDQQDQ (EasyRoads3Dv3.QDQDOOQQDQODD)
    EasyRoads3Dv3.ERCrossings:UpdateToRoadType (EasyRoads3Dv3.QDQDOOQQDQODD,System.Collections.Generic.List`1<EasyRoads3Dv3.ERModularRoad>&)
    EasyRoads3Dv3.OQOODDQCCQ:CheckRoadTypeChanges (EasyRoads3Dv3.ERModularBase,EasyRoads3Dv3.ERCrossingPrefabs,bool,bool)
    EasyRoads3Dv3.OQDCCQDQDQExt:ODQOQOOOOO (EasyRoads3Dv3.ERModularBase)
    EasyRoads3Dv3Editor.ERRoadNetworkObjectEditor:OnInspectorGUI ()
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    -----------------------------------------------------------------------
    Refresh failed: Flex Connection (38)
    UnityEngine.Debug:Log (object)
    EasyRoads3Dv3.OQDCCQDQDQExt:ODQOQOOOOO (EasyRoads3Dv3.ERModularBase)
    EasyRoads3Dv3Editor.ERRoadNetworkObjectEditor:OnInspectorGUI ()
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    -----------------------------------------------------------------------
    Failed extracting collision mesh because vertex at index 0 contains a non-finite value (2653.737061, -nan(ind), 1984.120605). Mesh asset path "" Mesh name "ER Road Mesh"
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    EasyRoads3Dv3.ERModularRoad:OCDCQQQCCQ (bool,bool)
    EasyRoads3Dv3.OQDCCQDQDQExt:ODQOQOOOOO (EasyRoads3Dv3.ERModularBase)
    EasyRoads3Dv3Editor.ERRoadNetworkObjectEditor:OnInspectorGUI ()
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    -----------------------------------------------------------------------
    6 Lanes 00200_2: The angle with the crossing is too sharp Flex Connection (665) (EasyRoads3Dv3.ERCrossingPrefabs)
    UnityEngine.Debug:LogError (object)
    EasyRoads3Dv3.ERModularRoad:OCDCQQQCCQ (bool,bool)
    EasyRoads3Dv3.OQDCCQDQDQExt:ODQOQOOOOO (EasyRoads3Dv3.ERModularBase)
    EasyRoads3Dv3Editor.ERRoadNetworkObjectEditor:OnInspectorGUI ()
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  14. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    Ok, that makes sense. I just read that if you put Resources folders inside an Editor folder, they will automatically be excluded from builds. Perhaps thats the path forward here?
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi James,

    Moving the full road network has not been tested with the v3.3 beta so at this point I cannot give feedback on this. I do see there are warnings regarding v3.3 Flex Connectors.

    I just tested this in quite a big test scene, also with a fair amount of Flex Connectors, the road network updated without issues. I will see if this can be recreated in the last project you sent.

    Thanks,
    Raoul
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    @drupaljoe,

    Yes, you can try that. If creating the road network object is successful and adding roads and intersections works well to the scene works, all should be good.

    Thanks,
    Raoul
     
  17. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663

    Yea, part of the issue is that I drew out all items left of the center, so many roads we outside the allowable area by Unity. So when pressing the "Update Scene Instances" I got the non-er3d errors showing the issue with objects too far away from center: "Invalid worldAABB. Object is too large or too far away from the origin." - This is what the error basically means. So *I* screwed up on the layout of the roads. If I can't move the roads, I may simply have to redraw (drats) So, no worries. I will run some tests and update. Thanks again.
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    I can confirm that moving the full road network in your scene does not work well.

    It indeed seems to be related to the v3.3 Flex Connector because after removing all Flex Connectors from the hierarchy, moving the road network works well.

    I will look deeper into this. There are probably workarounds, no need to redo the full road network. I will let you know.

    Thanks,
    Raoul
     
  19. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    Ok, no worries. I have spent the last few hours thinking about ifni have to rebuild maybe I'll do it from code. Is the flex connector avail in the 3.3 api?
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Currently the Flex Connector is available in the 3.3 API in a way that standard X and T connections in v3.2 can be converted into a v3.3 Flex Connector. The order of steps are: first Instantiate an X or T intersection, connect the roads, then call IsFlexConnector() in the ERConnection class.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  21. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    437
    I tried the beta from your website, still didnt' see the option.

    What do you mean by clearing the cache? I just reverted back to the official Unity version (also re-downloaded) and I get these errors now:

    TypeLoadException: Could not resolve type with token 010000f1 (from typeref, class/assembly UnityEditor.SceneManagement.PrefabStage, UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)


    NullReferenceException: Object reference not set to an instance of an object
    EasyRoads3Dv3Editor.OODQQDDCQD.OnInspectorGUI () (at <ca13c8a7953846269322eaaf8e1346f4>:0)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <1ada6c7052bb42378c5ec1bd01fc4723>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  22. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi zKici,
    This roundabout option was added last week. The v3.3 beta on our website does not yet include update.

    When a package is downloaded from the Asset Store it is stored on your computer for quick import in new projects. By removing a package from the cache it will for sure be downloaded again from the Asset Store.

    https://docs.unity3d.com/Manual/AssetStorePackages.html

    Previously imported EasyRoads3D packages are located in /AndaSoft/Editor ExtensionsTerrain

    This error is related to Unity 2021.2. Unity 2021.2 has critical changes and requires a different package.

    Have you tried reimporting v3.2.1f2? This package has been updated and tested. This new roundabout option is part of it.

    Thanks,
    Raoul
     
    Last edited: Dec 12, 2021
  23. joanpescador

    joanpescador

    Joined:
    Dec 21, 2016
    Posts:
    122
    Hi Raoul.
    Is there any other documentation about AI traffic besides the demo scene?
    Btw, I just discover the retention wall 3.3 and I love it :D
     

    Attached Files:

  24. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi Joan,

    That retention wall is also in the v3.2 demo scene in the additional demo package. It is an example of how this type of walls can be auto generated based on the terrain profile. The demo package includes another example of this, stepped wall.

    What information are you looking for regarding AI traffic?

    v3.3 does not really include a full AI traffic system at the moment. What is new in v3.3 is the option to set lane info per road type. Info such as the number of lanes and for each lane, the lane direction. This info is then used to generate lane data, also on built-in intersections and in the final v3.3 realse also on custom connections.

    The AI script in the demo package is merely an example of how this lane data can be accessed through the scripting API. Also, there are at least three AI traffic packages on the Asset Store that have implemented support for the v3.3 lane data options.

    Thanks,
    Raoul
     
    joanpescador likes this.
  25. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    437
    Ah, that worked, I must have downloaded it with the 2021 unity while trying it still in my older version, thank you! the options are showing
     
    raoul likes this.
  26. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    Raoul,

    So, what dumbass thing am I doing now. I attempted to make a single road, and it does show up in the scene, however there are two issues

    1. The Road Type is not fully assigned. Meaning when I select the road in the Inspector the Road Width is correct, but it does not display correctly until I select the road type in the inspector. When I do select it, the road displays correctly (before selecting the road surface is not visible)
    2. I cannot select any of the markers.. well, I can select it, the marker changes color from Blue to Green, but I do not get the x/y/z icon and cannot move the marker.
    Closing and reopening the project does not affect the road or the markers.

    Here is the code. The "roadType" variable does return the correct object, so it's not that.

    Code (CSharp):
    1.  
    2. var roadNetwork = new ERRoadNetwork();      
    3. ERRoadType roadType = roadNetwork.GetRoadTypeByName("6 Lanes");
    4. string roadName = "Test Road 002";
    5. ERRoad road = roadNetwork.CreateRoad(roadName, roadType);
    6. road.AddMarker(new Vector3(0, 0.1f, 0));
    7. road.AddMarker(new Vector3(50, 0.1f, 0));
    8. road.AddMarker(new Vector3(100, 0.1f, 0));
    9. roadNetwork.BuildRoadNetwork();
    10.  
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi James,

    This might have to do with the scripting API not yet fully updated to v3.3 beta code and new road type data options in v3.3..

    Tomorrow I will look at your project to see what happens when attempting to move the road network, assuming the posted code is still related to that?

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  28. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    Ok, no worries, no rush. Let me know if you want anything else
     
  29. numbers1234

    numbers1234

    Joined:
    Jan 5, 2019
    Posts:
    31
    So when I connect roads to crossings they end up with a visible seam. How do I fix this? This is from demo scene. Simply deleting the road and extending it adds a seam.
     

    Attached Files:

  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi,

    This seam is actually a start / end decal that can be used to hide possible real clear seams between roads and intersections.

    These start / end decals can be set per road type in "General Settings > Road Types". Multiple decal presets can be added. A preset will be selected randomly in that case. And near the bottom in the main road settings all presets will be listed, so a preset can be selected manually. When "Select Decal" (the option at the top) is selected, the current decal object will be removed.

    With regard to the visible seam, in v3.2 all shaders and materials were updated. The decal material clearly does not match the actual road material. This looks like the v3.1 demo scene which is no longer updated and will be removed at some point. That said a similar road type is used in the v3.2 demo scene, so the same may happen. I will check all this.

    Thanks,
    Raoul
     
  31. joanpescador

    joanpescador

    Joined:
    Dec 21, 2016
    Posts:
    122
    Ok. Enough to start to work. Thanks,
     
    raoul likes this.
  32. normus28

    normus28

    Joined:
    Feb 16, 2014
    Posts:
    5
    There are some beautiful screenshots on asset store page, I'm interested in those two shown below, are assets/scenes depicted in the picture included within the EasyRoads3D Pro asset?



     
    Last edited: Dec 13, 2021
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi normus28,

    Initially the images were not visible, but they do show after clicking Reply. I copied pasted them, let's see if they are visible...

    screen-1.jpg

    screen-2.jpg

    Anyway this scene is an edited version of the "Book of the Dead" demo. It was a free demo package published on the Unity Technologies account. I am not sure if it is still available.

    The road and dirt path assets, including the fences and guardrail are part of the EasyRoads3D demo package

    Thanks,
    Raoul
     
    Last edited: Dec 13, 2021
  34. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    I'm currently routing cars along my ER road network through calling GetPosition on the ERRoad script. Am I correct in thinking that this would not be available if I were to finalize my network? If so, is there an alternate way to handle 'travel' on the roads?
     
  35. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    The beta for version 3.3 has lane data and you can use that for traffic
     
  36. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi gewl,

    Indeed the Finalize option should not be used when you need the scripting API at runtime because the road data is required.

    As JamesWjRose mentioned, v3.3 has more AI options, lane data also supported on intersections. This too requires the scripting API so the Finalize option should not be used in this case either.

    What exactly are you looking for? If you have requests, please let us know. There are some optimizations on the to do list anyway regarding this.

    Thanks,
    Raoul
     
  37. slamon

    slamon

    Joined:
    Oct 11, 2014
    Posts:
    13
    Hello, Raoul, again! Thanks for your previous answer! I'm still confused with next issue.
    There are motorway2*2-ramp, motorway-exit and motorway-entrance prefabs in the demo project. But how can I make single motorway2*2 exit and entrance?
    I've spent hours to watching tutorials, but unfortunately I couldn't find the answer.
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi slamon,

    What exactly should this look like and is this related to the road type presets in the demo package? Or are you looking for similar exit and entrance connections for a 1x1 road type?

    In any case, this is currently Custom Connection prefab system related based on imported models created outside Unity. Have you looked into that? The custom connection tutorial video shows this process.

    Thanks,
    Raoul
     
  39. slamon

    slamon

    Joined:
    Oct 11, 2014
    Posts:
    13
    Hi, Raoul! Sorry for my stupid questions
    So, I have motorway, 2*2. And I just want to make exit from this motorway. Only one, single exit, not exit+entrance.
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Ok, so we have the 2x2 motorway connection prefab with an exit section on one side and an entrance on the other side. And you are looking for a similar connection prefab but only with the exit section on the right side?

    In that case, as mentioned, these are modeled connection prefabs. What you want is duplicate the original model, remove the entrance section from the other side in a modelling app, import the new model into Unity and into the EasyRoads3D system through the Custom Connection system. Are you familiar with doing that, the modelling bit?
     
  41. slamon

    slamon

    Joined:
    Oct 11, 2014
    Posts:
    13
    yeah, exactly that connection I'm trying to implement
    unfortunately, I'm software developer, and I don't have any skills for modelling at all :-(
     
  42. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    The idea behind the Custom Connection system is that as a user you do not depend on what is built-in in the tool itself (as mentioned flexible motorway exits will come built-in in v3.3.x). So in general if you do need more project specific connections it is recommended to look a little bit deeper into this. This type of models are generally easy to make.

    But as this is a fairly simple task, we will send you this version on Monday :)
     
    JamesWjRose likes this.
  43. slamon

    slamon

    Joined:
    Oct 11, 2014
    Posts:
    13
    Raoul, you are our Santa Clause! :rolleyes:
     
    JamesWjRose likes this.
  44. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    Hey, thanks for the reply, that makes sense.

    Here's my situation:
    I'm making a game with multiple terrain tiles and a single ER Road Network spanning some of those terrain tiles. I do not modify the Road Network itself at runtime in any way, but, as I mentioned, I do route traffic along the roads using data supplied by the ER Road Class—I think mostly GetDistance() and GetLookAtSmooth() (it's been a while since I wrote the wrapper).

    I'd like to finalize the network for two reasons:
    1. It seems like having a 'live' road network results in some editor overheard, included assets in build, etc., that I don't really need.
    2. I'm in the process of moving all my terrains and props to different scenes and additively loading/unloading them at runtime. I don't want to have a different Road Network for every terrain scene, but when I have the Road Network in my 'manager' scene (separate from all the terrains), Unity throws warnings because the ER Terrain script on each of my terrains has a cross-scene reference to that road network object.

    It's a little tricky to tell you what I'm looking for. I suppose my absolute ideal would be 'a system for handling routing traffic along roads' that handles things like passing vehicles between roads/crossing/intersections smoothly, displacing the vehicle object along the road's normal, vehicle pitch/yaw, accel/decel based on the severity of the road's curve—but that'd be a pretty heavy lift and is probably (and totally reasonably) outside the scope of your tool!

    More realistically, for my uses, I think it'd be great if 'finalized' roads included some kind of very light version of ER Road that serialized the road's shape as a spline on bake and let me query against it for a couple things like world position at a given distance along the road, normal/forward at a given distance along the road—lane data sounds great, since I'm using a manual offset for that right now—nothing that actually alters or reads from the baked road mesh in any way, just data generated from the same baking process.

    If I'm overlooking some existing functionality or am missing an intended workflow, please let me know—I know you've built a very robust and solid tool here and it's been very helpful to me already!
     
  45. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    @gewl You are looking for a Traffic Tool. The ER3D is the info you want to give to a traffic tool.

    Or, that's what I am doing. I choose ER3D because I like the curve roads and options, other city tools make roads that are grids. Those are easier to handle traffic.

    So my advice is look into one of the many traffic systems, see who has what you need and then see what data they need to do that work. Depending on what you want/need, it sounds like you should look into something robust. I'm doing vr race game so I some wrote some ecs/dots code to move along the paths that er3d gives me. But atm, this is only for hover cars higher up than the player. When ecs gets better I can integrate simple avoidance. The hover car aspect of my game give me a freedom you might not have.
     
  46. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    The thing is, I don't really need a proper traffic tool, as any would be heavier-weight than is useful for my purposes. Everything I need is already in the ER Road class, I would just prefer to continue to be able to query against that data after bake. As it stands, it seems like my options are to either avoid finalizing the network or to manually map a spline to the road after a bake. If this is intended, that's fine, but I thought I'd mention my use case, as avoiding baking the road network to preserve information valuable for routing seems like an undesirable situation, especially given the consequences of not baking. But worse comes to worst, I can inject something into the finalization process myself that preserves the curve data—I just wanted to make sure that that's necessary/intended before I bother.
     
  47. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    663
    Ok. Then maybe what you want is to create your own copy of the lane and connection data before finalizing and then use that data for your traffic.

    My ecs code does that, you can find it here: https://github.com/Blissgig/Easy-Road-3D-ECS-Traffic

    You'll have to find a way to store the data, xml file or create some objects that persist in the scene, but it'll get you what you want
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hi gewl,

    That will be covered by the optimization that will be part of v3.3. I will make a note to include this in the next v3.3 beta.

    For sure We have tested this situation, multiple scenes with scene specific terrain tiles and a "manager" scene with the road network object. We will double check this.

    This is more related to the road network itself and runtime features. As mentioned v3.3 includes lane data options. lane data can be generated on all roads and intersections.

    As James mentioned there are several AI traffic packages on the Asset Store. At least three of them already support the v3.3 lane data system.

    But since you mention that you do not need a proper AI traffic tool, the v3.3 beta comes with a runtime script example that shows how this lane data can be used to move objects along the road network. Perhaps, additional to the post by James, this can already be used as a starting point for your project.

    Thanks,
    Raoul
     
    gewl likes this.
  49. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    437
    Hello,

    It seems the left connection UV tiling does not work on an X shape T Crossing (Front and Right work) ER 3.2.1f2
    upload_2021-12-22_19-27-31.png
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,617
    Hello Zicki,

    I just tested this on the Default X Crossing part of the Pro package. After changing "Connection Setup" to "Unique Connections", "UV Tiling" updates correctly for all 4 sides.

    So I am not sure how to reproduce this?

    Thanks,
    Raoul