Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. PROE_

    PROE_

    Joined:
    Feb 20, 2016
    Posts:
    32
    Thank you for fast reply,
    so the first question after your post is... when will the v3.3 be released? :rolleyes:
    In the third example I was talking about something like this (when i.e. only right side extends, I don't know if that is possible yet? I know I can add extra width to the full road but what if need extra lane only on one side):
    upload_2020-4-19_14-57-29.png

    About the 4.:
    One road is 10m width and the other one has 8m width, both have sidewalks (from crossing, not a side object) with width of 4m, and that's the problem I want to connect them and preserve 4m width of both roads' sidewalks.
    Thanks in advance :)
     
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    v3.2 is still in beta so it will take a while before the final v3.3 is released, there is no date set for the final 3.3 release. These particular features will be available in betas as well but also for that no date is set. I just mentioned it to inform that these will be built-in features in the future.

    The intial photo had a smaller transition width which are usually good for small custom connection prefabs based on imported models. But the longer transition can also be done that way.

    The same for 4) if the road widths are not the same and the roads do have sidewalks added so only the road width should change then a connection prefab can be used for the transition. This would be the recommended workflow if this situation happens more then once. Alternatively you could look into road shape changes for marker sections, https://easyroads3d.com/tutorials/adjusting_road_shapes.php . This can be used to change the road width while preserving the sidewalk width.

    Thanks,
    Raoul
     
  3. PROE_

    PROE_

    Joined:
    Feb 20, 2016
    Posts:
    32
    Okay, thank you for the answer.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    v3.2.0.b3 is now available on our website

    New in this v3.2 beta update is:

    • Option to select auto generated side object sections in the Scene View window. This will show section info and the option to swap the side object for another type also active for this road / road type, see the below image

    • Submesh support for procedural side objects, source prefabs with a submesh setup are now supported

    • Automatically generate Start, Middle, End sections using a prefab setup with child meshes with _start, _middle, _end naming convention. This approach gives more control over triangles exactly on section edges and start , end section triangles can overlap the middle section supporting more complex and optimized source mesh setups. The concrete tunnel in the beta package is an example of this.

    tunnelSelection.jpg

    Also added is an option to snap side object sections to marker positions. This feature is available for objects where no roads are involved, like for example individual fence objects. Contrary to v3.1 where markers have to be moved with precision for a clean angle on straight fence sections, this clean angle can now be forced for any marker position. And it is possible to set the default Control Type in the "Road Type" settings, "Straight XZ" for the below fence. So new fence instances with the correct setup can be created instantly.

    fenceAngle.jpg

    v3.2.0.b3 release notes and general v3.2 beta info

    The schedule at the moment is that there will be one more beta update with new features before v3.2 will be released.

    Thanks,
    Raoul
     
    Last edited: Apr 20, 2020
    Rowlan likes this.
  5. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,263
    Awesome! Is it possible to have automatically generated lights in the tunnel? Mesh and actual Light
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Rowlan,

    Yes, that is possible. The tunnel prefab itself can be expanded with more detail. More detail can also be added through the Connection Object slot where an additional prefab can be dropped also including a Light object that will be instantiated at customizable distances.

    Thanks,
    Raoul
     
    Rowlan likes this.
  7. PHeimlich

    PHeimlich

    Joined:
    Oct 15, 2018
    Posts:
    11
    Hi Raoul,

    how is ist possible to get the sidewalk for the whole road, not just until the first IConnector? (see Screenshot) dd.PNG

    Is it also possible to get a sidewalk without a crossing?

    Thanks,
    PHeimlich
     
  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi PHeimlich,

    In v3.1 sidewalks on roads are indeed controlled through the crossings roads attach too. If the road in the screenshot is not attached to a crossing, then you could temporarily attach it to a crossing, add sidewalks and remove the crossing afterwards. The sidewalks will remain on the road.

    In v3.3 sidewalks it will be possible to activate sidewalks directly on roads, this is also discussed on the previous page https://forum.unity.com/threads/eas...-new-road-system.229327/page-164#post-5700112

    Thanks,
    Raoul
     
  9. PHeimlich

    PHeimlich

    Joined:
    Oct 15, 2018
    Posts:
    11
    Hi Raoul,

    thanks for the quick answer!

    Another "big" question: Is it possible to import OpenDrive (.xodr) Networks? If not, I would pay some extra money for this feature, seriously.

    Thanks,
    PHeimlich
     
  10. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi PHeimlich,

    The same applies to full OpenDrive support as for full integration of osm files, simple T crossings or X crossings no problem, but road structures in these data files can be complex. Implementing this "feature" is equally complex. It is on the list, v3.3 will be a big step forward regarding this.

    Thanks,
    Raoul
     
  11. MianWaqqas

    MianWaqqas

    Joined:
    Sep 21, 2017
    Posts:
    22
    Need assistance.
    Is River Surface is optimized for mobile?
    I use river and see drop in FPS.
     
  12. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello MianWaqqas,

    Do you mean the river surface example in the additional demo package?

    This river surface is a based on a Shape type of side object. The number of nodes can be adjusted in the Shape Editor window. And the resolution can be adjusted in the object settings or in the "Road Type" settings. So it can be optimized for different platforms. The end result is a mesh similar to when it is for example made in a modelling app.

    Thanks,
    Raoul
     
  13. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    69
    Hi, as we are already close to tunnels :) .. I'm just curious if there will be possible to build something like seen on the attached picture. Best regards.
     

    Attached Files:

  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi PrimusThe3rd,

    Perhaps it is easier to build something like that just as a side object, no terrain holes involved? That is already possible in the current v3.1.

    Something similar is on the list for a new demo project but not with a flat top, so eventually this will indeed also be possible anyway in a way that it will cut through the terrain.

    Thanks,
    Raoul
     
  15. Cross_Roads_AMP

    Cross_Roads_AMP

    Joined:
    May 20, 2019
    Posts:
    8
    I recently upgraded to HDRP and I've been having a rough time getting this asset to play properly with it. Everything is and stays as pink, both the roads included and any Demo scenes are completely pink both in the editor and inspector. I've tried testing it at every step of installation. I've done the HD Pro addon, and demo add on, but nothing seems to work right.
    I've done clean installs on new projects, made sure not to install the Parallax shaders, installed the SRP Support package, and upgraded all materials to HDRP, but nothing seems to get it working even when I do all of this one by one.

    I am sure it's something I'm doing wrong here, but any help would be massively appreciated, as I understand it should be compatible with HDRP projects. Is there a specific work flow I should follow, when opening a new HDRP project with this asset installed?
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello Cross_Roads_AMP,

    HD RP requires an HD RP material setup.

    Regarding the EasyRoads3D Pro package. This package only includes a couple of shaders that are very similar to the Unity built-in shaders. So it will be a matter of assigning HD RP specific materials. Do you also use the demo package? This package includes more advanced shaders but more to show EasyRoads3D features. The demo package is more intended for learning purposes. But if you are interested in specific demo package shaders for HD RP, please let me know. The ER Road Transparancy shader for example is already sone..

    V3.3 will have more advanced shaders to handle new road shape specific features. These shaders will also be available for HD RP and URP.

    Regarding the HD Roads Add On package, as mentioned HD RP equire different materials which are available in version specific packages. Please have a look in /Assets/Naturemanufacture Assets/SRP Support/. The PDF doc in the /Assets/Naturemanufacture Assets/ folder includes instructions.

    Thanks,
    Raoul
     
  17. Cross_Roads_AMP

    Cross_Roads_AMP

    Joined:
    May 20, 2019
    Posts:
    8
    I do also use the demo package too, but with no change. I am very interested in shaders for HDRP side of things and really look forward to 3.3, this keeps getting better and better with every update.

    I'll look further into the PDF doc, since the SRP Support folder addons have not been effective.
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Cross_Roads_AMP,

    Regarding the HD Roads package, indeed please follow the HD RP section in the docs. It is just two steps depending which version you use the original shaders should be removed first from the project and then open the package that matches your HD RP version.

    The coming week an update will follow with some HD RP improvements and fixes for issues with URP version 7.3.1.

    Thanks,
    Raoul
     
  19. Cross_Roads_AMP

    Cross_Roads_AMP

    Joined:
    May 20, 2019
    Posts:
    8
    Yep, swapping the shaders worked for now. Look forward to the new update coming up too. Thank you for the amazing support!
     
    raoul likes this.
  20. PHeimlich

    PHeimlich

    Joined:
    Oct 15, 2018
    Posts:
    11
    Hi Raoul,

    how is it possible to activate the SideObjects via API on a road?
    I want to generate a road with a sideobject, e.g. a guard rail, depends on a tag (out from an openDrive file).

    I tried a lot but it doesn't work. An example you can see in the screenshot.

    code.PNG sideobjects.PNG
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi PHeimlich,

    Firs t of all, I would recommend to use the scripting API.

    Code (csharp):
    1. ERRoadNetwork roadNetwork = new ERRoadNetwork();
    2. SideObject si = roadNetwork.GetSideObjectByName("Guard Rail Left v2");
    3. erRoad.SideObjectSetActive(si, true);
    The problem is that the guard rail is not generated? Or do you get errors?

    Do you have problems in general with activating side objects or with this specific side object? Is "Default active state for each marker" toggled on for this side object in the Side Object Manager? Does the side object appear when activating it for markers through the scripting API?

    public void SideObjectMarkerSetActive(SideObject obj, int markerIndex, bool value)
    public void SideObjectMarkerSetActive(SideObject obj, int[] markerIndexes, bool value)

    If this side object should always be active for this road type, then it can also be activated for this road type in General Settings > Road Types.

    Thanks,
    Raoul
     
  22. PHeimlich

    PHeimlich

    Joined:
    Oct 15, 2018
    Posts:
    11
    Hi Raoul,

    Yes, it generates the road, but not the guard rail. I have problems with activating side objects in general. The "Default active state for each marker" is toggled on. No, it doesn't appear when activating it for markers.

    I get the EasyRoads3Dv3 Warning: The side object is null. (When I use your solution)
    This warning doesn't appear, when I already have a RoadNetwork and start my parser again. But the sideObjects are still toggled off and doesn't appear.

    With my solution, I got nothing, it just doesn't appear. But I think your solution is the better way.

    Is there no way to "just toggle on" the sideObjects for a specific road?

    Thanks,
    PHeimlich
     
    Last edited: Apr 27, 2020
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi PHeimlich,

    In your screenshot "Default markers active state" is active. Can you look at some markers to double check, is the side object active on markers?

    I just tested this with the "Guard Rail Left" side object in the demo package. This side object has "Default active state for each marker" in the Side Object Manager switched off. So after activating it on a road, it also has to be activated for markers where this side object should be build.

    Code (csharp):
    1. ERRoadNetwork roadNetwork = new ERRoadNetwork();
    2. ERRoadType rt= roadNetwork.GetRoadTypeByName("Default Road");
    3. Vector3[] markers = new [] {new Vector3(1065f, 16f, 975f), new Vector3(1065f, 16f, 925f) };
    4. ERRoad road = roadNetwork.CreateRoad("road", rt, markers);
    5. SideObject so = roadNetwork.GetSideObjectByName("Guard Rail Left");
    6. road.SideObjectSetActive(so, true);
    7. road.SideObjectMarkerSetActive(so, 0, true);
    The side object is created and visible on the left for the first marker section.

    Perhaps you can email a simple project so we can look at the exact situation on your end if this is still not working for you.

    Thanks,
    Raoul
     
  24. binaryferret

    binaryferret

    Joined:
    May 6, 2017
    Posts:
    2
    Hello. Firstly I'd like to say thanks for this asset it's excellent!

    I'm creating a road through player interaction during run time. All is going well, and I'm finding the API very intuitive and easy to use.

    The issue I'm having is I need a way to visualise what part of the track the player has selected. I have already created a handle to choose the underlying marker, and when selected, it will also select the adjacent marker. So I know WHAT to show, but I don't know how to show what is selected using the underlying mesh.

    is it possible to do one of the following:

    * Make a copy of the mesh between those markers, so it is static but I can use it as a "this bit selected"? Destroy it when the player has finished viewing.

    * Show the spline route between two markers so I can draw a line along a path to show which part is selected - keeping the curves.

    I've explored creating a new separate road from two markers, but this looses the "curves" that are collectively added from the other previous markers.

    I've looked at GetSplinePointsCenter, but that returns all points along the spline.

    Thanks for any help you can provide!
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi binaryferret,

    Glad to hear you like the asset!

    Indeed the curve will be lost when generating a road section using the involved marker positions only.

    startSplinePoint, property of ERMarkersExt, holds the first splinepoint index of a marker section. Not official API code, but to get for example the start index of marker index 2 of ERRoad road you could use:

    road.roadScript.markersExt[2].startSplinePoint

    Together with GetSplinePointsCenter() or GetSplinePointsLeftSide() and GetSplinePointsRightSide() this can be used to get the shape of a marker section.

    Thanks,
    Raoul
     
    binaryferret likes this.
  26. binaryferret

    binaryferret

    Joined:
    May 6, 2017
    Posts:
    2
    Perfect!
    Thanks matey, I really appreciate your help.

    Have a good day, and thanks for the speedy response.
     
    raoul likes this.
  27. malcolm112011

    malcolm112011

    Joined:
    Jun 22, 2018
    Posts:
    2
    It seems like there is a problem with the Ashpalt material, the terrain clips through the road, but only with the Asphalt so far, It doesn't happen with other roads that I've tried. For now I'll just use a different road type, but I'm wondering how this will work.
     
  28. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi malcolm112011,

    Which package or which road type is this related to? And which shaders are used? Is this related to materials with or without offset values or different offset values? These offset values can be used to deal with z-fighting with the terrain.

    Thanks,
    Raoul
     
  29. Eddiman

    Eddiman

    Joined:
    Oct 22, 2017
    Posts:
    4
    Hi,
    I had to made some changes in my terrain, (had to move it to some other position in the scene due to some lightmapping issues) I was wondering if there is any way to actually move the entire network to properly match the moved terrain?, Tried searching the thread, but couldn't find anything that matches my problem.
    I've tried to move the entire Road Network game object, but found out it's locked to 0,0,0. I've also tried to move all the meshes in the Road Object and Connection Objects to where I want it, but it either messes up the entire network, or the gizmos stops drawing. Is this even possible, or are the nodes locked in to where they are first positioned?
     
  30. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi moledda,

    Moving the road network object itself is indeed locked. The reason for this is to prevent ending up with a road network that is no longer perfectly aligned with the terrain after accidentally moving it. It will be hard to move the road network back to the original position when this is not (0,0,0).

    But what you want is possible. Select the two child objects "Connection Objects" and "Road Objects" and move these two to the new position. In the Inspector you will see a confirmation that these objects were moved and a button "Apply Transform Changes", press this button to complete the position changes.

    Thanks,
    Raoul
     
    Eddiman likes this.
  31. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Hi Raoul

    Often we prefer not to have any terrains loaded while we're editing the road scene for performance. However, it seems that it is not possible to select the road markers on intersections without having a collider underneath.

    So we create a huge plane with a mesh collider to allow the road markers to be selected, but it is still too easy to accidentally select the plane rather than the marker.

    The best solution would be that the markers can be selected on intersections without any mesh geometry below it. Any ideas?

    Cheers, Joe
     
  32. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    50
    Actually, I think we might have disabled the mesh colliders on the intersections for runtime performance - that might explain it. I'll try restoring those first.
     
  33. Eddiman

    Eddiman

    Joined:
    Oct 22, 2017
    Posts:
    4
    Thanks! It worked, kind of. Was a bit janky, around half-ish of the road objects didn't reposition after applying the transformation, but apparently they still retained the connection to the intersection node, so I moved the meshes manually to the new position, and after wiggling them a little bit with rotation or moving, each and every intersection by hand, the road spline updated to the way it was. Took some time tho, but it worked out in the end.
     
  34. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi joe_ftg,

    Yes, this could be intersection collider related. I just tested this, selecting intersection handles with no active terrain appears to work well with the mesh collider enabled.

    Thanks,
    Raoul
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @moledda, Glad to hear that worked. The road network should fully update though after moving it, I will double check.

    Otherwise you can try: General Settings > Scene Settings > Refresh Road Network (near the bottom)

    Thanks,
    Raoul
     
    Eddiman likes this.
  36. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Raoul,

    Ignorant question: How can I use multiple terrain tiles. I am looking to move to smaller chunks of terrain and I have noticed multiple posts that mention the ability to use, but no info on settings or setup. So before I get to far, I thought I should ask.

    Thanks
     
  37. raoul

    raoul

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

    Multiple terrain tiles are supported out of the box. After selecting the road network object there will be a notification when new terrain tiles are found.

    During development and for performance reasons you could chose to only update the terrain that covers the road network section that is currently being worked when testing the final result. This can be done by selecting it from the "Selected Terrain" dropdown in the Build Settings or through Ctrl + Alt + Click on the specific terrain tile.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  38. MianWaqqas

    MianWaqqas

    Joined:
    Sep 21, 2017
    Posts:
    22
    Need assistance, i made road network which has road type "Dirt Track Swap". Now road type blank and on clicking road type drop down that " Dirt Track Swap " isn't listed. And when i made new road network object in other scene for testing all road types appears as they supposed to be.
     

    Attached Files:

  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello MianWaqqas,

    Road types are managed in General Settings (3rd tab from the right) > Road Types

    Here road types can be deleted, new road types can be added, imported from other projects or added from the available road types in the project.

    Is "Dirt Track Swap" visible in the Road Type dropdown? If not, can you press the "Add Project Road Types" button near the top. A window will appear with all project road types. Road types that are already available in the scene will be disabled, other road types can be selected and added to the scene. Is "Dirt Track Swap" selectable?

    Thanks,
    Raoul
     
  40. MianWaqqas

    MianWaqqas

    Joined:
    Sep 21, 2017
    Posts:
    22
    -Is "Dirt Track Swap" visible in the Road Type dropdown?
    "Dirt Track Swap" not visible in this Road Network (in which is make roads). But when is made new road network it is visible in new Road Network.
    - If not, can you press the "Add Project Road Types" button near the top.
    Done
    - Is "Dirt Track Swap" selectable?
    Yes
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    In that case, it seems this road type was deleted one way or another. Is this road type added again and is this working well now?

    Thanks,
    Raoul
     
  42. MianWaqqas

    MianWaqqas

    Joined:
    Sep 21, 2017
    Posts:
    22
    yes
     
    raoul likes this.
  43. therider

    therider

    Joined:
    Sep 14, 2017
    Posts:
    1
    Care to check your website contact emails please ? I have sent my invoice number to get a key for the versions which are unavailable yet on the asset store like 3 days ago via contact form and got no answer. Thanks
     
  44. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi therider,

    It is very likely we already sent the email. I will start a Conversation with you.

    Thanks,
    Raoul
     
  45. RetroFlight

    RetroFlight

    Joined:
    Nov 16, 2019
    Posts:
    41
    Hello,
    I am having trouble as I am trying to get Easyroads working, I just bought PRO. When I try to create a road, by shift-clicking on the terrain, it just selects the terrain and does not create a road. I saw in previous comments here other people had similar problems so it is probably something simple I am doing wrong. This is on a brand new project on Unity 2019.3.0f3.
    Thanks,
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hi RetroFlight,

    We have never seen this happen ourselves but this situation is occasionally reported. It is most likely related to a strange issue with events in recent Unity versions in your project. Actions like adding markers, Shift + Click, rely on these events. What solves the problem is resetting the Unity editor in Window > Layouts. After that it can be changed back, if you use a customized setup. It is also mentioned on the Troubleshooting page in the manual.

    Thanks,
    Raoul
     
    Himanshuchahar likes this.
  47. allpay

    allpay

    Joined:
    Mar 28, 2012
    Posts:
    32
    Hi Raoul,

    I haven't use v3 before but now I am using V3 for my new project. I want to use road meshes via "store mesh asset in project folder ". That was very easy at previous version. But I am having this issue now:

    "ArgumentOutOfRangeException: Length cannot be less than zero.
    Parameter name: length
    System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <fb001e01371b4adca20013e0ac763896>:0)
    EasyRoads3Dv3Editor.OQOCDQQCOQ.StoreInAssetsFolder (EasyRoads3Dv3.ERModularBase scr) (at <48aa79f2b6234886b02856dc8a877461>:0)
    EasyRoads3Dv3Editor.OQCQQCODOO.OnInspectorGUI () (at <48aa79f2b6234886b02856dc8a877461>:0)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <5951c2421c324f47883bd5ba8a4bf507>:0)
    UnityEngine.GUIUtility rocessEvent(Int32, IntPtr, Boolean&)"

    What should I do? Pls help.
    Thanks in advance
     
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Allpay,

    The error appears to be related to the scene name / path. A warning message will appear when the scene was not saved yet, so I assume the scene was saved. What is the full scene name + extension?

    Looking at this I made some optimizations so a proper error message is thrown instead of the one in your post. If you want I can send a build for you to try. In that case, could you send your email?

    Thanks,
    Raoul
     
  49. allpay

    allpay

    Joined:
    Mar 28, 2012
    Posts:
    32
    Thank you, when I saved the scene to path "EasyRoads3D scenes" it works.

    BTW I have send my email.
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    For this option to work it shouldn't be necessary to save specifically in the "EasyRoads3D scenes" folder. I will send you an update.

    Thanks,
    Raoul